Add iOS support to coreaudio driver#1720
Conversation
|
Note that the code in fluid_coreaudio.c does not set up AVAudiosession for low-latency. (edit: now it does) |
af3750b to
72b8276
Compare
|
Added Objective-C code to setup AVAudioSession, and also now can set "audio.coreaudio.performance-mode" setting to LowLatency to set audio session category 'AVAudioSessionCategoryPlayAndRecord' and reduce |
|
it is unclear if there's a need to expose a setting of ioBufferDuration and if someone might want to set larger values of it than 'closest to one period'. I guess it can be done in a different PR. |
72b8276 to
9e86d60
Compare
derselbst
left a comment
There was a problem hiding this comment.
LGTM, thanks! Two nit-picks below. Also: the iOS CI build succeeds, however, it does not compile with CoreAudio support. I would have expected, that it does compile with CoreAudio, just like MacOS CI does.
d300ca3 to
4338866
Compare
Removed SDL from ios_build.sh and .github/workflows/ios.yml, now ios_build.sh enables coreaudio and not SDL3 |
src/CMakeLists.txt
Outdated
| if ( NOT COREAUDIO_SUPPORT_HAL ) | ||
| enable_language( OBJC ) | ||
| set ( fluid_coreaudio_SOURCES ${fluid_coreaudio_SOURCES} drivers/fluid_coreaudio_avaudiosession.m ) | ||
| endif ( COREAUDIO_SUPPORT_HAL ) |
There was a problem hiding this comment.
| endif ( COREAUDIO_SUPPORT_HAL ) | |
| endif ( NOT COREAUDIO_SUPPORT_HAL ) |
Tiny oversight, that should make all CI builds succeed.
4338866 to
0f8fa5f
Compare
Previously coreaudio driver was working only on MacOSX, and only way to get sound on iOS was with SDL3, which is a heavy dependency
This adds support for iOS in coreaudio driver.
It introduces
COREAUDIO_SUPPORT_HALpreprocessor variable that indicated if coreaudio has HAL (that is, this is MacOSX), or notIf presense of HAL is not detected:
there is only one possible audio output, so
audio.coreaudio.deviceis not populated.componentSubTypeis set tokAudioUnitSubType_RemoteIO. This name is confusing (like, what is 'remote' about it ?), but apparently this is the way to go on iOS.Works in test version of our iOS app (app is not yet live on app store)