diff --git a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp index 205d61f65e..634ac6daf8 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp @@ -683,10 +683,14 @@ public: { const ScopedLock sl (callbackLock); + if (callback == nullptr && callbackToNotify != nullptr) + { + callback = callbackToNotify; + callback->audioDeviceAboutToStart (&owner); + } + if (! started) { - callback = nullptr; - if (deviceID != 0) { if (OK (AudioDeviceCreateIOProcID (deviceID, audioIOProc, this, &audioProcID))) @@ -702,14 +706,6 @@ public: } } } - - if (started) - { - callback = callbackToNotify; - - if (callback != nullptr) - callback->audioDeviceAboutToStart (&owner); - } } playing = started && callback != nullptr;