[][src]Struct miniaudio::Decoder

pub struct Decoder { /* fields omitted */ }

Implementations

impl Decoder[src]

pub fn from_file<P: AsRef<Path>>(
    file: P,
    config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]

Creates a Decoder from a file. This will fail with an InvalidFile error if the path is not valid utf-8.

pub fn from_memory<M: Into<Vec<u8>>>(
    data: M,
    config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]

pub fn from_read<T: 'static + SeekRead>(
    reader: T,
    config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]

pub fn from_boxed_read(
    reader: Box<dyn SeekRead>,
    config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]

Methods from Deref<Target = RawDecoder>

pub fn read_pcm_frames(&mut self, output: &mut FramesMut) -> u64[src]

pub fn length_in_pcm_frames(&mut self) -> u64[src]

pub fn seek_to_pcm_frame(&mut self, frame_index: u64) -> Result<(), Error>[src]

pub fn output_format(&self) -> Format[src]

pub fn output_channels(&self) -> u32[src]

pub fn output_sample_rate(&self) -> u32[src]

Trait Implementations

impl Deref for Decoder[src]

type Target = RawDecoder

The resulting type after dereferencing.

impl DerefMut for Decoder[src]

impl Drop for Decoder[src]

impl Send for Decoder[src]

impl Sync for Decoder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.