more defensive constructs with early-return & let-assert

This commit is contained in:
2026-05-12 11:34:56 +02:00
parent 61d87ba543
commit 89592ddea9
6 changed files with 406 additions and 302 deletions
+7
View File
@@ -31,8 +31,11 @@
ao-valid-format?
ao-handle?
ao-supported-music-format?
ao-playback-buf-ms
ao-set-playback-buf-ms!
)
(define device-number 1)
(define-struct ao-handle (handle-num
@@ -50,6 +53,10 @@
)
(define ao-playback-buf-ms ffi:ao-playback-buf-ms)
(define ao-set-playback-buf-ms! ffi:ao-set-playback-buf-ms!)
(define (ao-supported-music-format? f)
(and (symbol? f)
(or (eq? f 'flac)