Closed appfabtech closed 3 years ago
Yes, in this code, to check reached the end of playing by using callback,
self.audioFilePlayer.scheduleSegment(audioFile,
startingFrame: AVAudioFramePosition(0),
frameCount: AVAudioFrameCount(self.audioFile.length),
at: nil,
completionHandler: self.completion)
But calling timing is a little bit early. If you want to stop pricisely, you might be implemented interval timer see if reached end of audio file length. See
I tried your example and when I playback the last second of recorded audio is missing
Thanks