Skip to main content

NativeVorbisDecoder

Struct NativeVorbisDecoder 

Source
pub struct NativeVorbisDecoder { /* private fields */ }
Expand description

A native, pure-Rust Vorbis decoder for streams of one to eight channels, producing interleaved f32 PCM in the Vorbis channel order (Vorbis I section 4.3.9).

A packet decoded straight after AudioDecoder::reset has no previous block to overlap and decodes to silence; VORBIS_PREROLL_PACKETS is the preroll that keeps an crate::AudioSampleReader from returning it.

Implementations§

Source§

impl NativeVorbisDecoder

Source

pub fn new(config: &VorbisConfig, limits: Limits) -> Result<Self>

Trait Implementations§

Auto Trait Implementations§

§

impl !RefUnwindSafe for NativeVorbisDecoder

§

impl !UnwindSafe for NativeVorbisDecoder

§

impl Forget for NativeVorbisDecoder

§

impl Freeze for NativeVorbisDecoder
where *const [u8] is !null: Freeze, PhantomData<[u8]>: Freeze, *const u8 is !null: Freeze, PhantomData<VorbisCodebook>: Freeze, PhantomData<Box<dyn Floor>>: Freeze, PhantomData<Residue>: Freeze, PhantomData<Mode>: Freeze, PhantomData<Mapping>: Freeze, PhantomData<DspChannel>: Freeze, *const [f32] is !null: Freeze, PhantomData<[f32]>: Freeze, *const [u32] is !null: Freeze, PhantomData<[u32]>: Freeze, PhantomData<f32>: Freeze,

§

impl Move for NativeVorbisDecoder

§

impl Send for NativeVorbisDecoder
where BoxRaw<[u8]>: Send, RawVecInner: Send, BoxRaw<dyn Floor>: Send, BoxRaw<[f32]>: Send, BoxRaw<[u32]>: Send,

§

impl Sync for NativeVorbisDecoder
where BoxRaw<[u8]>: Sync, RawVecInner: Sync, BoxRaw<dyn Floor>: Sync, BoxRaw<[f32]>: Sync, BoxRaw<[u32]>: Sync,

§

impl Unpin for NativeVorbisDecoder
where Box<[u8]>: Unpin, *const u8 is !null: Unpin, Box<dyn Floor>: Unpin, Box<[f32]>: Unpin, Box<[u32]>: Unpin,

§

impl UnsafeUnpin for NativeVorbisDecoder

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.