mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 04:51:56 +00:00
Scale down volume of all sounds, fixes #179
so even with many loud sounds the overall volume isn't reduced by OpenAL - apparently OpenAL scales down all sounds temporarily if the mixed result would be too loud or sth like that. Just sending all sounds to OpenAL with a lower volume prevents that from happening (just set your system speaker volume a bit higher if needed). This problem was especially noticable when shooting at metal walls with the shotgun (each pellet produces an impact sound so it gets kinda loud)
This commit is contained in:
parent
ebac192352
commit
3c01757d27
1 changed files with 7 additions and 0 deletions
|
@ -1675,6 +1675,13 @@ void idSoundWorldLocal::AddChannelContribution( idSoundEmitterLocal *sound, idSo
|
|||
// global volume scale
|
||||
volume *= soundSystemLocal.dB2Scale( idSoundSystemLocal::s_volume.GetFloat() );
|
||||
|
||||
// DG: scaling the volume of *everything* down a bit to prevent some sounds
|
||||
// (like shotgun shot) being "drowned" when lots of other loud sounds
|
||||
// (like shotgun impacts on metal) are played at the same time
|
||||
// I guess this happens because the loud sounds mixed together are too loud so
|
||||
// OpenAL just makes *everything* quiter or sth like that.
|
||||
// See also https://github.com/dhewm/dhewm3/issues/179
|
||||
volume *= 0.333f; // (0.333 worked fine, 0.5 didn't)
|
||||
|
||||
// volume fading
|
||||
float fadeDb = chan->channelFade.FadeDbAt44kHz( current44kHz );
|
||||
|
|
Loading…
Reference in a new issue