Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: sjoenk/audio_decoder

v0.7.3

19 Feb 00:13

Choose a tag to compare

v0.7.3

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.

Changes

  • Added Material 3 example app screenshot voor pub.dev showcase
  • Redesigned example app met Material 3 design system
    • Color-coded status display (blauw=loading, groen=success, rood=error)
    • Gradient waveform visualization met rounded corners
    • Modern FilledButton.tonalIcon styling
  • Enhanced code documentation met inline comments bij alle AudioDecoder API calls
  • Improved code organization met duidelijke sectie headers (Business logic, Bytes API, UI helpers)
  • Added pub.dev quality badges (license, pub points, likes) to README
  • Standardized numberOfSamples parameter naar 100 voor consistentie

Full Changelog: v0.7.2...v0.7.3

v0.7.2

17 Feb 08:06

Choose a tag to compare

v0.7.2

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)

Changes

  • Replace in-memory resampling with stateful chunk-based streaming (ResamplerState met linear interpolation over chunk-grenzen)
  • Flush trailing fractional samples bij end-of-stream
  • Pre-allocate resampler output buffer (minder GC pressure)
  • Cap targetSampleRate op 384 kHz ter bescherming tegen pathologische allocaties
  • WAV size validatie toegevoegd aan resampler flush branch
  • ~90 regels duplicated decode loop code verwijderd

Full Changelog: v0.7.1...v0.7.2

v0.7.1

16 Feb 00:20

Choose a tag to compare

0.7.1

Bug fix

  • Fix iOS build failure (Module 'audio_decoder' not found) when used as a pub dependency (#25)

Changes

  • Use sharedDarwinSource for shared iOS/macOS podspec resolution (#26)
  • Remove orphaned ios/ and macos/ podspec directories
  • Sync podspec version with pubspec.yaml

Full Changelog: v0.7.0...v0.7.1

v0.7.0

14 Feb 23:02

Choose a tag to compare

v0.7.0

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.

Changes

  • Streaming WAV conversion — stream decoded PCM to disk instead of buffering in memory
    • Android (#20)
    • iOS / macOS (#21)
    • Linux / Windows (#23)
  • Input validationsampleRate, channels, and bitDepth are now validated at the Dart level before calling native code (#17)
  • Shared Swift source — consolidated duplicate iOS/macOS plugin code into darwin/Classes/ (#24)

Full Changelog: v0.6.0...v0.7.0

v0.6.0

10 Feb 16:11
869675e

Choose a tag to compare

v0.6.0

Raw PCM output

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.

Dart 3 class modifiers

All library classes now use Dart 3 class modifiers (base, final) to enforce intended usage contracts at compile time. Non-breaking for existing consumers.

Testing

Expanded integration tests to cover all native platform operations. Added web integration tests.


Full Changelog: v0.5.0...v0.6.0

v0.5.0

09 Feb 12:00
7d1f21a

Choose a tag to compare

WAV Conversion Parameters

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,
);

Supported values

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 implementation

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

v0.4.0

09 Feb 11:29
7b99bd9

Choose a tag to compare

Web Support

audio_decoder now runs in the browser! The web platform uses the Web Audio API to decode and process audio entirely client-side.

What's supported on web

  • convertToWavBytes — decode any browser-supported format and encode to WAV
  • getAudioInfoBytes — extract duration, sample rate, channels, and bit rate
  • trimAudioBytes — trim audio to a time range (WAV output)
  • getWaveformBytes — extract normalized amplitude data for visualizations

Web limitations

  • File-based methods are not available — use the bytes-based API instead
  • M4A encoding is not supported (browsers lack an AAC encoding API)
  • Trim output is always WAV

Other improvements

  • Added API documentation comments to all public classes and members
  • Plugin now supports all 6 Flutter platforms: Android, iOS, macOS, Windows, Linux, and Web

Full Changelog: v0.3.0...v0.4.0

v0.3.0

09 Feb 11:05
4b3987b

Choose a tag to compare

Linux support

This release adds full Linux support using GStreamer as the native audio backend. All file-based and bytes-based methods are available on Linux — no additional Dart code changes needed.

Requirements

GStreamer 1.0+ is required (pre-installed on most Linux distributions). If needed:

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad

Supported platforms

Platform Native API
Android MediaExtractor + MediaCodec
iOS AVFoundation
macOS AVFoundation
Windows Media Foundation
Linux GStreamer

Full Changelog: v0.2.0...v0.3.0

v0.2.0

09 Feb 10:49
4c1d678

Choose a tag to compare

Bytes API — in-memory audio processing

This release adds a bytes-based API for working with audio data directly in memory, without file paths. Ideal for network responses, Flutter assets, or other in-memory sources.

New methods

  • convertToWavBytes — convert audio bytes to WAV
  • convertToM4aBytes — convert audio bytes to M4A
  • getAudioInfoBytes — retrieve metadata from audio bytes
  • trimAudioBytes — trim audio bytes to a time range
  • getWaveformBytes — extract waveform data from audio bytes

All methods accept a formatHint parameter to indicate the input format (e.g. 'mp3', 'm4a', 'wav').

Example

final wavBytes = await AudioDecoder.convertToWavBytes(
  mp3Bytes,
  formatHint: 'mp3',
);

**Full Changelog**: https://github.com/sjoenk/audio_decoder/compare/v0.1.0...v0.2.0

v0.1.0

09 Feb 09:46

Choose a tag to compare

A lightweight Flutter plugin for audio file processing using native platform APIs — no FFmpeg required.

Features

  • Audio Conversion — Convert between formats using platform-native decoders
    • convertToWav() — Lossless PCM 16-bit WAV output
    • convertToM4a() — Compressed AAC/M4A at 128 kbps
  • Audio Trimming — Extract a time range from any supported audio file
  • Audio Analysis — Extract metadata (duration, sample rate, channels, bit rate, format)
  • Waveform Extraction — Get normalized amplitude data (0.0–1.0) for visualization

Supported Platforms

Platform Min Version Native API
Android API 24 MediaExtractor + MediaCodec
iOS 13.0 AVFoundation
macOS 10.13 AVFoundation
Windows 7+ Media Foundation

Supported Input Formats

.mp3, .m4a, .aac, .mp4, .ogg, .oga, .opus, .flac, .wma, .aiff, .aif, .amr, .caf, .alac, .webm

Why This Plugin?

  • ~500 KB vs 15–30 MB for FFmpeg-based alternatives
  • Zero external dependencies — uses built-in OS audio APIs
  • Background thread processing on all platforms

Full Changelog: https://github.com/sjoenk/audio_decoder/commits/v0.1.0