mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
iOS audio support
This commit is contained in:
parent
fcc8c5dae7
commit
212337c7c1
@ -26,6 +26,7 @@
|
||||
#include <AppKit/NSOpenGL.h>
|
||||
#elif defined(HAVE_COCOATOUCH)
|
||||
#include <GLKit/GLKit.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#endif
|
||||
|
||||
#include <retro_assert.h>
|
||||
@ -119,6 +120,10 @@ void *glkitview_init(void)
|
||||
#if defined(HAVE_COCOATOUCH)
|
||||
void cocoagl_bind_game_view_fbo(void)
|
||||
{
|
||||
// implicitly initializes your audio session
|
||||
[AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
if (g_context)
|
||||
[g_view bindDrawable];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user