Audio popping in Android build

Hi everyone,

I’m working on a project that has iOS and Android releases and we’ve come across an issue that seems to be affecting only the Android build. Our app is pretty big and to help save space we’re using pretty heavily compressed mp3 files for the background music - most of them are 64kbps. They sounded clean when we put them together and they sound clean on an iPad and iPod Touch (4th Gen) but for some reason we hear a lot of popping and crackling on both the Kindle Fire and Nook Color. Has anyone run into anything like this? Is this a Unity issue? Any suggestions? I know we could use a higher bitrate, but the Nook Store has a 50 megabyte limit and we’re already right up against it.

Thanks!

I was also experiencing this issue on my current project. I resolved it by:

  1. Going to Edit > Project Settings > Audio
  2. Changing ‘Default Speaker Mode’ from ‘Mono’ to ‘Stereo’

Hope this helps.

Kindle Fire audio bug

There is a constant cracking/popping noise that sounds like a bit like static. This sound is emitted every 0.4~0.5 seconds and there is a distinct pattern (it is not random but instead seems cyclical)

It is really detracting from our user’s experience as we have music playing 99% of the time.

The fix posted above did not resolve the issue.

Playing the same audio files directly on the devices doesn’t generate that noise. It seems to be a Unity problem.

This is coming from a noob, but for testing purposes try adding something like a blank scene without anything but a button to let you proceed into the actual game . Run this first- in my own game I noticed that Unity needs more time then it allocates for load to load of of its data in memory .

@KevinJohnson25: I implemented an AudioFader and delayed the destruction of some game objects that contains AudioSources in order to avoid popping noises when objects get destroyed. For the Kindle specific issue: I couldn’t do anything for that one because it affects even the background music track.

YES, this bug affects iOS as well. For us it is tied to large resources being unloaded (ours are 1024x1024 textures) during the Resources.UnloadUnusedAssets(). It sucks. I had to implement a fader as well, but I really wish that Unity would make it a priority. There’s no reason that we shouldn’t be able to use asynchronous unloading of resources on a separate thread that doesn’t block the audio thread. The slower the CPU the more apparent the issue (iPad 2 barely pops, and I think PCs actually use multithreaded audio playback).

(Here’s a thread link) that shows how I implemented around this per advice from the thread. Script included, simple and to the point. If you have any questions, PM me.

The issue is described in the thread and solved.

JS