From 9e98d7d8c612de2ee01598f291ed30f37a9d331e Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Wed, 15 Apr 2026 09:52:00 +0200 Subject: [PATCH] added extra debug info --- libao.rkt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libao.rkt b/libao.rkt index df311bc..67efadb 100644 --- a/libao.rkt +++ b/libao.rkt @@ -49,14 +49,18 @@ (set-ao-handle-byte-format! handle byte-format) (set-ao-handle-channels! handle channels) (set-ao-handle-rate! handle rate) + + (info-sound "ao-open-live ~a ~a ~a ~a" bits rate channels byte-format) (let ((player (ffi:ao_create_async bits rate channels byte-format))) (set-ao-handle-async-player! handle player) (if (eq? player #f) (begin + (err-sound "ao-open-live - cannote create player") (set-ao-handle-closed! handle #t) handle) (begin + (info-sound "ao-open-live - created player") (set-ao-handle-closed! handle #f) handle ) @@ -67,6 +71,7 @@ (define (ao-close handle) (unless (eq? (ao-handle-async-player handle) #f) + (info-sound "ao-close - closing handle") (ffi:ao_stop_async (ao-handle-async-player handle)) (set-ao-handle-async-player! handle #f) ) @@ -83,7 +88,9 @@ (endianess (ao-handle-byte-format handle)) (buf-info (ffi:make-BufferInfo_t buf-type bits rate channels endianess)) ) + (dbg-sound "ao-play ~a ~a" at-time-in-s music-duration-s) (unless (ao-valid? handle) + (err-sound "Cannot play on an invalid ao-device") (error "Cannot play on an invalid ao-device")) (ffi:ao_play_async (ao-handle-async-player handle) (exact->inexact at-time-in-s) @@ -95,6 +102,7 @@ ) (define (ao-pause handle pause) + (dbg-sound "ao-pause ~a" pause) (ffi:ao_pause_async (ao-handle-async-player handle) (if (eq? pause #f) 0 1)) )