From fab4d3705e45132335a06f9b8b78a9ed05fb80f9 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 7 Mar 2025 20:14:29 -0800 Subject: [PATCH] Bug Fix: Prevent hangs when starting paused This happens when the player is resumed paused, sometimes near the end of a track. Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index 0ccee72cf..237634c4b 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -170,7 +170,11 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons } 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 + resetting = YES; [self resume]; + resetting = NO; } if([outputController shouldContinue] == NO) {