1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Removes dangling OpenGL reference, attempts to ensure audio handover upon a machine change.

This commit is contained in:
Thomas Harte 2021-05-08 14:42:43 -04:00
parent 4db792591a
commit c2ff64c1e0

View File

@ -223,10 +223,6 @@ class MachineDocument:
setupActivityDisplay() setupActivityDisplay()
machine.delegate = self machine.delegate = self
// Callbacks from the OpenGL may come on a different thread, immediately following the .delegate set;
// hence the full setup of the best-effort updater prior to setting self as a delegate.
// scanTargetView.delegate = self
scanTargetView.responderDelegate = self scanTargetView.responderDelegate = self
// If this machine has a mouse, enable mouse capture; also indicate whether usurption // If this machine has a mouse, enable mouse capture; also indicate whether usurption
@ -270,9 +266,9 @@ class MachineDocument:
self.machine.audioQueue = nil self.machine.audioQueue = nil
self.audioQueue = CSAudioQueue(samplingRate: Float64(selectedSamplingRate), isStereo:isStereo) self.audioQueue = CSAudioQueue(samplingRate: Float64(selectedSamplingRate), isStereo:isStereo)
self.audioQueue.delegate = self self.audioQueue.delegate = self
self.machine.audioQueue = self.audioQueue
self.machine.setAudioSamplingRate(Float(selectedSamplingRate), bufferSize:audioQueue.preferredBufferSize, stereo:isStereo)
} }
self.machine.audioQueue = self.audioQueue
self.machine.setAudioSamplingRate(Float(selectedSamplingRate), bufferSize:audioQueue.preferredBufferSize, stereo:isStereo)
} }
} }