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.

Fair enough- compressor behavior does get increasingly unstable as attack time approaches 0, and that goes for all compressor designs. You noted previously that other real-time compressors don’t face this issue:

I would be interested to know which compressors you are referring to as most commercial compressor plugins give you a minimum attack time of 20ms, which is much higher than our minimum of 0.1ms. If there are any compressors you know of that go as low as 0.1ms without introducing clicks with high energy input I would like to test them against the FMOD compressor.
As for the pops and clicks, that click is the n milliseconds of raw input before the compressor clamps everything down, creating a transient. If you can distincly hear that, that is a sign that your compressor is being overworked and you need to offload some of that peak handling somewhere else, such as one of the methods suggested above. I think if you do that, you will find that the FMOD limiter and compressor will be more useful for you.

I’m just a MIDI hobbyist and was too busy that I haven’t touched it for a while.
I don’t have a good memory and any music software installed on my PC currently, so I can’t list the exact compressors and limiters I used to use here.

But what I can tell you for now is, DAW and audio plug-ins must support real-time processing.
I started writing songs using MIDI in 2000, and I’ve spent a lot of money to achieve real-time performance like any other MIDI user.
For example, we bought expensive 10000 RPM SCSI HDDs when 5400 RPM IDE HDDs were normal in the early 2000s, we needed ASIO cards to achieve low latency, etc.

DAW isn’t linear audio editing software, unlike Adobe Audition.
We need to record, edit, and monitor in real time.
And many musicians like YouTuber Pianodownloads practice their instruments using DAW or virtual instruments, and some artists like Billy Joel even use them in their concerts.

So yes, any audio plug-ins in DAWs and virtual instruments can be and need to be used in real-time.
And many of them offer real-time audio effects including limiter and compressor.
Examples are Cubase, Cakewalk, and Kontakt.
Omnisphere 2 also offers the Tube Limiter and its product page says: “Range: 0.1ms ~ 400 ms”.

Oh, I just remembered one software with a built-in limiter.

piano

As you can see from the screenshot, this virtual piano has a built-in limiter at the master output.
As you know, a grand piano’s dynamic range is very wide.
So pops and clicks can easily be heard from amateurishly recorded piano performances on YouTube.
And recent virtual piano samples are really big and have very high energy just like real grand pianos.
So when playing these virtual pianos without any limiter or compressor on, audio clipping will likely occur.

While I appreciate your tips above and will follow them whenever possible, I disagree with your opinions about the FMOD’s built-in limiter and compressor.
They really need improvements.
If they were plug-ins for DAW software, all musicians would call them useless…
Don’t get me wrong.
As I always say, I really love FMOD and it’s the best audio API.
Also, the supports from the FMOD team are always awesome.
The only weaknesses are those DSPs, I think.

Thank you for the plugin recommendations- I will give them a shot and see if I can determine what they are doing differently to avoid these clicks and pops. I have added a task to our backlog to assess our compressor implementation and see how it can be improved. Thank you for the feedback!

1 Like