Sound issues on Kindle Fire

Hello,

has anyone else experienced sound issues on the Kindle Fire? I hear a constant clicking noise, nearly rhythmic. Sound works fine one Nexus S and Xoom, but I had to implement a fader because stopping an AudioSource always made noise, too.

I’m importing WAV-files, 16 bit, 44100 Hz, Mono with Audio Importer setting Decompress on load.

Any help appreciated!

We too are having this issue, tried various settings in the Audio Importer. Unity 3.4.2f3, API level 8

It seems to be a Unity problem. I tested a new version of the game and the audio files sound well directly on the device, but not in the game. I’m working with Unity 3.5.0f5.

No sound issues here. Using Kndle Fire and Nexus. Same Unity version too. I have already compressed my audio to mp3 though.

Great to know! I also pre-compressed one of the files for the current release but still hear noise on the Kindle. Could you note the values of your audio settings and tell me where you attached the AudioSource to? Mine is attached as child object to the camera in one scene. Even though it’s a 2D sound, perhaps the distance to the camera could be a problem.

I’m having audio issues regardless of quality even if it is pre-compressed. It happens due to asset unloading in my case. Which sucks because my game has a LOT of asset loading and unloading going on during gameplay. When I contacted Unity about the problem they referred me to this feedback request:

http://feedback.unity3d.com/forums/15792-unity/suggestions/2380640-sound-priority

Hi (A non techie here)

We are experiencing the same issue with our apps on the Kindle Fire. The issue is Kindle Fire Specific only in our case, the apps are working fine on all other Android devices we have tested ( including the Nook color, Nook Tablet, Acer iconia, Samsung galaxy Tab, and a host of android phones), as well as working fine on iOS, Mac and PC builds

Our Apps “Universal Breathing - Pranayama” And “Core Yoga” both have popping sounds on the kindle fire. These sounds occur once at the beginning whenever a new music segment is played, our apps generate their sounds by stitching and looping segments of music. Since in a 2.5 second period we stitch 3 segments of music together it makes for a lot of “popping” sounds on the kindle fire and a poor user experience.

I’m having a similar issue with audio on Android.

I play a clip (OnAwake) and when the object is destroyed there is a “POP” sound. I’ve tried stopping the audio, muting the audio (same as setting *.volume = 0.0; ) to no avail.

I’m using Unity 3d/Android Pro, latest version 3.5.

I really need to fix this issue, but everything I’m trying is not helping at all.

I think the best you could do is to manually do a stair step fade using a coroutine before destroying the object completely. I doubt that this issue is specific to the Kindle.

Wouldn’t that result in the same basic thing as setting it to mute? Fading (in the end) just reduces the volume. Or am I missing another reason why step-fading would be better?

Thanks for the response!

A ‘pop’ is a sharp transition. So for example if the signal was at 1.0f and you stop and it immediately goes to 0.0f. Depending on how the internals are set up, mute should trigger a ramp (fade out) which would be just as good, the important thing is to make sure it has time to process that mute (at least a couple of frames). Step fading is always inferrior but it’s all you can do from outside the mixer, I think calling mute would probably be a better way to go it if it works.

OK, I see your logic now. I am muting just before the destruction, so I’ll try to break the audio from the main object and split it from the parent just before the destruct call; then give the AudioSource some time to see if it alleviates the POP sound. I’ll let you know when I get to if, if it helps.

I’m working on some Enemy AI scripts now, when done - I’ll post.

Thanks again!
JS

May also be worth trying setVolume(0) if mute doesn’t work. Let me know how it goes.

OK, your help was appreciated and did pinpoint the issue. Here’s how I implemented it.

I moved the AudioSource from the GameObject prefab into a GameObject of its own, parented under the original GameObject.

When I need to destroy a sound gracefully (without popping), I use the script below - ON the AudioSource GameObject under the original (parent) object.

The script simply checks the GameObject that it is attached to see if it is still parented. If it is, nothing is done. If you clear the parenting of the AudioSource GameObject from the parent, the script will fade out and destroy the object the audio script are attached to over numerous frames (dependent on current volume / stepFactor setting) to smooth the audio destruction and alleviate the sharp volume transitions to prevent pop.

Again, thank you, help appreciated - script below to repay the community, if anyone needs it!

JS

– Script Start (javascript) –

#pragma strict

var stepFactor : float = 0.05;

private var aSource : AudioSource;

function Awake()
{
aSource = gameObject.GetComponent(AudioSource);
}

function FixedUpdate()
{
// Once we detach from our parent, we’ll fade and die without audio popping noises
if (transform.parent != null) return;

if (aSource != null) // Be sure this object actually has an audio source!
{
aSource.audio.volume -= stepFactor;

if (aSource.audio.volume > 0) return;
}
else
Debug.Log(“Object named "” + gameObject.name + “" has no AudioSource!”);

Destroy(gameObject);
}

– Script End. Enjoy!

If you use the script and you till hear audio pop, just adjust the stepFactor in the Unity GUI (Inspector view of the audio object the script is attached to). The smaller the step, the more time (and thus FixedUpdate calls) it will take to kill the audio.

Good work, I’m glad to hear that fixed your issue.

My sound sources aren’t attached to the camera. I can see it being an issue if you are destroying objects, but if it is the sound track (always on) it should play perfectly. Have you tried on another Kindle?

I do not have another Kindle to test but the music file runs fine in the Kindle’s music player. I’m testing with a simple Unity project now: no other game objects than the camera and an empty game object with the audio source attached to it, but still no luck :frowning:

Audio Format: Compressed (MPEG)
3D Sound: No
Load type: Stream from disc (but same with Decompress on load)
Compression (kbps): 128 (same as the source file that runs fine on the device)

Audio Source Priority: 0 (but same result with 128)
Play On Awake: Yes
Loop: Yes

So is it popping when you destroy the audio source?

No, it’s noise (static, crackles) while the audio is playing. Please see my first post.

Whats the specifics on the audio format you are using? Bitrate, channels, etc. etc.