# The result of Oboe Tester

**URL:** <https://qa.fmod.com/t/the-result-of-oboe-tester/16677>\
**Category:** FMOD Engine\
**Tags:** android\
**Created:** [January 20, 2021, 9:37pm UTC](https://qa.fmod.com/t/the-result-of-oboe-tester/16677 "2021-01-20T21:37:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiyongman](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jiyongman](https://qa.fmod.com/u/jiyongman)\
**Post date:** [January 20, 2021, 9:37pm UTC](https://qa.fmod.com/t/the-result-of-oboe-tester/16677/1 "2021-01-20T21:37:11Z")

</div>

I tested my device with **Oboe Tester** for hours, and yes, I noticed the same issue.  
Had the problem with **AAudio** but no problem with **OpenSL ES** just like my app.  
Also, whenever the noise came up, I could make it disappear by turning **Wi-Fi** off.

So, it has nothing to do with **FMOD**?  
Well, I think **FMOD** should be able to deal with these edge cases too.  
I found that it’s the buffer size.  
When the **Wi-Fi** related noise occurred, increasing the buffer size could remove it.

The buffer size value recommended by the **Android audio team** for low-latency is ’ **burst \* 2**', and I think **FMOD** does the same thing internally.  
And I believe, you know the burst size varies depending on the API settings.

Using **OpenSL ES** (instead of **AAudio** ), non-native sample rate, **POWER\_SAVING** mode increases the burst size.  
Thanks to **Oboe Tester** , I found that the noise issue occurred only when the burst size was the lowest.  
In my case with **Galaxy S10 Plus** , the noise occurred when the burst size was **96** , and no noise when it was **192** or above.  
To be more clear, when the burst size was 96, I needed to increase the buffer size to at least 288 (which is **96 \* 3** ), but when it was 192, I could just use 192 (which is **192 \* 1** ).  
I don’t know why, but that’s how it went.  
By the way, if **Wi-Fi** is off, I can use the buffer size of 192 (which is **96 \* 2** ) even with the burst size of 96.

You are confused by what I’m saying?  
I’m attaching [here](https://drive.google.com/file/d/16ZrjS8pWRaCli8zYD5sQt5VPS7C4Pgf-/view?usp=sharing) the screenshots of **Oboe Tester** for you.  
a. Options in the **red** boxes were set once and untouched throughout the test.  
b. Options in the **green** box (MMAP, Exclusive, Effect) are what I was focusing on.  
c. The option in the **blue** box (bufferSize) was first set to 1 and increased until no noise was heard only when the noise occurred.

**MMAP | Exclusive | Effect | bufferSize**  
[ON | ON | ON | 1](https://drive.google.com/file/d/1wqSrgTz6sRmgmEZTXbwS0l2ouGTWvpXC/view?usp=sharing)  
[ON | off | ON | 1](https://drive.google.com/file/d/1fB-MVEH-BEzoG_ISfv11Aiiv7cJt-YX0/view?usp=sharing)  
[off | ON | ON | 1](https://drive.google.com/file/d/1LDOVKrjGdm1A-1E3c8yrTTF_y9ISIfPg/view?usp=sharing)  
[off | ON | off | 1](https://drive.google.com/file/d/1hELm53rmr7GjAuBvZP7GeKPPq5MNLYcM/view?usp=sharing)  
[off | off | ON | 1](https://drive.google.com/file/d/1a4qXFmWYwQg5-uFlljpPs4BxXP1zydgH/view?usp=sharing)  
[off | off | off | 1](https://drive.google.com/file/d/12QevYvbCFnAr5bNe9zjRZ5DFSso6do7Y/view?usp=sharing)  
[ON | ON | off | 3](https://drive.google.com/file/d/1A2vcJB8qnz8-6D5huh5G8T1Ic8cTLgtU/view?usp=sharing)  
[ON | off | off | FAIL](https://drive.google.com/file/d/1AO_NsUTTTr-qkAtMzUggReWlQdaZMTHS/view?usp=sharing)

You can click each one to view details like burst size.  
bufferSize above means the value of the bufferSize option which could remove the noise.  
The **FAIL** one is what I was struggling with.  
Sometimes the value of **3** fixed the problem, but other times even the maximum buffer size didn’t do anything.  
So I think I need some more tests with it.  
Anyway, those last two had the lowest burst size and required more buffer size.

In the beginning, I said **FMOD** should be able to deal with the edge cases.  
As you can see from the screenshots, **Oboe Tester** provides the buffer size option and we can adjust it at runtime.  
And as explained [here](https://youtu.be/tWBojmBpS74?t=2050), **Oboe** provides **LatencyTuner** which automatically increases the buffer size when underrun occurs.  
If I’m not wrong, **FMOD** uses **AAudio** and **OpenSL ES** directly rather than **Oboe**.  
So your team may need to implement a similar thing.  
(Or better thing, because the **Oboe** developer said [here](https://youtu.be/tWBojmBpS74?t=3091), two years ago, **LatencyTuner** at the moment only increases but doesn’t decrease back again.)

As seen in the screenshots, **CPU** usage was 1~2% the whole time.  
I don’t get why **Wi-Fi** creates noise and don’t know whether it’s **AAudio**'s issue or **Samsung**'s.  
Do you know where I can talk to **Samsung**'s Android audio developers directly about this?

One more question.  
Does or will **FMOD** provide the way to get the current burst and buffer size on **Android**?

Thanks.

---

<div class="post-metadata">

**Author:** ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)\
**Post date:** [January 21, 2021, 7:48am UTC](https://qa.fmod.com/t/the-result-of-oboe-tester/16677/2 "2021-01-21T07:48:40Z")

</div>

Thanks for the information. I think we’re starting to get somewhere.

There’s something very interesting in the options - only the last 2 use the MMAP/EX pathway, every other test indicates that its using the legacy path.

FMOD does use AAudio directly - it also uses a larger default buffer size than Oboe (typically we use the initial capacity size the device returns, which might be the value oboe is showing (3072 mmaped and 1536 legacy), then double that for the capacity), and then detect xruns to see if it needs to grow that buffer.

We might have to look at detecting if the device is Samsung and switching its performance mode to NONE (so that it will avoid defaulting to MMAPed) to mitigate the issue. We’ll do some more investigation on our end to see if that makes a difference.

I also found some additional issues filed with oboe that may be related - [Noise crackles when playing Drumthumper wav sounds · Issue #1142 · google/oboe · GitHub](https://github.com/google/oboe/issues/1142) and [AAudio glitches / crackles on S8, S9 · Issue #564 · google/oboe · GitHub](https://github.com/google/oboe/issues/564)

---

<div class="post-metadata">

**Author:** ![jiyongman](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jiyongman](https://qa.fmod.com/u/jiyongman)\
**Post date:** [January 25, 2021, 3:02pm UTC](https://qa.fmod.com/t/the-result-of-oboe-tester/16677/3 "2021-01-25T15:02:40Z")

</div>

Thank you for taking your time on this issue.  
I love FMOD so much that I want to use FMOD for everything, so your efforts to make the API better like this make me happy 🙂  
Other than the noise issue, I noticed the AAudio mode (within FMOD) on my Samsung device (with Wi-Fi off) definitely worked better.  
Especially when screen recording, I had to choose AAudio over OpenSL ES for much smoother results.

Thanks again, and have a wonrderful week.
