Skip to content

Commit

Permalink
fix(zc): ambient/background sfx volume not being set
Browse files Browse the repository at this point in the history
The recent removal of "digi_volume" made all background sfx play at full
volume. Fixed that.

Additionally, fixed a bug in the sound dialog that skipped the first sfx
when adjusting currently playing sounds to the new volume. That first
sfx is often a background sfx.
  • Loading branch information
connorjclark committed Feb 6, 2024
1 parent 994d743 commit 52594bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zc/zc_sys.cpp
Expand Up @@ -6882,8 +6882,7 @@ int32_t onSound()
temp_volume = (sfx_volume * FFCore.usr_sfx_volume) / 10000 / 100;
for(int32_t i=0; i<WAV_COUNT; ++i)
{
//allegro assertion fails when passing in -1 as voice -DD
if(sfx_voice[i] > 0)
if(sfx_voice[i] >= 0)
voice_set_volume(sfx_voice[i], temp_volume);
}
zc_set_config(sfx_sect,"midi",midi_volume);
Expand Down Expand Up @@ -8503,6 +8502,7 @@ void cont_sfx(int32_t index)
{
voice_set_position(sfx_voice[index],0);
voice_set_playmode(sfx_voice[index],PLAYMODE_LOOP);
voice_set_volume(sfx_voice[index], sfx_volume);
voice_start(sfx_voice[index]);
}
else
Expand Down

0 comments on commit 52594bf

Please sign in to comment.