[−][src]Struct miniaudio::Decoder
Implementations
impl Decoder
[src]
pub fn from_file<P: AsRef<Path>>(
file: P,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]
file: P,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
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]
data: M,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
pub fn from_read<T: 'static + SeekRead>(
reader: T,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]
reader: T,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
pub fn from_boxed_read(
reader: Box<dyn SeekRead>,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
[src]
reader: Box<dyn SeekRead>,
config: Option<&DecoderConfig>
) -> Result<Self, Error>
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.
fn deref(&self) -> &Self::Target
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,