This commit is contained in:
2026-04-09 13:04:42 +02:00
parent ddfc674453
commit c5d3ca5d7a
5 changed files with 27 additions and 20 deletions

View File

@@ -196,18 +196,18 @@
(define (ao_pause_async shm pause)
(if pause
(begin
(displayln "Pausing ao play thread")
(dbg-sound "Pausing ao play thread")
(os-semaphore-wait (ao-shm-pause-sem shm))
(displayln (format "Setting pause now to ~a" pause))
(dbg-sound "Setting pause now to ~a" pause)
(mutex-lock (ao-shm-mutex shm))
(set-ao-shm-paused! shm pause)
(mutex-unlock (ao-shm-mutex shm)))
(begin
(displayln (format "Continuing ao play thread, now setting pause to ~a" pause))
(dbg-sound "Continuing ao play thread, now setting pause to ~a" pause)
(mutex-lock (ao-shm-mutex shm))
(set-ao-shm-paused! shm pause)
(mutex-unlock (ao-shm-mutex shm))
(displayln "Posting semaphore twice, one to let play thread continue, one for own use")
(dbg-sound "Posting semaphore twice, one to let play thread continue, one for own use")
(os-semaphore-post (ao-shm-pause-sem shm))
(os-semaphore-post (ao-shm-pause-sem shm))
)