1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-03 11:30:02 +00:00

Switched time of best-effort updater delegate setting, to avoid a callback before setupClockRate has happened, and therefore before it's clear what should be going on with audio.

This commit is contained in:
Thomas Harte 2017-02-26 21:58:43 -05:00
parent 0273860018
commit b24cd00a39

View File

@ -56,7 +56,6 @@ class MachineDocument:
self.machine.delegate = self
self.bestEffortUpdater = CSBestEffortUpdater()
self.bestEffortUpdater.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
@ -68,6 +67,9 @@ class MachineDocument:
// bring OpenGL view-holding window on top of the options panel
self.openGLView.window!.makeKeyAndOrderFront(self)
// start accepting best effort updates
self.bestEffortUpdater.delegate = self
}
func machineDidChangeClockRate(_ machine: CSMachine!) {