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 <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-02-13 02:23:44 -08:00
parent fb5c23461d
commit 061eefee29

View file

@ -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];
}