Mute sounds with 0 volume when game is minimized/unfocused instead of Stopping all sounds. Fixes (#4336)

This commit is contained in:
Thilo Schulz 2009-11-10 01:08:15 +00:00
parent e8ae8f5d3a
commit 2a0812bc06
5 changed files with 70 additions and 13 deletions

View file

@ -937,7 +937,10 @@ void S_Base_RawSamples( int stream, int samples, int rate, int width, int s_chan
}
rawsamples = s_rawsamples[stream];
intVolume = 256 * volume * s_volume->value;
if(s_muted->integer)
intVolume = 0;
else
intVolume = 256 * volume * s_volume->value;
if ( s_rawend[stream] < s_soundtime ) {
Com_DPrintf( "S_Base_RawSamples: resetting minimum: %i < %i\n", s_rawend[stream], s_soundtime );