pub struct OpusMSDecoder { /* private fields */ }Expand description
Multistream decoder: decode each stream and remux to the output channels.
Implementations§
Source§impl OpusMSDecoder
impl OpusMSDecoder
Sourcepub fn new(
sample_rate: i32,
channels: usize,
mapping_family: i32,
) -> Result<Self, Error>
pub fn new( sample_rate: i32, channels: usize, mapping_family: i32, ) -> Result<Self, Error>
A surround decoder for channels channels with the standard layout of
mapping_family (see ChannelLayout::surround).
§Errors
Error::BadArg for an unsupported channel count / mapping family, or any
error from creating the per-stream decoders.
Sourcepub fn decode(
&mut self,
packet: &[u8],
frame_size: usize,
output: &mut [f32],
) -> Result<usize, Error>
pub fn decode( &mut self, packet: &[u8], frame_size: usize, output: &mut [f32], ) -> Result<usize, Error>
Decode a multistream packet into interleaved output (nb_channels per
sample). Returns the number of samples per channel.
§Errors
Error::InvalidPacket if the multistream framing is malformed, or any
error from the per-stream crate::OpusDecoder::decode calls.
Auto Trait Implementations§
impl Freeze for OpusMSDecoder
impl RefUnwindSafe for OpusMSDecoder
impl Send for OpusMSDecoder
impl Sync for OpusMSDecoder
impl Unpin for OpusMSDecoder
impl UnsafeUnpin for OpusMSDecoder
impl UnwindSafe for OpusMSDecoder
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