From 22a41e71d3daa4f9f263404adf0e0994b4ee14af Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 10 Jun 2022 15:20:07 -0700 Subject: [PATCH] [Audio Threads] Add further safety gating on error Errors should stop all attempts to further use the audio thread priority code, so there won't be debug breakpoints called on older OSes. Signed-off-by: Christopher Snowhill --- Audio/Chain/Node.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Audio/Chain/Node.m b/Audio/Chain/Node.m index 7e96ec344..912a918c8 100644 --- a/Audio/Chain/Node.m +++ b/Audio/Chain/Node.m @@ -227,6 +227,7 @@ BOOL SetPriorityRealtimeAudio(mach_port_t mach_thread_id) { DLog(@"Thread already in workgroup"); } else { DLog(@"Cannot join workgroup, error %d", result); + isRealtimeError = YES; } } } @@ -255,6 +256,7 @@ BOOL SetPriorityRealtimeAudio(mach_port_t mach_thread_id) { int result = os_workgroup_interval_start(wg, currentTime, deadline, nil); if(result != 0) { DLog(@"Deadline error = %d", result); + isRealtimeError = YES; } } } @@ -266,6 +268,7 @@ BOOL SetPriorityRealtimeAudio(mach_port_t mach_thread_id) { int result = os_workgroup_interval_finish(wg, nil); if(result != 0) { DLog(@"Deadline end error = %d", result); + isRealtimeError = YES; } } }