Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

electronica

macrumors newbie
Original poster
Sep 24, 2011
17
0
hmm is there any easy way to check if the playing audio is finished?

i need to call a method when the audio is finished playing.
 
ok, sorry
this is my code, and when the mp3 file is finished playing, than i want to call ileri method again. thats all.
Code:
-(IBAction)ileri
{
    
NSString *path = [[NSBundle mainBundle] pathForResource:[sesarray objectAtIndex:deger - 1] ofType:@"mp3"];                       
theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];   
theAudio.delegate = self;                                                                           
[theAudio setVolume:2.0];
    
[theAudio play];
    }    
}
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.