2026-04-13 02:52:32 -03:00
|
|
|
#![cfg_attr(coverage, allow(dead_code, unused_imports, unused_variables))]
|
2025-06-29 22:57:54 -05:00
|
|
|
#![forbid(unsafe_code)]
|
2026-04-23 07:00:06 -03:00
|
|
|
//! Server-side audio capture, watchdogs, and microphone gadget input handling.
|
|
|
|
|
include!("audio/ear_capture.rs");
|
|
|
|
|
include!("audio/voice_input.rs");
|
2026-04-15 04:11:47 -03:00
|
|
|
|
2026-04-22 16:50:28 -03:00
|
|
|
#[cfg(test)]
|
|
|
|
|
mod voice_caps_tests {
|
|
|
|
|
use super::voice_input_caps;
|
|
|
|
|
|
|
|
|
|
#[test]
|
2026-04-29 01:25:06 -03:00
|
|
|
fn voice_input_caps_describe_s16le_stereo_48k() {
|
2026-04-22 16:50:28 -03:00
|
|
|
let _ = super::gst::init();
|
|
|
|
|
let caps = voice_input_caps().to_string();
|
2026-04-29 01:25:06 -03:00
|
|
|
assert!(caps.contains("audio/x-raw"));
|
|
|
|
|
assert!(caps.contains("format=(string)S16LE"));
|
|
|
|
|
assert!(caps.contains("layout=(string)interleaved"));
|
2026-04-22 16:50:28 -03:00
|
|
|
assert!(caps.contains("rate=(int)48000"));
|
|
|
|
|
assert!(caps.contains("channels=(int)2"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-15 04:11:47 -03:00
|
|
|
#[cfg(all(test, coverage))]
|
2026-04-23 07:00:06 -03:00
|
|
|
#[path = "tests/audio_1.rs"]
|
|
|
|
|
mod tests;
|
2026-04-21 13:31:49 -03:00
|
|
|
|
|
|
|
|
#[cfg(all(test, not(coverage)))]
|
2026-04-23 07:00:06 -03:00
|
|
|
#[path = "tests/audio_2.rs"]
|
|
|
|
|
mod tests;
|