0

I am making an app that records users sound and plays it back to them in high pitch. (like a chipmunk). This is for iOS 5.0 or above with Xcode 4.6

This question has been asked here before

Record the sound and play it back with changed pitch

What I wanted to know is that is there any apple out of the box apis / functions / settings that I can use with AVAudioRecorder or AVAudioPlayer to change the pitch of recorded sound? I hate to add an external DIRAC library if I don't have to.

Community
  • 1
  • 1
Sam B
  • 27,273
  • 15
  • 84
  • 121

1 Answers1

1

Not AVAudioRecorder, but AVAudioPlayer has a rate property which allows you to play things back at up to 2x. Can't say if that will sound sufficiently like a chipmunk though.

Lewis Gordon
  • 1,711
  • 14
  • 19
  • I used the AVAudioPlayer rate option but it has no effect. See code above – Sam B Jun 06 '13 at 16:55
  • Missed that, but the docs say that the rate only goes up to 2.0. – Lewis Gordon Jun 06 '13 at 17:00
  • i tried all number between 0.1 - 2.0 and nothing works. Not sure what is it? There is another post with the same problem http://stackoverflow.com/questions/11131631/avaudioplayer-rate I tried all the answers there too – Sam B Jun 06 '13 at 17:05
  • Needed to add audioPlayer.rate=2.0f; (float) – Sam B Jun 06 '13 at 17:21