Skip to main content

no_signal_reads_as_negative_infinity

Function no_signal_reads_as_negative_infinity 

Source
fn no_signal_reads_as_negative_infinity<'de, D>(
    deserializer: D,
) -> Result<f32, D::Error>
where D: Deserializer<'de>,
Expand description

Read a no-signal peak - a level’s, or the one a no_audio outcome carries - taking null as no signal rather than as a decode failure.

The counterpart of serde writing a non-finite float as null: a window that heard nothing peaks at exactly zero, whose dBFS is negative infinity. Without this, a Rust reader cannot decode the message at all, and the failure names the type rather than the case.