Skip to main content

DecodePcmStream

Trait DecodePcmStream 

Source
pub trait DecodePcmStream: EncodePcmStream {
    // Required methods
    fn total_input_frames(&self) -> usize;
    fn completed_input_frames(&self) -> usize;
    fn stream_info(&self) -> StreamInfo;

    // Provided methods
    fn set_threads(&mut self, _threads: usize) { ... }
    fn take_decoded_samples(&mut self) -> Result<Option<(Vec<i32>, usize)>> { ... }
}
Expand description

Single-pass FLAC decode stream consumed by crate::Decoder and recompress flows.

Required Methods§

Source

fn total_input_frames(&self) -> usize

Return the total number of FLAC frames expected from the input.

Source

fn completed_input_frames(&self) -> usize

Return the number of FLAC frames decoded so far.

Source

fn stream_info(&self) -> StreamInfo

Return the parsed STREAMINFO block for the input stream.

Provided Methods§

Source

fn set_threads(&mut self, _threads: usize)

Update the worker-thread count when the implementation supports it.

Source

fn take_decoded_samples(&mut self) -> Result<Option<(Vec<i32>, usize)>>

Optionally hand buffered decoded samples to the caller.

Implementors§