pub struct Mp3Decoder { /* private fields */ }Expand description
MPEG-1/2 Layer III decoder (keeps a bit reservoir across frames).
Implementations§
Source§impl Mp3Decoder
impl Mp3Decoder
pub fn new() -> Result<Self, &'static str>
Sourcepub fn frame_info(&self, data: &[u8]) -> Option<DecFrameInfo>
pub fn frame_info(&self, data: &[u8]) -> Option<DecFrameInfo>
Parse one frame header; None if data does not start with a valid frame sync.
Sourcepub fn decode_frame(
&mut self,
data: &[u8],
) -> Result<(Vec<f32>, DecFrameInfo), &'static str>
pub fn decode_frame( &mut self, data: &[u8], ) -> Result<(Vec<f32>, DecFrameInfo), &'static str>
Decode ONE frame at data[0]. Returns interleaved f32 PCM (empty while an MP3 reservoir fills) and the frame info.
Trait Implementations§
Source§impl Drop for Mp3Decoder
impl Drop for Mp3Decoder
impl Send for Mp3Decoder
Auto Trait Implementations§
impl !Sync for Mp3Decoder
impl Freeze for Mp3Decoder
impl RefUnwindSafe for Mp3Decoder
impl Unpin for Mp3Decoder
impl UnsafeUnpin for Mp3Decoder
impl UnwindSafe for Mp3Decoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more