[package] name = "chanora_audio" description = "Chanora audio subsystem — cpal-based capture/playback, audiopus encode, tsclientlib AudioHandler for decode + jitter buffer + mix. DEC-011, DEC-011.1." version.workspace = true edition.workspace = true rust-version.workspace = true authors.workspace = true license.workspace = true repository.workspace = true publish.workspace = true [dependencies] chanora_protocol = { path = "../chanora_protocol" } thiserror.workspace = true tracing.workspace = true # Cross-platform audio I/O (DEC-011.1). cpal = "0.16" # Opus encoder. tsclientlib already pulls this; we depend explicitly so # this crate can compile against it without going through tsclientlib. audiopus = "0.3.0-rc.0" # AudioHandler lives in the tsclientlib crate behind the `audio` # feature. We import the crate just for the AudioHandler type; the # Connection type stays inside chanora_protocol. tsclientlib = { git = "https://github.com/ReSpeak/tsclientlib.git", rev = "04aa2491", default-features = false, features = ["default-tls", "audio"] } tokio = { version = "1", features = ["sync", "rt", "macros", "time"] } [target.'cfg(target_os = "android")'.dependencies] # JNI bindings to flip Android's AudioManager into MODE_IN_COMMUNICATION # when the voice-comm preset is requested. ndk_context is initialised # by the bridge crate's android_init shim. jni = { version = "0.21", default-features = false } ndk-context = "0.1" [dev-dependencies] # `test-util` enables `start_paused` / virtual-clock tests used by # the missed-key-up watchdog unit tests. tokio = { version = "1", features = ["sync", "rt", "macros", "time", "test-util"] } [target.'cfg(target_os = "linux")'.dependencies] # GNOME-on-Wayland Global Push-to-Talk uses the freedesktop # `org.freedesktop.portal.GlobalShortcuts` interface over D-Bus. # `zbus` is the standard async D-Bus crate; the `tokio` runtime # selector is mandatory in zbus 5; we share the tokio runtime # the rest of the audio + core crates already depend on. The # `blocking-api` feature is retained so the audio-engine # probe path can do a synchronous portal-version read without # starting an async runtime; the live session flow uses the # async surface. zbus = { version = "5", default-features = false, features = ["tokio", "blocking-api"] } # Stream / sink utilities for consuming portal signals on the # async path. futures-util = { version = "0.3", default-features = false, features = ["std"] } # Random token bytes for the portal handle_token / session_handle_token # options. The portal recommends fresh tokens to scope its own # object paths per call. rand = "0.8"