hello all,
in my app i use AudioToolbox framework and i need to play a loop can i ?
this is the AVAudioplayer code that goes slowly with 2 touches simultaneously
- (AVAudioPlayer *)getNoteFromFilename:(NSString *)name andoftype:(NSString *)type{
NSString *soundPath = [[NSBundle mainBundle] pathForResource:name
ofType:type];
NSURL *fileURL = [NSURL fileURLWithPath:soundPath];
AVAudioPlayer *note = [[[AVAudioPlayer alloc] initWithContentsOfURL:fileURL
error:nil] autorelease];
return note;
}
in the viewdidload
ViewDidLoad {
self.Note = [self getNoteFromFilename:@"Note" andoftype:@"wav"];
}
calling it by this in IBAction :
[Note prepareToPlay];
[Note play];
NB: i have retaind all the button and the AVAudioPlayer