Overview
Symphonia provides a complete pure Rust implementation of the MPEG Audio (MP1, MP2, MP3) decoder and demuxer. The implementation supports all three MPEG audio layers with high quality decoding.Feature Flags
The MP3 bundle supports granular feature flags for each layer:Available Features
mp1- MPEG Audio Layer Imp2- MPEG Audio Layer IImp3- MPEG Audio Layer III
Status
Status: Excellent- Decoding: Fully supported for all layers
- Gapless Playback: Yes (with LAME headers)
- Streaming: Yes
Codec Type
Decoder
The MPEG Audio decoder is implemented by theMpaDecoder struct (formerly Mp3Decoder):
Format Reader
For raw MPEG audio files, use theMpaReader (formerly Mp3Reader):
Supported Variants
Layer I (MP1)
- MPEG-1 Layer I
- MPEG-2 Layer I
- MPEG-2.5 Layer I
- Bitrates: 32-448 kbps
Layer II (MP2)
- MPEG-1 Layer II
- MPEG-2 Layer II
- MPEG-2.5 Layer II
- Bitrates: 8-384 kbps
- Commonly used in broadcast applications
Layer III (MP3)
- MPEG-1 Layer III
- MPEG-2 Layer III
- MPEG-2.5 Layer III
- Bitrates: 8-320 kbps
- Variable Bitrate (VBR)
- Constant Bitrate (CBR)
- Average Bitrate (ABR)
Sample Rates
MPEG-1:- 32 kHz
- 44.1 kHz
- 48 kHz
- 16 kHz
- 22.05 kHz
- 24 kHz
- 8 kHz
- 11.025 kHz
- 12 kHz
Channel Modes
- Mono
- Stereo
- Joint Stereo (intensity stereo and/or M/S stereo)
- Dual Channel
Gapless Playback
Supports gapless playback with LAME encoder headers:Metadata Support
Supports ID3v1, ID3v2, and APEv2 tags:Usage Example
Seeking Support
Supports seeking with and without seeking tables:Performance
- Pure Rust implementation with no unsafe code
- Optimized synthesis filter bank
- Efficient Huffman decoding
- Memory efficient streaming decoder
Limitations
- Free format bitstreams are not supported
- Some exotic non-standard variations may not decode correctly