iOS: fix/enable coreaudio microphone driver
This commit is contained in:
parent
720f5bca59
commit
a0263db217
|
@ -231,7 +231,7 @@ microphone_driver_t *microphone_drivers[] = {
|
|||
#ifdef HAVE_PIPEWIRE
|
||||
µphone_pipewire,
|
||||
#endif
|
||||
#ifdef HAVE_COREAUDIO
|
||||
#if defined(HAVE_COREAUDIO) && IOS
|
||||
µphone_coreaudio,
|
||||
#endif
|
||||
µphone_null,
|
||||
|
|
|
@ -208,6 +208,7 @@ static void *coreaudio_microphone_open_mic(void *driver_context,
|
|||
rate = 48000;
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
/// Configure audio session
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
NSError *error = nil;
|
||||
|
@ -232,6 +233,9 @@ static void *coreaudio_microphone_open_mic(void *driver_context,
|
|||
microphone->sample_rate = (int)actualRate;
|
||||
|
||||
RARCH_LOG("[CoreAudio] Using sample rate: %d Hz\n", microphone->sample_rate);
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
/// Set format using helper method
|
||||
coreaudio_microphone_set_format(microphone, false); /// Default to 16-bit integer
|
||||
|
|
|
@ -890,9 +890,6 @@ AUDIO
|
|||
#include "../gfx/drivers_context/sdl_gl_ctx.c"
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "../audio/drivers_microphone/sdl_microphone.c"
|
||||
#ifdef HAVE_COREAUDIO
|
||||
#include "../audio/drivers_microphone/coreaudio_mic.m"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
#include "../audio/drivers/coreaudio3.m"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COREAUDIO) && defined(HAVE_MICROPHONE)
|
||||
#include "../audio/drivers_microphone/coreaudio_mic.m"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CORELOCATION
|
||||
#include "../location/drivers/corelocation.m"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue