2010-01-26 11 views

Répondre

1

Check out code suivant est un exemple simple AVAudioPlayer et son travail sur le simulateur iPhone trop ..

AVAudioPlayer * Audioplayer;

NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/azan1.mp3", [[NSBundle mainBundle] resourcePath]]]; 

NSError *error; 
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]; 
audioPlayer.numberOfLoops = -1; 

[audioPlayer play];