Struct adhoc_audio::codec::adhoc::FrameCodec
source · [−]pub struct FrameCodec { /* private fields */ }
Expand description
Description
Codec for compressing a single frame of audio, where a frame is a collection of samples from a single channel
Implementations
sourceimpl FrameCodec
impl FrameCodec
pub fn new() -> Self
pub fn state_mut(&mut self) -> &mut CodecState
pub fn sample_history_mut(&mut self) -> &mut CircularStack<i16>
pub fn init(&mut self)
sourcepub fn encode_frame(
&mut self,
stream: &mut AudioStream,
frame_headers: &mut FrameHeaders,
pcm: &[f32]
)
pub fn encode_frame(
&mut self,
stream: &mut AudioStream,
frame_headers: &mut FrameHeaders,
pcm: &[f32]
)
encodes a single channel
sourcepub fn decode_frame(
&mut self,
stream: &mut AudioStream,
frame_info: &mut FrameHeaders
) -> Option<usize>
pub fn decode_frame(
&mut self,
stream: &mut AudioStream,
frame_info: &mut FrameHeaders
) -> Option<usize>
decodes a single channel
pub fn buffered_channel(&self) -> &VecDeque<f32>
pub fn buffered_channel_mut(&mut self) -> &mut VecDeque<f32>
Trait Implementations
sourceimpl Clone for FrameCodec
impl Clone for FrameCodec
sourcefn clone(&self) -> FrameCodec
fn clone(&self) -> FrameCodec
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for FrameCodec
impl Send for FrameCodec
impl Sync for FrameCodec
impl Unpin for FrameCodec
impl UnwindSafe for FrameCodec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more