pub struct StreamingDecoder { /* private fields */ }Implementations§
Source§impl StreamingDecoder
impl StreamingDecoder
Sourcepub fn state(&self) -> DecoderState
pub fn state(&self) -> DecoderState
current state
Sourcepub fn info(&self) -> Option<StreamingAudioInfo>
pub fn info(&self) -> Option<StreamingAudioInfo>
audio info if we have the header
Sourcepub fn frames_available(&self) -> usize
pub fn frames_available(&self) -> usize
how many frames ready to decode
Sourcepub fn feed(&mut self, data: &[u8]) -> FloResult<bool>
pub fn feed(&mut self, data: &[u8]) -> FloResult<bool>
feed more data, returns true if new frames available
Sourcepub fn next_frame(&mut self) -> FloResult<Option<Vec<f32>>>
pub fn next_frame(&mut self) -> FloResult<Option<Vec<f32>>>
decode next frame, or None if nothing ready
Sourcepub fn decode_available(&mut self) -> FloResult<Vec<f32>>
pub fn decode_available(&mut self) -> FloResult<Vec<f32>>
decode everything we have
Sourcepub fn buffered_bytes(&self) -> usize
pub fn buffered_bytes(&self) -> usize
bytes buffered
Sourcepub fn available_frames(&self) -> usize
pub fn available_frames(&self) -> usize
frames ready to decode
Sourcepub fn current_frame_index(&self) -> usize
pub fn current_frame_index(&self) -> usize
current frame index
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingDecoder
impl !RefUnwindSafe for StreamingDecoder
impl Send for StreamingDecoder
impl Sync for StreamingDecoder
impl Unpin for StreamingDecoder
impl !UnwindSafe for StreamingDecoder
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