MAJOR from the 2026-04-22 review (wav.rs:135-145): read_wav used filter_map(|s| s.ok()) on both integer and float sample iterators, so any per-sample decode error (truncated payload, corrupted format descriptor after a partial write) was silently discarded. Callers received Ok with a short samples vec, losing audio without any signal to investigate. Switches to collect::<Result<Vec<f32>>>() with a map that converts hound's per-sample errors into KonError::AudioDecodeFailed. First error aborts the read rather than returning a partial vector. Test fabricates the regression by writing a valid WAV and chopping the last 10 bytes; the previous filter_map would have returned Ok with a shortened vec, the new code returns Err.
11 KiB
11 KiB