diff --git a/audio-player.rkt b/audio-player.rkt index 8b80f37..7c89454 100644 --- a/audio-player.rkt +++ b/audio-player.rkt @@ -6,6 +6,7 @@ racket/runtime-path uni-channel "audio-placed-player.rkt" + "opusfile-decoder.rkt" "private/utils.rkt" "private/remote-utils.rkt" (prefix-in ffi: ffi/unsafe) @@ -35,6 +36,7 @@ audio-ao-buf-ms! audio-ao-buf-ms audio-known-exts? + audio-parameterize! audio-param! audio-param audio-remote-path @@ -243,7 +245,8 @@ (λ (h) (when (audio-play? h) (rpc 'quit)))) - + + (audio-parameterize! handle) handle) ) ) @@ -353,6 +356,18 @@ (define/contract (audio-param handle param) (-> audio-play? symbol? any?) ((audio-play-rpc handle) 'param param)) + +(define/contract (audio-parameterize! handle) + (-> audio-play? void?) + (void + (let* ((opus-fmt (current-opusfile-output-format)) + (opus-bits (if (eq? opus-fmt 's24) 24 16)) + ) + (audio-param! handle 'opus-bits opus-bits) + ) + ) + ) +