pause behavior

This commit is contained in:
2026-05-07 14:50:24 +02:00
parent debabf5151
commit 0563e77130
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -765,12 +765,16 @@
)
(define (ao_pause_async h paused)
(dbg-sound "ao_pause_async ~a" paused)
(sync-log-sound)
(if (ao-handle-paused h)
(when (eq? paused #f)
(mutex-unlock (ao-handle-pause-mutex h))
(set-ao-handle-paused! h #f)
)
(when (eq? paused #t)
(dbg-sound "locking pause mutex")
(sync-log-sound)
(mutex-lock (ao-handle-pause-mutex h))
(set-ao-handle-paused! h #t)
(dbg-sound "paused")
+1
View File
@@ -179,6 +179,7 @@
(rc:define/contract (ao-pause handle pause)
(rc:-> ao-handle? boolean? void?)
(dbg-sound "ao-pause ~a" pause)
(sync-log-sound)
(ffi:ao_pause_async (ao-handle-async-player handle) (if (eq? pause #f) 0 1))
)