pub struct OpusEncoder { /* private fields */ }Implementations§
Source§impl OpusEncoder
impl OpusEncoder
pub fn new_with_application( sample_rate: u32, channels: u16, application: Application, ) -> Self
Sourcepub fn new(sample_rate: u32, channels: u16) -> Self
pub fn new(sample_rate: u32, channels: u16) -> Self
Create a new Opus encoder instance.
For stereo input, prefer Application::Audio by default.
opus-rs currently has stability issues on some 48k stereo VoIP paths.
Sourcepub fn new_default() -> Self
pub fn new_default() -> Self
Create a default Opus encoder (48kHz, stereo, Audio mode, 64kbps)
Sourcepub fn set_bitrate(&mut self, bitrate_bps: i32)
pub fn set_bitrate(&mut self, bitrate_bps: i32)
Set the encoder bitrate in bits per second.
Sourcepub fn set_complexity(&mut self, complexity: i32)
pub fn set_complexity(&mut self, complexity: i32)
Set the encoder complexity (0-10).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpusEncoder
impl RefUnwindSafe for OpusEncoder
impl Send for OpusEncoder
impl Sync for OpusEncoder
impl Unpin for OpusEncoder
impl UnsafeUnpin for OpusEncoder
impl UnwindSafe for OpusEncoder
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