more defensive constructs with early-return & let-assert
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user