pause behavior
This commit is contained in:
@@ -765,12 +765,16 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(define (ao_pause_async h paused)
|
(define (ao_pause_async h paused)
|
||||||
|
(dbg-sound "ao_pause_async ~a" paused)
|
||||||
|
(sync-log-sound)
|
||||||
(if (ao-handle-paused h)
|
(if (ao-handle-paused h)
|
||||||
(when (eq? paused #f)
|
(when (eq? paused #f)
|
||||||
(mutex-unlock (ao-handle-pause-mutex h))
|
(mutex-unlock (ao-handle-pause-mutex h))
|
||||||
(set-ao-handle-paused! h #f)
|
(set-ao-handle-paused! h #f)
|
||||||
)
|
)
|
||||||
(when (eq? paused #t)
|
(when (eq? paused #t)
|
||||||
|
(dbg-sound "locking pause mutex")
|
||||||
|
(sync-log-sound)
|
||||||
(mutex-lock (ao-handle-pause-mutex h))
|
(mutex-lock (ao-handle-pause-mutex h))
|
||||||
(set-ao-handle-paused! h #t)
|
(set-ao-handle-paused! h #t)
|
||||||
(dbg-sound "paused")
|
(dbg-sound "paused")
|
||||||
|
|||||||
@@ -179,6 +179,7 @@
|
|||||||
(rc:define/contract (ao-pause handle pause)
|
(rc:define/contract (ao-pause handle pause)
|
||||||
(rc:-> ao-handle? boolean? void?)
|
(rc:-> ao-handle? boolean? void?)
|
||||||
(dbg-sound "ao-pause ~a" pause)
|
(dbg-sound "ao-pause ~a" pause)
|
||||||
|
(sync-log-sound)
|
||||||
(ffi:ao_pause_async (ao-handle-async-player handle) (if (eq? pause #f) 0 1))
|
(ffi:ao_pause_async (ao-handle-async-player handle) (if (eq? pause #f) 0 1))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user