-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AAudio] [Android Pie] Error callback not received on switching audio device #252
Comments
Unfortunately this is a bug in Android Pie (internal id: 111711159) which will be fixed in the next release of Android. A workaround would be to use the (Java) AudioManager API to listen for device changes, then use JNI to pass those changes down to your app. |
Thanks Don for sharing this. Also, If possible, could you please tell, when is the next Android release planned ? |
Also, are there any plans to fix this in the current release as a patch? |
I tested on a Nokia 6.1 running Android Pie 9.0. The AAudio echo sample app worked ok - could not replicate the behavior mentioned by abhi-foss (original poster). Both with and without headset, and trying different Recording device and Playback device, things work as expected. However having problems with our own app: https://play.google.com/store/apps/details?id=com.stereomatch.hearing.aid.oreo.demo which is not playing output, whether with headset plugged in or not. Though sometimes oddly it starts to work if remove headset etc. - but couldn't replicate that behavior, so is not reproducable. The same app works well in Android Oreo 8.1. I will add more once I have more information. |
It may be in a future patch release for Pie.
Sorry. We cannot predict when the next release will be or what will be in it. It can change up to the last minute.
The bug only affected devices running MMAP, which includes Pixel devices. Some Huawei devices now support MMAP. But they seem to do headphone switching in their DSP and may not be affected.
That sounds like a different issue. Please file a separate Issue and include more details and a LOGCAT of when the audio starts. Also check volume levels. |
I am trying to used the AAudio Sample Application, following is the behavior which I am observing
Step 1. Open the App, play the Audio (tap on screen) -> Works fine, audio is being played back via Device Speaker
Step 2. Connect the Wired Headphone, again play the Audio -> Works fine, audio is now being played via connected Headphones.
Step 3. Remove the Wired Headphone, and again play the Audio -> No audio this time.
I expect the Audio Device to switch back to "Device Speaker"
I am also seeing this behavior in the App on which we are working on, i.e Audio Device switching is not working properly. Also please note that the same Application is working fine on Oreo, but not working on Pie
Is there any change with respect to API's that we are missing ?
The text was updated successfully, but these errors were encountered: