pub struct CeltEncoder {
pub complexity: i32,
/* private fields */
}Fields§
§complexity: i32Implementations§
Source§impl CeltEncoder
impl CeltEncoder
pub fn new(mode: &'static CeltMode, channels: usize) -> Self
Sourcepub fn with_sampling_rate(
mode: &'static CeltMode,
channels: usize,
sampling_rate: i32,
) -> Self
pub fn with_sampling_rate( mode: &'static CeltMode, channels: usize, sampling_rate: i32, ) -> Self
CELT encoder for sampling_rate, which need not be 48 kHz: the input
is zero-stuffed by resampling_factor(sampling_rate) so the mode’s
48 kHz geometry is used internally, exactly like libopus
(celt_encoder.c st->upsample).
Sourcepub fn set_end_band(&mut self, end: usize)
pub fn set_end_band(&mut self, end: usize)
Set the highest coded band (CELT_SET_END_BAND). Must match the
bandwidth the packet’s TOC signals.
pub fn encode(&mut self, pcm: &[f32], frame_size: usize, rc: &mut RangeCoder)
pub fn encode_with_start_band( &mut self, pcm: &[f32], frame_size: usize, rc: &mut RangeCoder, start_band: usize, )
pub fn encode_with_budget( &mut self, pcm: &[f32], frame_size: usize, rc: &mut RangeCoder, start_band: usize, total_bits: i32, )
pub fn encode_with_budget_vbr( &mut self, pcm: &[f32], frame_size: usize, rc: &mut RangeCoder, start_band: usize, total_bits: i32, is_vbr: bool, )
pub fn set_lsb_depth(&mut self, depth: i32)
pub fn get_lsb_depth(&self) -> i32
pub fn set_bitrate(&mut self, bitrate: i32)
pub fn set_vbr(&mut self, vbr: bool)
pub fn set_constrained_vbr(&mut self, cvbr: bool)
Auto Trait Implementations§
impl Freeze for CeltEncoder
impl RefUnwindSafe for CeltEncoder
impl Send for CeltEncoder
impl Sync for CeltEncoder
impl Unpin for CeltEncoder
impl UnsafeUnpin for CeltEncoder
impl UnwindSafe for CeltEncoder
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