From 906b828d877b14efa2fc10570d10a3a3b5167c8b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 20 Jun 2014 00:41:19 -0700 Subject: [PATCH] Partially implement OpenALSoundRenderer::SetInactive --- src/sound/oalsound.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 492357fc2..f058a53a6 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -1350,8 +1350,20 @@ void OpenALSoundRenderer::SetSfxPaused(bool paused, int slot) } } -void OpenALSoundRenderer::SetInactive(SoundRenderer::EInactiveState) +void OpenALSoundRenderer::SetInactive(SoundRenderer::EInactiveState state) { + switch(state) + { + case SoundRenderer::INACTIVE_Active: + alListenerf(AL_GAIN, 1.0f); + break; + + /* FIXME: This doesn't stop anything. */ + case SoundRenderer::INACTIVE_Complete: + case SoundRenderer::INACTIVE_Mute: + alListenerf(AL_GAIN, 0.0f); + break; + } } void OpenALSoundRenderer::Sync(bool sync)