Fix streaming minors: isActive_ sentinel, WAV error message, TextDecoder hoist, MIME 400, fmt first-match, processedBytes comment

This commit is contained in:
Daniel Harvey
2026-05-17 18:55:05 -04:00
parent 9f32c70e0f
commit 4420975cd2
6 changed files with 43 additions and 13 deletions
@@ -112,8 +112,11 @@ public class WavOffsetService
if (chunkSize < 0)
return null;
if (chunkId == "fmt ")
if (chunkId == "fmt " && !foundFmt)
{
// Use the first fmt chunk encountered — that is the WAV-spec-authoritative
// chunk. Subsequent fmt chunks in a malformed file are ignored, matching
// AudioProcessor.FindChunk which also returns the first match.
if (chunkSize < 16)
return null;