Merge pull request #2654 from pponso1/master

iOS: Refactoring support for background Music.app.
This commit is contained in:
Twinaphex 2016-01-18 11:49:17 +01:00
commit 0703aed61d
2 changed files with 4 additions and 12 deletions

View File

@ -124,9 +124,7 @@ void cocoagl_bind_game_view_fbo(void)
{
#ifdef HAVE_AVFOUNDATION
/* Implicitly initializes your audio session */
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
[audioSession setActive:YES error:nil];
[[RetroArch_iOS get] supportOtherAudioSessions];
#endif
if (g_context)
[g_view bindDrawable];

View File

@ -47,9 +47,7 @@ void apple_rarch_exited(void);
static void rarch_enable_ui(void)
{
#ifdef HAVE_AVFOUNDATION
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
[audioSession setActive:YES error:nil];
[[RetroArch_iOS get] supportOtherAudioSessions];
#endif
bool boolean = true;
@ -71,9 +69,7 @@ static void rarch_disable_ui(void)
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
#ifdef HAVE_AVFOUNDATION
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
[audioSession setActive:YES error:nil];
[[RetroArch_iOS get] supportOtherAudioSessions];
#endif
}
@ -329,9 +325,7 @@ enum
{
#ifdef HAVE_AVFOUNDATION
/* Implicitly initializes your audio session. */
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
[audioSession setActive:YES error:nil];
[(RetroArch_iOS*)[[UIApplication sharedApplication] delegate] supportOtherAudioSessions];
#endif
return (RetroArch_iOS*)[[UIApplication sharedApplication] delegate];
}