I used an AVAudioPlayer object to control playing multiple music files. I also created an UISlider to control seeking file. But i have a problem when seek the pointer. After seeking, AVAudioPlayer update time correct then jump into "audioPlayerDidFinishPlaying" function unexpected. Here is the code that i used :
-(void)timeChange
{ _player.currentTime = _timeControl.value; [self updateCurrentTimeForPlayer]; }
-(void)updateCurrentTimeForPlayer
{ if(_isNeedUpdate == NO) return; _timeControl.maximumValue = _player.duration; }