Fix: Apply master effect volume during mixing instead of sound start. (#8945)
This makes the volume control work as most players would expect, affecting existing playing sounds as well as new sounds.
This commit is contained in:
@@ -252,7 +252,7 @@ static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, in
|
||||
StartSound(
|
||||
sound,
|
||||
panning,
|
||||
(_settings_client.music.effect_vol * _vol_factor_by_zoom[vp->zoom - ZOOM_LVL_BEGIN]) / 256
|
||||
_vol_factor_by_zoom[vp->zoom - ZOOM_LVL_BEGIN]
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void SndPlayVehicleFx(SoundID sound, const Vehicle *v)
|
||||
|
||||
void SndPlayFx(SoundID sound)
|
||||
{
|
||||
StartSound(sound, 0.5, _settings_client.music.effect_vol);
|
||||
StartSound(sound, 0.5, UINT8_MAX);
|
||||
}
|
||||
|
||||
INSTANTIATE_BASE_MEDIA_METHODS(BaseMedia<SoundsSet>, SoundsSet)
|
||||
|
Reference in New Issue
Block a user