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

electronica

macrumors newbie
Original poster
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.
 
Perhaps you could explain, in detail, how you started the audio playing in the first place.
 
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.