···7788Reads MPEG-4 containers using [rust-mp4](https://crates.io/crates/mp4), and then constructs ADTS headers for it. Decodes AAC to PCM using [fdk-aac c-bindings](https://crates.io/crates/fdk-aac). Check the examples for usage with [rodio](https://crates.io/crates/rodio).
991010+Supports AAC-LC, HE-AAC v1 and HE-AAC v2.
1111+1012## Caveats
11131. It only decodes the first AAC track it finds in an MPEG-4 container.
12142. Not sure if MPEG files with CRC are supported.
-3
src/adts.rs
···3737 // EEFF_FFGH
3838 let mut byte2 = 0b0000_0000;
3939 let object_type = match object_type {
4040- AudioObjectType::AacMain => 1,
4140 AudioObjectType::AacLowComplexity => 2,
4242- AudioObjectType::AacScalableSampleRate => 3,
4343- AudioObjectType::AacLongTermPrediction => 4,
4441 // Audio object types 5 (SBR) and 29 (PS) are coerced to type 2 (AAC-LC).
4542 // The decoder will have to detect SBR/PS. This is called "Implicit
4643 // Signaling" and it's the only option for ADTS.