Skip to main content

normalize_peak

Function normalize_peak 

Source
pub fn normalize_peak(samples: &mut [i16], target_db: f32)
Expand description

Normalize audio to a target peak level (in dB, e.g., -1.0 dB).

target_db is relative to full scale (0 dB = i16::MAX). A value of -1.0 means the peak will be at ~91.2% of full scale.