From dcd0c90283925adfba4ac70af4e3d962054f5c6e Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 26 Feb 2017 21:58:43 -0500 Subject: [PATCH] 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. --- OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index 995e35027..38a0f312e 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -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!) {