#[repr(C)]pub struct MicrophoneWidget {
pub config: AudioConfig,
pub on_frame: OptionOnAudioFrame,
}Expand description
A microphone-capture widget. create(config).with_on_frame(..).dom() yields
an invisible node a background capture thread feeds.
Fields§
§config: AudioConfigRequested capture config (sample rate, channels).
on_frame: OptionOnAudioFrameOptional per-frame user hook (save / effects / send - azul-meet).
Implementations§
Source§impl MicrophoneWidget
impl MicrophoneWidget
Sourcepub fn create(config: AudioConfig) -> Self
pub fn create(config: AudioConfig) -> Self
Create a microphone widget for the given capture config.
Sourcepub fn set_on_frame<C: Into<OnAudioFrameCallback>>(
&mut self,
data: RefAny,
on_frame: C,
)
pub fn set_on_frame<C: Into<OnAudioFrameCallback>>( &mut self, data: RefAny, on_frame: C, )
Set a hook invoked with every captured audio chunk - for saving,
effects, or sending over the network (azul-meet). The backreference DI
pattern (see architecture.md).
Sourcepub fn with_on_frame<C: Into<OnAudioFrameCallback>>(
self,
data: RefAny,
on_frame: C,
) -> Self
pub fn with_on_frame<C: Into<OnAudioFrameCallback>>( self, data: RefAny, on_frame: C, ) -> Self
Builder form of set_on_frame.
Auto Trait Implementations§
impl Freeze for MicrophoneWidget
impl RefUnwindSafe for MicrophoneWidget
impl Send for MicrophoneWidget
impl Sync for MicrophoneWidget
impl Unpin for MicrophoneWidget
impl UnsafeUnpin for MicrophoneWidget
impl UnwindSafe for MicrophoneWidget
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more