iPhone pitch not working?

Okay so here's my code in the update function

   if (sound.isPlaying && stopping == true)
        sound.pitch = sound.pitch-0.01;
        if (sound.pitch <= 0.1)
            sound.pitch = 1;
            stopping = false;

A function is called which makes stopping = true. Then, for every frame, the pitch is reduced to 0.01. When the pitch is less than 0.1, it stops.

On the player inside Unity it works fine. In the iPhone however, the pitch does not change at all, but the music stops when it should. It's as if the pitch value is changing but not affecting the music.

Is this a limitation of compressed music on the iPhone?


Correct, compressed music played back through hardware does not have support for changing pitch. (As an aside, reducing pitch by .01 per frame makes your code framerate-dependent; you should use Time.deltaTime.)