FluidSynth / fluidsynth

Software synthesizer based on the SoundFont 2 specifications
https://www.fluidsynth.org
GNU Lesser General Public License v2.1
1.82k stars 254 forks source link

Fix some rounding issues due to double promotion #1286

Closed derselbst closed 9 months ago

derselbst commented 10 months ago

fluid_settings_register_num() takes double arguments. Previously values were passed as float literals. Implicit promotion of e.g. 0.1f would set 0.10000000149011612 to be the minimum chorus speed. If a user tries to set the chorus speed to 0.1, it would mistakenly fail. This PR fixes this issue.

Fixes #1284

sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication