pub struct Encoder { /* private fields */ }Expand description
Everything the encoder carries between frames.
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn encode(&mut self, frame: &[u8; 320]) -> [u8; 18]
pub fn encode(&mut self, frame: &[u8; 320]) -> [u8; 18]
Encode one frame of 320 mu-law samples into an 18-byte transport frame.
This is frame followed by the bit packing, and is what
Decoder::decode reads back.
Sourcepub fn frame(&mut self, frame: &[u8; 320]) -> Params
pub fn frame(&mut self, frame: &[u8; 320]) -> Params
Encode one frame into its fourteen parameter fields: the two line spectrum fields plus the twelve the two half-frames’ subframe searches contribute.
encode is the same thing packed into bytes; this is
the form to use when the fields themselves are of interest.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnsafeUnpin for Encoder
impl UnwindSafe for Encoder
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