Volume difference between Audio APIs

One of our users said our game volume decreased when they switched the Audio API option from OpenSL to AAudio in our game settings.
We already knew about this because we also noticed it with our test devices Samsung Galaxy S10 Plus and Note 10.

Is this the expected behavior?
Is this due to FMOD’s implementation or hardware itself?

One more question.
The reason the user above complained about the volume is the game is set at a low volume.
We did it because all the game sound sources have high energy and it was impossible to play multiple of them simultaneously without pops caused by audio clipping.
So we told our users to turn up their device volume instead.
But problem is, with AAudio’s low output, we need to increase the device volume by almost 90%, and we are not happy about this.
(On the other hand, it’s a little acceptable with OpenSL)

We gave up on the FMOD’s built-in limiter and compressor DSP due to the reason I wrote here last year.

Is there any other tips or trick to suppress audio peaks to avoid pops and clicks caused by multiple high-energy sounds?

I have reproduced this issue on a Samsung galaxy device- I am finding a ~5dB difference between OpenSL and AAudio. I have not been able to reproduce this on any other devices though, and I have confirmed we are sending the exact same data to the hardware endpoints in both cases, so the only independent variables after that point are the OS, audio drivers and audio hardware, all of which are outside of our control.
As for some general tips and tricks to suppress peaks; the best way to avoid pops and clicks from high energy sounds is to follow audio engineering best-practices and deal with loudness at the source/asset level. If an audio asset is peaking around -1dB, and you play more than one instance at the same time then you will get clipping. If the audio asset is peaking around -10dB, then you will be able to play more sounds before getting issues and increase perceived loudness due to the larger dynamic range. If you are finding that playing multiple sound sources simultaneously causes clipping then those game sound sources are likely mixed too loud and should be mixed down to a lower volume.
Other tips and tricks for getting more headroom on mobile:

  • If you know the user will be using the phone’s speaker then you can aquire more headroom using a highpass filter, removing low end energy that the user isn’t going to be able to hear anyway, and would otherwise just contribute to clipping.
  • As you have said, using a limiter helps. If you are finding the FMOD Limiter too aggressive then using a fast attack compressor with a high ratio setting will similarly curb peaks in the same way and will introduce less distortion than the FMOD brick-wall limiter.
  • Use 32-bit float wav files- this format inherently has more headroom but are larger in size. Perhaps reserve this format for your loudest sounds, such as explosions, gunshots etc
1 Like

Wow, thank you very much!
I didn’t expect a detailed answer like this.
Every bit was very helpful. :slight_smile:

By the way, as for the FMOD compressor tip, I already tried everything I could with it.
That’s why I asked the question linked above before.
It wasn’t just me. I saw some others that faced the same pops and clicks with the FMOD compressor with a short attack time.
Also, another person left a comment on the thread above saying he had the same issue and was frustrated.
He removed it a few days later because nobody including me responded at that time.
Also, he might have thought it was inappropriate to recommend other companies’ products to work around it here.