Pop noise when playing with AAudio

As I already said in the comments of the other thread, there’s a pop noise issue with AAudio using my Samsung Galaxy S10 Plus. (Android 10)

I recorded the audio output and uploaded it to my google drive.
You can download it here.
If you don’t pay attention, you may not notice it.
So please listen carefully, then you will hear it here and there.

Because the noise is too subtle, intermittent, and irregular, I had to spend a week to figure out when that exactly happens before letting the FMOD team know, and below are my findings :

  1. This kind of issue never happens with OpenSL ES.

  2. Only wired earphones have this problem.
    (eg. Apple EarPods, AKG K271 MKII headphones, AKG earbuds bundled with Samsung Galaxy S10 Plus, Cresyn CS-EP800 earphones)
    On the other hand, no problem with wireless earbuds.
    (eg. Samsung Galaxy Buds Live)

  3. Sometimes there’s no noise at all (that’s why I once wrote a comment saying it seemed okay), but I can always hear them after heavy usage.
    (eg. After playing many high-res YouTube videos at 2x speed for hours.)

  4. Happens during playback only.
    Just calling FMOD_System_Update() in a while loop is fine, but after calling FMOD_System_PlaySound(), I immediately notice the noise.

  5. The volume of the device or channel doesn’t matter.
    It happens even in low volume.

  6. Nothing to do with my code.
    Only default settings are used, no DSP whatsoever.
    I could even easily reproduce the issue just by replacing one of the sample sound files with a longer music file in your example project play_sound.

  7. No problem with my sound files.
    I tested with various files. The music used in the attached file here is a famous sample file included in the Samsung Galaxy devices. You can find it yourself in /sdcard/SAMSUNG/MUSIC if you have a Samsung too.


  9. The noise occurs in every position, left, right, and center.

  10. Both 32bit and 64bit versions have the same issue.

  11. Increasing the DSP buffer size using FMOD_System_SetDSPBufferSize() doesn’t fix the issue.
    (eg. bufferlength : 2048, numbuffers : 8)

  12. Noise disappears immediately after Samsung’s screen capture feature is on and appears again when it’s off.

It seems like some of FMOD’s internal settings with AAudio audio output stream for wired earphones have some issues.
As said above, noise only occurs with wired earphones, and it stops when screen-capturing.
Just before and after Samsung’s screen-capture feature is turned on and off, the audio gets muted for a second, and I think this is because the device uses a different audio output stream for the feature to work. And with that output stream, there’s no longer noise, even though audio latency increased.

Well, I don’t know. What do you think?
At least I tried my best to explain what’s happening with AAudio currently.
For now, I’m planning to go with OpenSL ES for all devices. As I already said before many many times, I think FMOD is the best audio engine. So hopefully, this AAudio issue will be fixed soon.


Forgot to mention the API’s version. It’s 2.01.05.

Hi jiyongman,

Sorry we haven’t looked at this yet - I don’t currently have access to a Samsung Galaxy S10 Plus (or similar) with working from home and we haven’t been able to reproduce the issue on non Samsung devices.

Thanks for the in depth information - we are planning to work to resolve the issue, but haven’t been able to at this point.

Thanks for your reply.
I don’t know if this only happens with Samsung Galaxy S10 Plus, but as I said earlier, this doesn’t happen all the time even with S10 Plus.
But I’m sure it’s an AAudio related issue (at least with my Galaxy S10 device).
I recently added an Audio API setting to my app for this test, and whenever such noise occurred I immediately switched to OpenSL and saw if it’s still the same.
And turned out OpenSL is always stable, unlike AAudio.

Yes, I hope this will be fixed someday.
But the main reason I spent my time testing all this was I really want FMOD, which I really really love, to be more polished and perfected.

Thank you for your attention, and take care :slight_smile: