I tried writing an app that samples the microphone using code from http://code.google.com/p/ios-coreaudio-example/ (Core Audio),
and plays sounds using code from https://github.com/hollance/SoundBankPlayer (OpenAL).
This works fine when running on simulator, but when testing on a real device – microphone sampling doesn’t work (the recordingCallback in the IosAudioController never gets called).
When I disable the SoundBankPlayer code (do not instantiate a new SoundBankPlayer, therefore no OpenAL code is used), the microphone sampling works just fine.
Is there a known limitation of mixing OpenAL and Core Audio code in the same project? If so – is there a workaround? If not – what else could the problem be?
OK, turns out I had to change the audio session category from
kAudioSessionCategory_MediaPlaybacktokAudioSessionCategory_PlayAndRecordwhen initializing the audio session in the OpenAL code.