[READ-ONLY] Mirror of https://github.com/probablykasper/redlux. AAC decoder for MPEG-4 and AAC files, with rodio support
aac audio decoder mp4 package
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #7 from kaspar030/make_rodio_optional

make rodio support optional

authored by

Kasper and committed by
GitHub
(Jun 4, 2023, 8:33 PM +0200) d8575295 dff07300

+6 -4
+4 -1
Cargo.toml
··· 15 15 [dependencies] 16 16 mp4 = "0.12.0" 17 17 fdk-aac = "0.4.0" 18 - rodio = { version = "0.16.0", default-features = false } 18 + rodio = { version = "0.16.0", default-features = false, optional = true } 19 + 20 + [features] 21 + default = [ "rodio" ]
+2 -3
src/lib.rs
··· 167 167 None => return Ok(None), // EOF 168 168 }; 169 169 let tracks = mp4_reader.tracks(); 170 - let track = tracks 171 - .get(&self.track_id) 172 - .ok_or(Error::TrackNotFound)?; 170 + let track = tracks.get(&self.track_id).ok_or(Error::TrackNotFound)?; 173 171 let object_type = track.audio_profile().or(Err(Error::TrackReadingError))?; 174 172 let sample_freq_index = track 175 173 .sample_freq_index() ··· 244 242 } 245 243 } 246 244 245 + #[cfg(feature = "rodio")] 247 246 impl<R> rodio::Source for Decoder<R> 248 247 where 249 248 R: Read + Seek,