I have an AVAudioPlayerNode
object that is linked with an AVAudioEngine
. I used the schedule method to load them in the queue. How can I know the state of the playback and when a single file start and finish to play?
This is the code I use for scheduling :
playerNode.scheduleFile(file, at: audioTime) {
// Completion
}