pub struct PcmEncoder { /* private fields */ }Implementations§
Source§impl PcmEncoder
impl PcmEncoder
pub fn new(format: SampleFormat, endian: Endian) -> Self
Sourcepub fn with_dither(
format: SampleFormat,
endian: Endian,
dither: Dither,
) -> Result<Self>
pub fn with_dither( format: SampleFormat, endian: Endian, dither: Dither, ) -> Result<Self>
Encode chunks with a continuous per-channel dither stream. The same input,
format and seed give the bytes of crate::pcm::encode_pcm_with_dither,
regardless of chunk sizes. Empty chunks consume no noise; shape errors
preserve the stream state. Float and G.711 reject enabled dither.
pub fn push(&mut self, audio: &Audio) -> Result<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PcmEncoder
impl RefUnwindSafe for PcmEncoder
impl Send for PcmEncoder
impl Sync for PcmEncoder
impl Unpin for PcmEncoder
impl UnsafeUnpin for PcmEncoder
impl UnwindSafe for PcmEncoder
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