pub fn strong_decay(
envelope: &[f32],
sample_rate: f32,
) -> Result<f32, AudioError>Expand description
StrongDecay of an amplitude envelope.
Built from the non-linear combination of the envelope energy and its
temporal centroid (in seconds): sqrt(energy * centroid_seconds). A signal
with both high energy and a centroid pushed later in time yields a larger
value; the measure discriminates envelopes with a pronounced decay tail.
ยงErrors
AudioError::InvalidParameterifsample_rate <= 0, the envelope is empty, or its total weight is zero (undefined centroid).