From 5d0584059c0d14aba85322deda579699440446f1 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 5 Mar 2024 17:24:47 +0000 Subject: [PATCH] CoreAudio: No longer consider a device stopping to be a failure The device may need to stop because it is about to restart with new settings. e.g. When the DemoRunner is started while the microphone is set to 44.1KHz and the speakers are set to 48KHz in Audio MIDI Settings, one of the devices must be restarted in order for the AudioDeviceCombiner to work. In this situation, stopping one device shouldn't count as an error, because the device will be started again with new, compatible, settings. --- modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp index 7124e408dc..01992c07f4 100644 --- a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp +++ b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp @@ -2065,7 +2065,8 @@ private: if (target != nullptr) target->audioDeviceStopped(); - error = true; + // The audio device may stop because it's about to be restarted with new settings. + // Stopping the device doesn't necessarily count as an error. } void audioDeviceError (const String& errorMessage) override