Weird uncompressed audio problem

We are experiencing a strange problem when playing uncompressed audio in our in-game scene. These are mostly very short .wav PCM 44.1 stereo audio samples however sometimes when we run the game they play back at the incorrect pitch! It seems to change intermittently (i.e. within the same scene) one minute the audio is playing with the correct pitch, the next time we play it its an octave higher or lower. This only happens when playing on the iphone / never happens within unity.

It seems that when one of the samples goes pitch crazy, usually one or all of the other samples in the scene follow suit. Its almost as if there is a global pitch value for all audio clips that is being set at random.

Just in case we are doing something silly, here is how we are playing these sounds.

First we add an empty game object to the scene, we add the AudioSource component to this game object and drag the sample asset into the ‘Audio Clip’ property. We disable ‘play on awake’ and pitch is set to 1. Within script we trigger the sounds during play via the following calls on these game objects.

emptyObjectWithAudioBeep.audio.Play()
emptyObjectWithAudioSwoosh.audio.Play()
…

Help greatly appreciated.

Submit a bug report please with your project attached

Checked your Speed Of Sound and Doppler Factor in Project Settings>Audio? These are global values and can make the audio sound very wonky if you mess with them.

We are experiencing the same bug. After some time, sounds are raised in pitch by various amounts, but usually about a semitone. This occurs on iPod and iPad that we have noticed. It’s hard to reproduce.

Unity, we’d need an NDA from you before we sent a project.

Contact support@unity3d.com to arrange this before submitting the bug report.