I used the below code for play and pause audio
I want to pause the audio when its playing.
My problem is the pause method is called after playing the full audio.Even though i pressed the pause button while the audio is playing.
Code:
-(void) play
{
AudioServicesPlaySystemSound(clappingFileID);
}
//It will be called when pause button click
-(void) pause
{
AudioServicesDisposeSystemSoundID (clappingFileID);
}
I want to pause the audio when its playing.
My problem is the pause method is called after playing the full audio.Even though i pressed the pause button while the audio is playing.