Check for OpenAL device errors after pausing/resuming the device

This commit is contained in:
Chris Robinson 2016-05-05 09:18:00 -07:00 committed by Christoph Oelckers
parent 0b7b78c5d2
commit fa46965a71

View file

@ -1634,12 +1634,18 @@ void OpenALSoundRenderer::SetInactive(SoundRenderer::EInactiveState state)
case SoundRenderer::INACTIVE_Active:
alListenerf(AL_GAIN, 1.0f);
if(ALC.SOFT_pause_device)
{
alcDeviceResumeSOFT(Device);
getALCError(Device);
}
break;
case SoundRenderer::INACTIVE_Complete:
if(ALC.SOFT_pause_device)
{
alcDevicePauseSOFT(Device);
getALCError(Device);
}
/* fall-through */
case SoundRenderer::INACTIVE_Mute:
alListenerf(AL_GAIN, 0.0f);