mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-13 22:22:05 +00:00
Don't call idSoundHardware::Update() if s_noSound idCVar is set
This commit is contained in:
parent
67c6537991
commit
397ba0b8ec
3 changed files with 10 additions and 6 deletions
|
@ -379,9 +379,7 @@ idSoundHardware_OpenAL::Update
|
|||
*/
|
||||
void idSoundHardware_OpenAL::Update()
|
||||
{
|
||||
extern idCVar s_noSound;
|
||||
|
||||
if( openalDevice == NULL && !s_noSound.GetBool() )
|
||||
if( openalDevice == NULL )
|
||||
{
|
||||
int nowTime = Sys_Milliseconds();
|
||||
if( lastResetTime + 1000 < nowTime )
|
||||
|
|
|
@ -341,7 +341,10 @@ void idSoundSystemLocal::Render()
|
|||
currentSoundWorld->Update();
|
||||
}
|
||||
|
||||
hardware.Update();
|
||||
if( !s_noSound.GetBool() )
|
||||
{
|
||||
hardware.Update();
|
||||
}
|
||||
|
||||
// The sound system doesn't use game time or anything like that because the sounds are decoded in real time.
|
||||
soundTime = Sys_Milliseconds();
|
||||
|
@ -375,7 +378,11 @@ void idSoundSystemLocal::StopAllSounds()
|
|||
sw->StopAllSounds();
|
||||
}
|
||||
}
|
||||
hardware.Update();
|
||||
|
||||
if( !s_noSound.GetBool() )
|
||||
{
|
||||
hardware.Update();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -44,7 +44,6 @@ idCVar s_doorDistanceAdd( "s_doorDistanceAdd", "150", CVAR_FLOAT, "reduce sound
|
|||
idCVar s_drawSounds( "s_drawSounds", "0", CVAR_INTEGER, "", 0, 2, idCmdSystem::ArgCompletion_Integer<0, 2> );
|
||||
idCVar s_showVoices( "s_showVoices", "0", CVAR_BOOL, "show active voices" );
|
||||
idCVar s_volume_dB( "s_volume_dB", "0", CVAR_ARCHIVE | CVAR_FLOAT, "volume in dB" );
|
||||
extern idCVar s_noSound;
|
||||
|
||||
/*
|
||||
========================
|
||||
|
|
Loading…
Reference in a new issue