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.