From 061eefee29ebf1d8361220aec3c1af3f42b8e37e Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 13 Feb 2025 02:23:44 -0800 Subject: [PATCH] Audio Node: Revert timedWait usage Timed wait for 500us is kind of stupid and makes the threads wake up way too much, and use way more CPU time. Reduce this, as the semaphores are signaled appropriately, and the waiter should not wake up constantly. Signed-off-by: Christopher Snowhill --- Audio/Chain/Node.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Audio/Chain/Node.m b/Audio/Chain/Node.m index a63b86f9f..6807a95f8 100644 --- a/Audio/Chain/Node.m +++ b/Audio/Chain/Node.m @@ -81,7 +81,7 @@ while(shouldContinue == YES && durationLeft <= 0.0) { if(durationLeft <= 0.0 || shouldReset) { [accessLock unlock]; - [semaphore timedWait:500]; + [semaphore wait]; [accessLock lock]; } @@ -115,7 +115,7 @@ if(durationLeft <= 0.0 || shouldReset) { [accessLock unlock]; - [semaphore timedWait:500]; + [semaphore wait]; [accessLock lock]; }