diff --git a/libao/libao.rkt b/libao/libao.rkt index f276a8b..2925a3a 100644 --- a/libao/libao.rkt +++ b/libao/libao.rkt @@ -99,7 +99,7 @@ ))) (define (ao-close handle) - (displayln handle) + (displayln handle)(sleep 1.0) (if (number? handle) (let ((ao-device (hash-ref devices handle #f))) (unless (eq? ao-device #f) @@ -108,14 +108,19 @@ (printf "Unexpected: cannot close ao-device")))) 'internally-closed) (let ((handle-num (ao-handle-handle-num handle))) + (displayln (ao-handle-closed handle))(sleep 1.0) (unless (ao-handle-closed handle) (set-ao-handle-closed! handle #t) + (displayln "clear-async")(sleep 1.0) (ao_clear_async (ao-handle-async-player handle)) + (displayln "stop-async")(sleep 1.0) (ao_stop_async (ao-handle-async-player handle)) + (displayln "closing")(sleep 1.0) (let ((ao-device (hash-ref devices handle-num #f))) (if (eq? ao-device #f) 'error-ao-device-non-existent (let ((r (ao_close ao-device))) + (displayln "closed")(sleep 1.0) (hash-remove! devices handle-num) (if (= r 0) 'error-closing-ao-device