pub struct AudioConfig { /* private fields */ }Expand description
Audio configuration for browser integration.
Implementations§
Source§impl AudioConfig
impl AudioConfig
Sourcepub fn new(sample_rate: u32, channels: u8, frame_size: u32) -> Self
pub fn new(sample_rate: u32, channels: u8, frame_size: u32) -> Self
Create a new audio configuration.
Sourcepub fn opus_default() -> Self
pub fn opus_default() -> Self
Create default config for Opus (48kHz, mono, 20ms frame).
pub fn sample_rate(&self) -> u32
pub fn channels(&self) -> u8
pub fn frame_size(&self) -> u32
Sourcepub fn frame_duration_ms(&self) -> f64
pub fn frame_duration_ms(&self) -> f64
Calculate frame duration in milliseconds.
Trait Implementations§
Source§impl From<AudioConfig> for JsValue
impl From<AudioConfig> for JsValue
Source§fn from(value: AudioConfig) -> Self
fn from(value: AudioConfig) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for AudioConfig
impl FromWasmAbi for AudioConfig
Source§impl IntoWasmAbi for AudioConfig
impl IntoWasmAbi for AudioConfig
Source§impl LongRefFromWasmAbi for AudioConfig
impl LongRefFromWasmAbi for AudioConfig
Source§impl OptionFromWasmAbi for AudioConfig
impl OptionFromWasmAbi for AudioConfig
Source§impl OptionIntoWasmAbi for AudioConfig
impl OptionIntoWasmAbi for AudioConfig
Source§impl RefFromWasmAbi for AudioConfig
impl RefFromWasmAbi for AudioConfig
Source§type Anchor = RcRef<AudioConfig>
type Anchor = RcRef<AudioConfig>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for AudioConfig
impl RefMutFromWasmAbi for AudioConfig
Source§impl TryFromJsValue for AudioConfig
impl TryFromJsValue for AudioConfig
Source§impl VectorFromWasmAbi for AudioConfig
impl VectorFromWasmAbi for AudioConfig
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[AudioConfig]>
Source§impl VectorIntoWasmAbi for AudioConfig
impl VectorIntoWasmAbi for AudioConfig
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[AudioConfig]>) -> Self::Abi
Source§impl WasmDescribeVector for AudioConfig
impl WasmDescribeVector for AudioConfig
impl SupportsConstructor for AudioConfig
impl SupportsInstanceProperty for AudioConfig
impl SupportsStaticProperty for AudioConfig
Auto Trait Implementations§
impl Freeze for AudioConfig
impl RefUnwindSafe for AudioConfig
impl Send for AudioConfig
impl Sync for AudioConfig
impl Unpin for AudioConfig
impl UnwindSafe for AudioConfig
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.