From b08de34bf0da9d2bea19917cdea50eb77b159b78 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 7 Mar 2025 23:44:24 -0800 Subject: [PATCH] Core Audio: Shut off device after fade out And resume playback before fade in. Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index 1b43c9b13..7fc1b12b0 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -169,6 +169,13 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons rendered = NO; } + if(faded && !paused) { + resetting = YES; + [self pause]; + started = NO; + resetting = NO; + } + if(!started && !paused) { // Prevent this call from hanging when used in this thread, when buffer may be empty // and waiting for this very thread to fill it