Overview
Symphonia provides a pure Rust implementation of an Advanced Audio Coding (AAC) decoder. AAC is a lossy audio compression format that offers improved sound quality over MP3 at similar bitrates.Feature Flag
To enable AAC support, add theaac feature to your Cargo.toml:
Status
Status: Good- Decoding: Supported
- Gapless Playback: Yes
- Container Support: ISO MP4, ADTS streams
Codec Type
Decoder
The AAC decoder is implemented by theAacDecoder struct:
ADTS Stream Reader
For raw ADTS (Audio Data Transport Stream) files, use theAdtsReader:
Supported Profiles
- AAC Low Complexity (AAC-LC)
- High Efficiency AAC (HE-AAC, AAC+)
- HE-AAC v2 (AAC+ v2)
Sample Rates
Supports all standard AAC sample rates from 8 kHz to 96 kHz.Channel Configurations
- Mono (1.0)
- Stereo (2.0)
- 3.0 (L, R, C)
- 4.0 (L, R, Ls, Rs)
- 5.0 (L, R, C, Ls, Rs)
- 5.1 (L, R, C, LFE, Ls, Rs)
- 7.1 (L, R, C, LFE, Lb, Rb, Ls, Rs)
Usage Example
Limitations
-
Does not support:
- Scalable Sampling Rate (SSR)
- Long Term Prediction (LTP)
- Main profile
- Some advanced AAC features
- Error concealment is basic
- May not handle all malformed streams gracefully
Performance
- Pure Rust implementation with no unsafe code
- Optimized for typical AAC-LC streams
- Memory efficient with minimal allocations