SCNAudioplayer pause

here is how i add an audio player to a SCNNode


let audioSource = SCNAudioSource(fileNamed: nodeName)
        audioSource?.volume = 1
        audioSource?.loops = true
        audioSource?.load()
        audioSource?.isPositional = true
let audioPlayer = SCNAudioPlayer(source: audioSource!)
node.addAudioPlayer(audioPlayer)


i try to pause the audioPlayer but it doesn't


audioPlayer.audioNode?.engine?.pause()


I am trying to pause the audioPlayer because when Replaykit's alert appears (user permission) it pauses my AR scene but not my audioplayers so the sounds are out of sync with the SCNNode when the alert is dismissed.


any idea on how i can pause a SCNAudioPlayer ?

thanks

SCNAudioplayer pause
 
 
Q