Automagic parameterization of the audio player.
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
racket/runtime-path
|
racket/runtime-path
|
||||||
uni-channel
|
uni-channel
|
||||||
"audio-placed-player.rkt"
|
"audio-placed-player.rkt"
|
||||||
|
"opusfile-decoder.rkt"
|
||||||
"private/utils.rkt"
|
"private/utils.rkt"
|
||||||
"private/remote-utils.rkt"
|
"private/remote-utils.rkt"
|
||||||
(prefix-in ffi: ffi/unsafe)
|
(prefix-in ffi: ffi/unsafe)
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
audio-ao-buf-ms!
|
audio-ao-buf-ms!
|
||||||
audio-ao-buf-ms
|
audio-ao-buf-ms
|
||||||
audio-known-exts?
|
audio-known-exts?
|
||||||
|
audio-parameterize!
|
||||||
audio-param!
|
audio-param!
|
||||||
audio-param
|
audio-param
|
||||||
audio-remote-path
|
audio-remote-path
|
||||||
@@ -244,6 +246,7 @@
|
|||||||
(when (audio-play? h)
|
(when (audio-play? h)
|
||||||
(rpc 'quit))))
|
(rpc 'quit))))
|
||||||
|
|
||||||
|
(audio-parameterize! handle)
|
||||||
handle)
|
handle)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -354,6 +357,18 @@
|
|||||||
(-> audio-play? symbol? any?)
|
(-> audio-play? symbol? any?)
|
||||||
((audio-play-rpc handle) 'param param))
|
((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)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user