audio_decoder 0.5.0
audio_decoder: ^0.5.0 copied to clipboard
A lightweight Flutter plugin for converting, trimming, and analyzing audio files using native platform APIs. No FFmpeg required.
0.5.0 #
- Add optional
sampleRate,channels, andbitDepthparameters toconvertToWavandconvertToWavBytes. - Control output sample rate (e.g., 44100, 22050), channel count (1 for mono, 2 for stereo), and bit depth (8, 16, 24, 32).
- When omitted, defaults to the source sample rate/channels and 16-bit depth.
- Supported on all platforms: Android, iOS, macOS, Windows, Linux, and Web.
0.4.0 #
- Add web support using the Web Audio API.
- Bytes-based methods (
convertToWavBytes,getAudioInfoBytes,trimAudioBytes,getWaveformBytes) are fully supported on web. - File-based methods throw
UnsupportedErroron web — use the bytes API instead. - M4A encoding is not available on web (browser limitation).
0.3.0 #
- Add Linux support using GStreamer.
- All file-based and bytes-based methods are now available on Linux.
- Requires GStreamer 1.0+ (pre-installed on most Linux distributions).
0.2.0 #
- Add bytes-based API for in-memory audio processing — no file paths needed.
convertToWavBytes— convert audio bytes to WAV format.convertToM4aBytes— convert audio bytes to M4A format.getAudioInfoBytes— retrieve metadata from audio bytes.trimAudioBytes— trim audio bytes to a time range.getWaveformBytes— extract waveform data from audio bytes.
- All bytes methods accept a
formatHintparameter to indicate the input format. - Ideal for network responses, Flutter assets, and other in-memory audio sources.
0.1.0 #
- Initial release of
audio_decoder. - Convert audio files to WAV format (
convertToWav) — supports MP3, M4A, AAC, OGG, OPUS, FLAC, WMA, AIFF, AMR, CAF, ALAC, and WebM. - Convert audio files to M4A/AAC format (
convertToM4a). - Retrieve audio metadata (
getAudioInfo) — duration, sample rate, channels, bit rate, and format. - Trim audio files to a specific time range (
trimAudio). - Extract waveform amplitude data for visualizations (
getWaveform). - Platform support: Android, iOS, macOS, and Windows.
- Typed exception handling via
AudioConversionException.