30 lines
889 B
Rust
30 lines
889 B
Rust
#![cfg_attr(coverage, allow(dead_code, unused_imports, unused_variables))]
|
|
#![forbid(unsafe_code)]
|
|
//! Server-side audio capture, watchdogs, and microphone gadget input handling.
|
|
include!("audio/ear_capture.rs");
|
|
include!("audio/voice_input.rs");
|
|
|
|
#[cfg(test)]
|
|
mod voice_caps_tests {
|
|
use super::voice_input_caps;
|
|
|
|
#[test]
|
|
fn voice_input_caps_describe_aac_adts_stereo_48k() {
|
|
let _ = super::gst::init();
|
|
let caps = voice_input_caps().to_string();
|
|
assert!(caps.contains("audio/mpeg"));
|
|
assert!(caps.contains("mpegversion=(int)4"));
|
|
assert!(caps.contains("stream-format=(string)adts"));
|
|
assert!(caps.contains("rate=(int)48000"));
|
|
assert!(caps.contains("channels=(int)2"));
|
|
}
|
|
}
|
|
|
|
#[cfg(all(test, coverage))]
|
|
#[path = "tests/audio_1.rs"]
|
|
mod tests;
|
|
|
|
#[cfg(all(test, not(coverage)))]
|
|
#[path = "tests/audio_2.rs"]
|
|
mod tests;
|