pub const PEAK_CEILING: f64 = 1.0;Expand description
Peak ceiling of the normalized buffer, in the nominal ±1.0 float domain.
Full scale, not a dB of headroom below it, because there is already margin
downstream: every audible path runs through the app’s master.gain = 0.8
(≈1.9 dB), which is what absorbs the intersample peaks a resampling output
device can produce from a buffer that is exactly at 1.0. Taking the margin
once, downstream, rather than twice keeps this constant meaning the one
thing it says — no sample leaves here above full scale — and keeps the
loudness the trade is paid out of as high as it can be.