v0.8.1
A patch release focused on decoding robustness on Windows and Android, plus more consistent error handling on Web. Fully backward compatible — no API changes.
Windows: Media Foundation chunk-windowing fixes
Hardened the Windows (Media Foundation) AAC/M4A decoding path against several edge cases that could read past a chunk boundary or produce malformed output:
- Fixed an AAC chunk boundary overshoot, where the WMF reader could read beyond the intended window (#44).
- Guarded the byte-based chunk windowing against a zero block-align and an open (unbounded) start, and folded the sample rate into the byte-window guard (#47).
- An empty trim window now yields empty output instead of an error (#47).
Android: waveform crash on long files
Fixed an IndexOutOfBoundsException in getWaveform / getWaveformBytes on medium-to-large audio (e.g. a 5-minute MP3). The per-window offset i * totalSamples overflowed a 32-bit Int and wrapped to a negative index; window bounds are now computed with 64-bit arithmetic. Covered by a new on-device long-file regression test (#45, #48).
Web: consistent error delivery
The file-based methods (convertToWav, convertToM4a, getAudioInfo, trimAudio, getWaveform) are unsupported on Web and throw UnsupportedError. They now deliver that error through the returned Future instead of throwing synchronously, so await and .catchError handle it consistently. The example app also disables these actions on Web with an inline note pointing to the bytes-based API.
PRs included
- Fix WMF AAC chunk boundary overshoot on Windows by @EliStoreplay in #44
- Harden WMF byte-based chunk windowing by @sjoenk in #47
- Fix Android waveform IndexOutOfBoundsException on long files by @sjoenk in #48
New Contributors
- @EliStoreplay made their first contribution in #44 — thanks for catching the AAC chunk-boundary overshoot on Windows!
Full Changelog: v0.8.0...v0.8.1