MCPcopy Create free account
hub / github.com/PerroEngine/Perro / push_u16

Function push_u16

perro_source/audio_stack/perro_pawdio/src/mic.rs:761–775  ·  view source on GitHub ↗
(
    data: &[u16],
    out: &Arc<Mutex<Vec<i16>>>,
    stream_cursor: &Arc<Mutex<usize>>,
    max_samples: usize,
    denoise: &mut MicDenoiseState,
)

Source from the content-addressed store, hash-verified

759 /// High-pass corner frequency in Hz (rumble/handling-noise cut). The
760 /// filter coefficient is derived from the actual stream rate, so the cut
761 /// lands at the same frequency on a 44.1 kHz headset and a 96 kHz interface.
762 pub high_pass_hz: f32,
763}
764
765impl MicDenoiseSettings {
766 pub fn off() -> Self {
767 Self {
768 enabled: false,
769 noise_floor: 0.02,
770 reduction: 0.75,
771 high_pass: true,
772 high_pass_hz: 60.0,
773 }
774 }
775
776 pub fn voice() -> Self {
777 Self {
778 enabled: true,

Callers 1

start_streamFunction · 0.70

Calls 5

trim_samplesFunction · 0.85
extendMethod · 0.80
process_i16Method · 0.80
iterMethod · 0.45
clampMethod · 0.45

Tested by

no test coverage detected