# Unity 3D android audio problem

**URL:** <https://qa.fmod.com/t/unity-3d-android-audio-problem/11842>\
**Category:** Unity\
**Created:** [March 3, 2015, 9:16pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842 "2015-03-03T21:16:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeppeProduction](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@PeppeProduction](https://qa.fmod.com/u/PeppeProduction)\
**Post date:** [March 3, 2015, 9:16pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/1 "2015-03-03T21:16:31Z")

</div>

Hello, today I have downloaded FMOD Studio for the first time, I tried to make a car engine, everything perfect but only one problem, loading it on Unity 3D (windows) I have encountered this problem:

in this video you can see the result on Unity Editor and Android Devices.

any help is well accepted.  
Regards, Joseph.

---

<div class="post-metadata">

**Author:** ![meizi.games](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@meizi.games](https://qa.fmod.com/u/meizi.games)\
**Post date:** [March 4, 2015, 1:10pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/2 "2015-03-04T13:10:17Z")

</div>

> [@](#):
>
> Hello, today I have downloaded FMOD Studio for the first time, I tried to make a car engine, everything perfect but only one problem, loading it on Unity 3D (windows) I have encountered this problem:
> 
> in this video you can see the result on Unity Editor and Android Devices.  
> [https://www.youtube.com/watch?v=UNio7GjAvRU&feature=youtu.be](https://www.youtube.com/watch?v=UNio7GjAvRU&feature=youtu.be)
> 
> any help is well accepted.  
> Regards, Joseph.

I’m experiencing the very same effect with OnePlus One -android devices. Sound crackles & plays at very slow tempo. Any solutions yet? I’m using 1.05.12 version of fmod unity integration plugin

---

<div class="post-metadata">

**Author:** ![meizi.games](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@meizi.games](https://qa.fmod.com/u/meizi.games)\
**Post date:** [March 5, 2015, 12:47pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/3 "2015-03-05T12:47:43Z")

</div>

one plus is running cyanogenmod i believe? might this be the cause for the sound problem

---

<div class="post-metadata">

**Author:** ![PeppeProduction](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@PeppeProduction](https://qa.fmod.com/u/PeppeProduction)\
**Post date:** [March 5, 2015, 1:57pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/4 "2015-03-05T13:57:57Z")

</div>

I also have CyanogenMod on my Galaxy S2

---

<div class="post-metadata">

**Author:** ![meizi.games](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@meizi.games](https://qa.fmod.com/u/meizi.games)\
**Post date:** [March 5, 2015, 2:56pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/5 "2015-03-05T14:56:47Z")

</div>

any word from FMOD-developers on this? any kind of workarounds are very welcome since cyanogenmod is pretty popular

edit: now i’m using 1.05.13 and problem persists

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [March 4, 2015, 12:58am UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/6 "2015-03-04T00:58:45Z")

</div>

It sounds like you’re hitting 100% CPU. Try using the FMOD Studio profiling tools.

---

<div class="post-metadata">

**Author:** ![PeppeProduction](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@PeppeProduction](https://qa.fmod.com/u/PeppeProduction)\
**Post date:** [March 4, 2015, 8:34am UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/7 "2015-03-04T08:34:41Z")

</div>

I do not think I’m using 100% CPU I also put a fps counter and are stable at 60 fps,  
I do not know how to use FMOD Studio profiling tools.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 10, 2015, 9:34pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/8 "2015-03-10T21:34:56Z")

</div>

> [@](#):
>
> I do not think I’m using 100% CPU I also put a fps counter and are stable at 60 fps,  
> I do not know how to use FMOD Studio profiling tools.

For details about using the Studio profiler: [https://fmod.desk.com/customer/portal/articles/1595901-getting-started-with-studio-s-profiler](https://fmod.desk.com/customer/portal/articles/1595901-getting-started-with-studio-s-profiler)

---

<div class="post-metadata">

**Author:** ![mvasiliy](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mvasiliy](https://qa.fmod.com/u/mvasiliy)\
**Post date:** [March 11, 2015, 4:50pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/9 "2015-03-11T16:50:22Z")

</div>

The same problem on HTC Sensation (4.0.3 stock) and Galaxy S2 (CyanogenMod)

---

<div class="post-metadata">

**Author:** ![mvasiliy](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mvasiliy](https://qa.fmod.com/u/mvasiliy)\
**Post date:** [March 11, 2015, 6:00pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/10 "2015-03-11T18:00:47Z")

</div>

I manually set the size of the DSP buffer, 512х8 (or 1024x4) enough, at lower values the sound begins to lag. I wrote `sys.setDSPBufferSize(512, 8);` before `ERRCHECK(sys.setSoftwareFormat(outputRate, FMOD.SPEAKERMODE.DEFAULT, 0));`  
in FMOD\_StudioSystem.cs and it solved the problem. Works perfect!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [March 11, 2015, 9:17pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/11 "2015-03-11T21:17:24Z")

</div>

> [@](#):
>
> I manually set the size of the DSP buffer, 512х8 (or 1024x4) enough, at lower values the sound begins to lag. I wrote `sys.setDSPBufferSize(512, 8);` before `ERRCHECK(sys.setSoftwareFormat(outputRate, FMOD.SPEAKERMODE.DEFAULT, 0));`  
> in FMOD\_StudioSystem.cs and it solved the problem. Works perfect!

Glad to hear that worked for you, that was going to be my next suggestion.

---

<div class="post-metadata">

**Author:** ![meizi.games](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@meizi.games](https://qa.fmod.com/u/meizi.games)\
**Post date:** [March 12, 2015, 7:12am UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/12 "2015-03-12T07:12:45Z")

</div>

didn’t work on OnePlus One devices. Going to do some more testing and post results

---

<div class="post-metadata">

**Author:** ![mvasiliy](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mvasiliy](https://qa.fmod.com/u/mvasiliy)\
**Post date:** [March 12, 2015, 7:46am UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/13 "2015-03-12T07:46:05Z")

</div>

Niko Koski, try this file instead of the strandart FMOD\_StudioSystem.cs [https://drive.google.com/file/d/0By0Twmu0pmoiRDBtbVVyVjhDeGM/view?usp=sharing](https://drive.google.com/file/d/0By0Twmu0pmoiRDBtbVVyVjhDeGM/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![mvasiliy](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mvasiliy](https://qa.fmod.com/u/mvasiliy)\
**Post date:** [March 12, 2015, 10:53am UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/14 "2015-03-12T10:53:48Z")

</div>

On Galaxy S2 (CyanogenMod) DSP buffer size 1024x4 works perfect. With 512x8 lags remained.

---

<div class="post-metadata">

**Author:** ![meizi.games](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@meizi.games](https://qa.fmod.com/u/meizi.games)\
**Post date:** [March 12, 2015, 2:08pm UTC](https://qa.fmod.com/t/unity-3d-android-audio-problem/11842/15 "2015-03-12T14:08:33Z")

</div>

yeah 1024x4 worked, thx a lot guys
