I have play_and_record audio session, it works well with build in speaker & microphone. I enabled kAudioSessionProperty_OverrideCategoryEnableBluetoothInput to support bluetooth audio.
If I start the audio session (audioqueue) with kAudioSessionProperty_OverrideCategoryEnableBluetoothInput enabled directly, it also works on both bluetooth input and bluetooth output.
However, if during the session, I enable the audio route to speaker for a few seconds (either with kAudioSessionProperty_OverrideCategoryEnableBluetoothInput enabled or not), then I disable the route to speaker, set kAudioSessionProperty_OverrideCategoryEnableBluetoothInput again, I only get bluetooth input/MIC, but I can't hear anything on the bluetooth speaker. I checked the audio queue, which is working. (It has the interrupt yo get data)
I verified all the audio hardware information, like route is Bluetooth, sample rate is 8000, category is play-and_recorder, actually they all same as the previous working one.
Any one see this issue? Is this a iPhone OS bug? Or where is my problem?
Thanks,
Langtian |