Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fluidsynth chorus and reverb setting limits #57

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source/zmusic/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ DLL_EXPORT zmusic_bool ChangeMusicSettingFloat(EFloatConfigKey key, MusInfo* cur
case zmusic_fluid_reverb_roomsize:
if (value < 0)
value = 0;
else if (value > 1.2f)
value = 1.2f;
else if (value > 1.0f)
value = 1.0f;

if (currSong != NULL)
currSong->ChangeSettingNum("fluidsynth.z.reverb", value);
Expand Down Expand Up @@ -736,8 +736,8 @@ DLL_EXPORT zmusic_bool ChangeMusicSettingFloat(EFloatConfigKey key, MusInfo* cur
return false;

case zmusic_fluid_chorus_speed:
if (value < 0.29f)
value = 0.29f;
if (value < 0.1f)
value = 0.1f;
else if (value > 5)
value = 5;

Expand All @@ -751,8 +751,8 @@ DLL_EXPORT zmusic_bool ChangeMusicSettingFloat(EFloatConfigKey key, MusInfo* cur
case zmusic_fluid_chorus_depth:
if (value < 0)
value = 0;
else if (value > 21)
value = 21;
else if (value > 256)
value = 256;

if (currSong != NULL)
currSong->ChangeSettingNum("fluidsynth.z.chorus", value);
Expand Down
Loading