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

Function push_f32

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

Source from the content-addressed store, hash-verified

742 labels.push((*name).to_string());
743 } else {
744 labels.push(format!("{name} #{}", seen + 1));
745 }
746 }
747 labels
748}
749
750#[derive(Clone, Copy, Debug, PartialEq)]
751pub struct MicDenoiseSettings {
752 pub enabled: bool,
753 /// Noise-gate threshold as a linear amplitude (0..=1). Samples below it
754 /// are attenuated by `reduction`.
755 pub noise_floor: f32,
756 /// How much of a below-floor sample is removed (0 = gate off, 1 = full mute).
757 pub reduction: f32,
758 pub high_pass: bool,
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.

Callers 1

start_streamFunction · 0.70

Calls 4

trim_samplesFunction · 0.85
extendMethod · 0.80
process_f32Method · 0.80
iterMethod · 0.45

Tested by

no test coverage detected