Skip to content

Commit c2403d3

Browse files
authored
bugfix(audio): Fix muted audio after regaining window focus (#1363)
1 parent 567e600 commit c2403d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Core/GameEngine/Source/Common/Audio/GameAudio.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,9 @@ void AudioManager::releaseAudioEventRTS( AudioEventRTS *&eventToRelease )
10981098
//-------------------------------------------------------------------------------------------------
10991099
void AudioManager::loseFocus( void )
11001100
{
1101-
DEBUG_ASSERTLOG(m_savedValues == NULL, ("AudioManager::loseFocus() - leak - jkmcd"));
1101+
if (m_savedValues)
1102+
return;
1103+
11021104
// In this case, make all the audio go silent.
11031105
m_savedValues = NEW Real[NUM_VOLUME_TYPES];
11041106
m_savedValues[0] = m_systemMusicVolume;

0 commit comments

Comments
 (0)