-
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
[channels #:auto #:mutable]
|
[channels #:auto #:mutable]
|
||||||
[rate #:auto #:mutable]
|
[rate #:auto #:mutable]
|
||||||
[async-player #:auto #:mutable]
|
[async-player #:auto #:mutable]
|
||||||
|
[closed #:auto #:mutable]
|
||||||
)
|
)
|
||||||
#:auto-value #f
|
#:auto-value #f
|
||||||
)
|
)
|
||||||
@@ -107,15 +108,17 @@
|
|||||||
(printf "Unexpected: cannot close ao-device"))))
|
(printf "Unexpected: cannot close ao-device"))))
|
||||||
'internally-closed)
|
'internally-closed)
|
||||||
(let ((handle-num (ao-handle-handle-num handle)))
|
(let ((handle-num (ao-handle-handle-num handle)))
|
||||||
(ao_stop_async (ao-handle-async-player handle))
|
(unless (ao-handle-closed handle)
|
||||||
(let ((ao-device (hash-ref devices handle-num #f)))
|
(set-ao-handle-closed! handle #t)
|
||||||
(if (eq? ao-device #f)
|
(ao_stop_async (ao-handle-async-player handle))
|
||||||
'error-ao-device-non-existent
|
(let ((ao-device (hash-ref devices handle-num #f)))
|
||||||
(let ((r (ao_close ao-device)))
|
(if (eq? ao-device #f)
|
||||||
(hash-remove! devices handle-num)
|
'error-ao-device-non-existent
|
||||||
(if (= r 0)
|
(let ((r (ao_close ao-device)))
|
||||||
'error-closing-ao-device
|
(hash-remove! devices handle-num)
|
||||||
'ok)))))))
|
(if (= r 0)
|
||||||
|
'error-closing-ao-device
|
||||||
|
'ok))))))))
|
||||||
|
|
||||||
|
|
||||||
(define count 0)
|
(define count 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user