Add IOS support to listen if other BG sounds are playing.

[CL 2289196 by Terence Burns in Main branch]
This commit is contained in:
Terence Burns
2014-09-08 08:20:13 -04:00
committed by UnrealBot
parent 5608086bc2
commit f5e94706d9
3 changed files with 12 additions and 1 deletions
@@ -33,3 +33,8 @@ bool FIOSAudioDevice::SetAudioSessionActive(bool bActive)
AVAudioSession* AudioSession = [AVAudioSession sharedInstance];
return [AudioSession setActive:bActive error:nil] == YES;
}
bool FIOSAudioDevice::IsExernalBackgroundSoundActive()
{
return [[AVAudioSession sharedInstance] isOtherAudioPlaying];
}
@@ -216,6 +216,9 @@ protected:
void GetHardwareSampleRate(double& OutSampleRate);
bool SetHardwareSampleRate(const double& InSampleRate);
bool SetAudioSessionActive(bool bActive);
/** Check if any background music or sound is playing through the audio device */
virtual bool IsExernalBackgroundSoundActive() override;
private:
void HandleError(const TCHAR* InLogOutput, bool bTeardown = false);