Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AudioStreaming/Streaming/AudioPlayer/AudioPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ open class AudioPlayer {
}

deinit {
// The IO thread keeps pulling from the render callback until the hardware is stopped,
// so stop it before the buffers it renders into are freed.
player.auAudioUnit.stopHardware()
audioEngine.stop()
playerContext.audioPlayingEntry?.close()
clearQueue()
rendererContext.clean()
Expand Down