Skip to main content

GUARD_SAMPLES

Constant GUARD_SAMPLES 

Source
pub const GUARD_SAMPLES: usize = 512;
Expand description

Number of input samples to ignore immediately after emitting an impulse.

Electrical bleed-through and the outgoing impulse itself can appear on the input within microseconds of being written. Skipping these samples prevents a false-positive detection before the signal has had time to traverse the physical audio path.

At 44 100 Hz this guard window is approximately 11 ms.