NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #3305 most downloaded on pub.dev
Decode MP3, M4A, AAC, FLAC, OGG & more to WAV/PCM using native platform APIs. Convert, trim, and analyze audio — no FFmpeg required.
Last release 4 months ago
29 May 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 11 of 11 stable releases
Nothing withdrawn
no release was ever pulled
8 months old
11 releases · first in 2026
One column per month.
A patch release focused on decoding robustness on Windows and Android, plus more consistent error handling on Web. Fully backward compatible — no API
A patch release focused on decoding robustness on Windows and Android, plus more consistent error handling on Web. Fully backward compatible — no API changes.
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 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).
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.
Full Changelog: v0.8.0...v0.8.1
IndexOutOfBoundsException on Android for long files (#45) — getWaveform / getWaveformBytes crashed on medium-to-large audio (e.g. a 5-minute MP3) because the per-window offset i * totalSamples overflowed a 32-bit Int and wrapped to a negative index. The window bounds are now computed with 64-bit arithmetic.Future instead of throwing synchronously — convertToWav, convertToM4a, getAudioInfo, trimAudio, and getWaveform are unsupported on web; the UnsupportedError is now delivered through the returned Future, so await / .catchError handle it consistently.dart:io (use the bytes-based API instead).Added a new WaveformNormalization enum that lets callers opt into absolute amplitude scaling on getWaveform and getWaveformBytes . The default behavio
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).
Resolves build failures on newer compilers, contributed by @navidicted:
typedefs for G_DEFINE_TYPE so the plugin compiles with GCC 15.2.1.std::min / std::max to avoid the MSVC min/max macro clash, cast MF_SOURCE_READER_MEDIASOURCE to DWORD, include <cctype> and <flutter/encodable_value.h>, and fix a std::tolower data-loss warning.Full Changelog: v0.7.4...v0.8.0
WaveformNormalization option — opt into absolute amplitude scaling on getWaveform / getWaveformBytes to preserve loudness differences between tracks (useful for music apps that show several songs side by side).
WaveformNormalization.perFile (default) keeps the existing 0.7.x behavior: each waveform is rescaled so its loudest window equals 1.0.WaveformNormalization.absolute divides by the maximum signed 16-bit PCM magnitude (32768), so a quiet recording stays visibly quieter than a loud one.numberOfSamples (> 0) on the public Dart API before dispatching to the platform.typedefs for G_DEFINE_TYPE so the plugin compiles with GCC 15.2.1.std::min / std::max to avoid the MSVC min/max macro clash, cast MF_SOURCE_READER_MEDIASOURCE to DWORD, include <cctype> and <flutter/encodable_value.h>, and fix a std::tolower data-loss warning.The plugin can now be consumed via SPM in addition to CocoaPods on both iOS and macOS. An Apple privacy manifest ( PrivacyInfo.xcprivacy ) is included
The plugin can now be consumed via SPM in addition to CocoaPods on both iOS and macOS. An Apple privacy manifest (PrivacyInfo.xcprivacy) is included for iOS 17+ compliance.
AspectRatio layoutFull Changelog: v0.7.3...v0.7.4
PrivacyInfo.xcprivacy) for iOS 17+ compliance.AspectRatio layout.Documentation & presentation improvements
Deze release verbetert de pub.dev presentatie en developer experience met een volledig vernieuwde Material 3 example app en uitgebreide code documentatie. Geen API changes - safe to upgrade.
FilledButton.tonalIcon stylingnumberOfSamples parameter naar 100 voor consistentieFull Changelog: v0.7.2...v0.7.3
Fix: streaming resampling to avoid OOM on large files (Android)
Resampling verwerkt PCM data nu chunk-voor-chunk in de streaming decode pipeline, in plaats van het hele bestand in geheugen te bufferen. Dit voorkomt OOM crashes bij grote bestanden op devices met weinig geheugen.
| Scenario | Before | After |
|---|---|---|
| Groot bestand + resampling | ~2× decoded PCM size (OOM risico) | ~buffer size (paar KB) |
ResamplerState met linear interpolation over chunk-grenzen)targetSampleRate op 384 kHz ter bescherming tegen pathologische allocatiesFull Changelog: v0.7.1...v0.7.2
ByteArrayOutputStream to reduce GC pressure.MAX_WAV_DATA_SIZE validation to the resampler flush path.Fix iOS build failure ( Module 'audio_decoder' not found ) when used as a pub dependency
Module 'audio_decoder' not found) when used as a pub dependency (#25)sharedDarwinSource for shared iOS/macOS podspec resolution (#26)ios/ and macos/ podspec directoriesFull Changelog: v0.7.0...v0.7.1
Module 'audio_decoder' not found) when used as a pub dependency.sharedDarwinSource for shared iOS/macOS podspec resolution.Streaming WAV conversion & internal improvements
Streaming WAV conversion & internal improvements
WAV conversion now streams decoded PCM chunks directly to disk instead of buffering everything in memory. This significantly reduces peak memory usage, especially for large audio files.
sampleRate, channels, and bitDepth are now validated at the Dart level before calling native code (#17)darwin/Classes/ (#24)Full Changelog: v0.6.0...v0.7.0
convertToWav and convertToWavBytes parameters.
sampleRate, channels, and bitDepth are validated before calling native code, throwing ArgumentError for invalid values.darwin/audio_decoder/Sources/audio_decoder/.convertToWavBytes accepts a new includeHeader: false parameter that returns only raw interleaved PCM samples — no 44-byte RIFF/WAV header. Useful for
convertToWavBytes accepts a new includeHeader: false parameter that returns only raw interleaved PCM samples — no 44-byte RIFF/WAV header. Useful for real-time audio pipelines, direct hardware interfaces, and custom audio processing.
All library classes now use Dart 3 class modifiers (base, final) to enforce intended usage contracts at compile time. Non-breaking for existing consumers.
Expanded integration tests to cover all native platform operations. Added web integration tests.
Full Changelog: v0.5.0...v0.6.0
includeHeader parameter to convertToWavBytes (default true).false, returns only raw interleaved PCM data without the 44-byte RIFF/WAV header.AudioDecoderPlatform is now abstract base class — enforces extension over implementation.MethodChannelAudioDecoder, AudioDecoderWeb, AudioDecoder, AudioConversionException, and AudioInfo are now final class — prevents unintended subclassing.convertToWav and convertToWavBytes now accept optional sampleRate , channels , and bitDepth parameters, giving full control over WAV output encoding.
convertToWav and convertToWavBytes now accept optional sampleRate, channels, and bitDepth parameters, giving full control over WAV output encoding. When omitted, the source sample rate and channels are preserved with 16-bit depth (existing behavior).
// Convert to mono 44.1kHz 24-bit WAV
final path = await AudioDecoder.convertToWav(
'input.mp3', 'output.wav',
sampleRate: 44100,
channels: 1,
bitDepth: 24,
);
// Same for in-memory bytes
final wavBytes = await AudioDecoder.convertToWavBytes(
mp3Bytes,
formatHint: 'mp3',
sampleRate: 22050,
channels: 1,
bitDepth: 16,
);| Parameter | Values | Default |
|---|---|---|
sampleRate |
Any valid rate (e.g. 8000, 22050, 44100, 48000) | Source sample rate |
channels |
1 (mono), 2 (stereo), or more | Source channel count |
bitDepth |
8, 16, 24, 32 | 16 |
| Platform | Approach |
|---|---|
| iOS / macOS | AVAssetReader output settings |
| Android | Manual PCM resampling, channel conversion, bit depth conversion |
| Windows | Media Foundation media type attributes |
| Linux | GStreamer capsfilter |
| Web | OfflineAudioContext + manual encoding |
Full Changelog: v0.4.0...v0.5.0
sampleRate, channels, and bitDepth parameters to convertToWav and convertToWavBytes.audio_decoder now runs in the browser! The web platform uses the Web Audio API to decode and process audio entirely client-side.
audio_decoder now runs in the browser! The web platform uses the Web Audio API to decode and process audio entirely client-side.
convertToWavBytes — decode any browser-supported format and encode to WAVgetAudioInfoBytes — extract duration, sample rate, channels, and bit ratetrimAudioBytes — trim audio to a time range (WAV output)getWaveformBytes — extract normalized amplitude data for visualizationsFull Changelog: v0.3.0...v0.4.0
convertToWavBytes, getAudioInfoBytes, trimAudioBytes, getWaveformBytes) are fully supported on web.UnsupportedError on web — use the bytes API instead.Initial release of audio_decoder.
audio_decoder.convertToWav) — supports MP3, M4A, AAC, OGG, OPUS, FLAC, WMA, AIFF, AMR, CAF, ALAC, and WebM.convertToM4a).getAudioInfo) — duration, sample rate, channels, bit rate, and format.trimAudio).getWaveform).AudioConversionException.Your coding agent can read these notes before it upgrades. Set up the MCP server →