v0.8.0
v0.8.0
Cross-track loudness option
Added a new WaveformNormalization enum that lets callers opt into absolute amplitude scaling on getWaveform and getWaveformBytes. The default behavior is unchanged, so this release is non-breaking.
WaveformNormalization.perFile(default) — each waveform is rescaled so its loudest window equals 1.0. Best for single-track UI: voice memos, podcast previews, chat voice messages.WaveformNormalization.absolute— amplitudes are scaled against the maximum signed 16-bit PCM magnitude (32768), so absolute loudness is preserved across files. Best for music apps that show several tracks side by side, where a quiet recording should visibly look quieter.
final waveform = await AudioDecoder.getWaveform(
'/path/to/song.mp3',
numberOfSamples: 100,
normalization: WaveformNormalization.absolute,
);Implemented across all platforms: Android, iOS/macOS, Linux, Windows, and Web. numberOfSamples is now also validated up front (> 0, throws ArgumentError otherwise).
Cross-platform build fixes
Resolves build failures on newer compilers, contributed by @navidicted:
- Linux: Forward
typedefs forG_DEFINE_TYPEso the plugin compiles with GCC 15.2.1. - Windows: Parenthesize
std::min/std::maxto avoid the MSVCmin/maxmacro clash, castMF_SOURCE_READER_MEDIASOURCEtoDWORD, include<cctype>and<flutter/encodable_value.h>, and fix astd::tolowerdata-loss warning.
PRs included
- Fix build failures on Linux and Windows by @navidicted in #42
- Add WaveformNormalization option for cross-track loudness by @sjoenk in #43
New Contributors
- @navidicted made their first contribution in #42 — thanks for fixing the GCC 15 + MSVC build issues!
Full Changelog: v0.7.4...v0.8.0