Mute sounds with 0 volume when game is minimized/unfocused instead of Stopping all sounds. Fixes (#4336)
This commit is contained in:
parent
e8ae8f5d3a
commit
2a0812bc06
5 changed files with 70 additions and 13 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue