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 :
This kind of issue never happens with OpenSL ES.
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)
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.)
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.
The volume of the device or channel doesn’t matter.
It happens even in low volume.
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.
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.
Both FMOD_CREATESTREAM and FMOD_CREATESAMPLE have the issue.
The noise occurs in every position, left, right, and center.
Both 32bit and 64bit versions have the same issue.
Increasing the DSP buffer size using FMOD_System_SetDSPBufferSize() doesn’t fix the issue.
(eg. bufferlength : 2048, numbuffers : 8)
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.