Automagic parameterization of the audio player.

This commit is contained in:
2026-07-03 23:04:20 +02:00
parent 2a2616763d
commit e381260773
+15
View File
@@ -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
@@ -244,6 +246,7 @@
(when (audio-play? h)
(rpc 'quit))))
(audio-parameterize! handle)
handle)
)
)
@@ -354,6 +357,18 @@
(-> 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)
)
)
)