From 9fd393b64e2034d896827c8c71236a8eeac09582 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 12 Feb 2025 19:00:52 -0800 Subject: [PATCH] Audio Output: Set higher priority on output thread It's more like the output monitor thread, since it only monitors output, rather than actually handing the output callbacks. Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index ee9f964a2..72bc65e35 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -280,6 +280,12 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons } - (void)threadEntry:(id)arg { + @autoreleasepool { + NSThread *currentThread = [NSThread currentThread]; + [currentThread setThreadPriority:0.75]; + [currentThread setQualityOfService:NSQualityOfServiceUserInitiated]; + } + running = YES; started = NO; shouldPlayOutBuffer = NO;