Expand description
Waveforms, spectral analysis and K-weighted integrated loudness.
Structs§
- Boundary
Measurement - Boundary
Samples - Channel
Step - Signed step in input-sample amplitude units, preserving headroom outside +/-1.
- Deterministic
Measurements - Non-mutating deterministic measurements of the supplied PCM, without gain or
quantization. These unrounded f64 values may drive repeatable delivery checks.
Numerical accuracy is separate from cross-host identity; see
Audio::measure_deterministicfor the estimator and no-result policies. - Loudness
Result - Spectrogram
- Spectrum
- One-sided Hann-windowed tone-amplitude spectrum; not a power spectral density or calibrated band RMS measurement. Uses platform math, with report-only numerical accuracy rather than an exact rendering guarantee.
- Stereo
Measurements - Unweighted stereo statistics. Power units are squared input-sample amplitude. Empty input has no power result; silence has Some(0). No width/quality verdict.
- Threshold
Silence - Frame-exact leading/trailing silence under a caller’s linear amplitude threshold.
- Waveform
Enums§
- Measurement
Boundary - An explicitly requested adjacent-sample join; no automatic transient search.
Constants§
- MAX_
MEASUREMENT_ BOUNDARIES - Maximum requests in one
Audio::measure_boundariescall.
Functions§
- dc_mean
- 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.
- from_db
- spectrogram
- Spectra of
sampleseveryhopsamples, each asspectrumof the samples from that point on. Every sample must be finite. - spectrum
- One-sided tone-amplitude magnitudes of the first
fft_sizesamples. - stereo_
measurements - Statistics of equal-length stereo channels; no allocation or PCM modification.
Requires finite samples, including constant/silent inputs. A two-pass,
compensated f64 scan avoids raw-moment variance cancellation under large DC.
Power is the same unweighted mean-square concept as
Audio::mean_square; accumulation order/compensation can change last bits. Pearson uses platform sqrt and is report-only; compare results numerically, not as portable bytes. - to_db