paused handling
This commit is contained in:
@@ -160,7 +160,7 @@
|
|||||||
#:mutable
|
#:mutable
|
||||||
)
|
)
|
||||||
|
|
||||||
(define ao-buf-ms 50) ;; Playback buffer of 0.5s
|
(define ao-buf-ms 500) ;; Playback buffer of 0.5s
|
||||||
|
|
||||||
(define (get h ms-wait)
|
(define (get h ms-wait)
|
||||||
(let ((el (if (<= ms-wait 0)
|
(let ((el (if (<= ms-wait 0)
|
||||||
@@ -469,12 +469,14 @@
|
|||||||
(mutex-lock (ao-handle-pause-mutex h))
|
(mutex-lock (ao-handle-pause-mutex h))
|
||||||
(mutex-unlock (ao-handle-pause-mutex h))
|
(mutex-unlock (ao-handle-pause-mutex h))
|
||||||
(mutex-lock (ao-handle-clear-mutex h))
|
(mutex-lock (ao-handle-clear-mutex h))
|
||||||
(let ((elem (get h 250)))
|
(let ((if (ao-handle-paused h)
|
||||||
|
#f
|
||||||
|
(elem (get h 250))))
|
||||||
(mutex-unlock (ao-handle-clear-mutex h))
|
(mutex-unlock (ao-handle-clear-mutex h))
|
||||||
(if (eq? elem #f)
|
(if (eq? elem #f)
|
||||||
(begin
|
(begin
|
||||||
(dbg-sound "nothing in the queue")
|
(dbg-sound "nothing in the queue")
|
||||||
(sleep 0.005))
|
(sleep 0.01))
|
||||||
(begin
|
(begin
|
||||||
(if (eq? (queue-elem-command elem) 'stop)
|
(if (eq? (queue-elem-command elem) 'stop)
|
||||||
(set! go-on #f)
|
(set! go-on #f)
|
||||||
|
|||||||
Reference in New Issue
Block a user