Skip to main content

dc_mean

Function dc_mean 

Source
pub fn dc_mean(samples: &[f32]) -> Result<Option<f64>>
Expand description

Arithmetic DC mean of one channel, in signed input-sample amplitude units. Empty input returns None; silence returns Some(0). All samples must be finite. Compensated f64 summation, O(samples) time and O(1) storage; no allocation. This is numerical reporting, not an extension of the rendered-PCM bit contract.