1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// ABOUTME: Audio decoder implementations // ABOUTME: PCM and FLAC decoders (Opus planned) /// FLAC decoder implementation pub mod flac; /// PCM decoder implementation pub mod pcm; pub use flac::FlacDecoder; pub use pcm::{PcmDecoder, PcmEndian}; use crate::error::Error; use std::sync::Arc; /// Decoder trait for audio codecs pub trait Decoder { /// Decode raw audio data into samples fn decode(&self, data: &[u8]) -> Result<Arc<[i32]>, Error>; }