How do I create a pitch slider for a sound sample in xcode 5 for iOS 7?
So I want to have a sound that I can play and a slider that will let me
change the pitch of the sample. What is the easiest way to accomplish
this?
-(IBAction)Sound{
NSString *path = [[NSBundle mainBundle] pathForResource:@"sound"
ofType:@"wav"];
AVAudioPlayer* theAudio = [[AVAudioPlayer alloc]
initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
[theAudio play];
}
I suppose the audio could be looping and I could be changing the pitch in
realtime.
No comments:
Post a Comment