Hello.
First of all, thanks for integrating Oboe. It has bumped performance of our android app after implementing stabilized callback. supercool!
But there is bug: available audio devices are not updating. I’m on Android 9, Samsung Galaxy Note 8.
When app is started without headset connected it is using speakers, and if I connect headset it is still playing thru speakers. If I start app with headphones already connected - it is using headphones. I’ve tried to use AudioDeviceManager’s change callback to catch headphones connection but it is never called. Then I placed timer tracking list of currently available devices:
const auto& deviceTypes = audioDeviceManager.getAvailableDeviceTypes(); for (auto dt : deviceTypes) { DBG ("Type " + dt->getTypeName() + " default - " + String(dt->getDefaultDeviceIndex(false))); const auto devices = dt->getDeviceNames(); for (auto d : devices) DBG (d); }
When headset is not connected:
Type Android Oboe default - 1
SM-N950F built-in earphone speaker
SM-N950F built-in speaker
And when i connect headphones it remains the same
Lets start app with headset already connected:
Type Android Oboe default - 2
SM-N950F built-in earphone speaker
SM-N950F built-in speaker
h2w wired headset
Moreover if app is running without headset, i can connect it and run any other app e.g Youtube and playback in my app will magically switch to headset.
Please help.
P.S. I’m surprised that audioDeviceManager.getAvailableDeviceTypes()
forces closing of current AAudio stream and rebuilding new one. Is it normal behavior?