So, I'm trying to play the sound file differently in iOS 5.1.1, and I was completely out of luck. So far, I have tried to set the speed of AVAudioPlayer:
player = [[AVAudioPlayer alloc] initWithContentsOfURL:referenceURL error:&error]; player.enableRate = YES; player.rate = 1.5; player.numberOfLoops = 0; player.delegate = self; [player prepareToPlay]; [player play];
no luck at all, the sound is reproduced, but simply ignores the speed that I give him. I also tried AVPlayer:
avPlayer = [[AVPlayer alloc] initWithURL:referenceURL]; avPlayer.rate = 0.5; [avPlayer play];
Again, he plays, but simply ignores the speed I set. I tried several different audio files, but for the sake of this topic, I chose Rooster-mono.wav from this directory: http://sig.sapp.org/sounds/wave/
Has anyone had success in changing the playback speed on iOS 5.1.1? Or does anyone know what I'm missing here?
I am doing this in order to slightly change the pitch of some of my samples, I understand that I can do this using RemoteIO or something like that, but this seems like a complete excess for what I'm trying to achieve (simple adjustment of playback speed).
source share