[native-audio] regression bug in Android 10 on x86 AVD Emulator
Issue description
Sample "Native-Audio" doesn't work as expected on AVD x86 running a fresh downloaded Android 10 image from Android Studio GUI (Android 10 with and without Google API, and also Android 11 without Google API: I haven't tested Android 11 with Google API, yet):
- the playback is alterted and distorted
- the recording is altered, too. Playback the recording has the strange behavior of accelerating the recorded sample.
It is important to notice that the same project works without any problem using AVD x86 Android 9 (without Google API).
Steps to reproduce the issue
- Download the project native-audio and open it in Android Studio (I'm using 4.2).
- Compile the project with the latest NDK (downloaded from Studio, currently 22.1.7171670; CMake version 3.18.1).
- Configure the Target for Android 10
- Run the project on Android AVD emulating a Pixel C API 29 with Android 10 (I tested with x86, x86_64 and with Google API or without).
- Grant permission for accessing the microphone.
- Don't forget to enable the host microphone in AVD Emulator and to check it is properly streamed by the OS to the emulator application.
- Press test buttons in the application. You'll notice that the sound is distorced and recording/playback doesn't work as it is expected.
Performing the same test on Android 9.0 x86_64 worked for me. The test seems to fail even with Android 11.
Additional notes
My opinion about the issue is that it may be some breaking change between Android 9 and 10 about OpenSLES API. However, I haven't found any specific clue online.
Thanks, Fabio
@scippacercola - Does this only happen on the emulator? Have you tried it on physical devices?
Also, are you running the emulator on MacBook, Windows or Linux?
Hi @philburk,
I haven't a physical device with Android 10. I'm running the emulator with Linux, Ubuntu 18.04.4 LTS.
Thanks
Is this still an issue? I don't have easy access to the x86_64 emulator.
If it is still a problem, this does sound more like an emulator bug than a sample issue.
(will reopen if necessary)