pub struct AudioBrick { /* private fields */ }Expand description
AudioBrick: Generates AudioWorklet processor code
Implementations§
Source§impl AudioBrick
impl AudioBrick
Sourcepub fn param(self, param: AudioParam) -> Self
pub fn param(self, param: AudioParam) -> Self
Add an audio parameter
Sourcepub fn with_ring_buffer(self, config: RingBufferConfig) -> Self
pub fn with_ring_buffer(self, config: RingBufferConfig) -> Self
Configure ring buffer
Sourcepub fn sample_rate(self, rate: u32) -> Self
pub fn sample_rate(self, rate: u32) -> Self
Set expected sample rate
Sourcepub fn class_name(&self) -> String
pub fn class_name(&self) -> String
Get the processor class name
Sourcepub fn to_worklet_js(&self) -> String
pub fn to_worklet_js(&self) -> String
Generate AudioWorklet processor JavaScript
Sourcepub fn to_audio_init_js(&self) -> String
pub fn to_audio_init_js(&self) -> String
Generate main thread audio initialization JavaScript
Sourcepub fn to_rust_bindings(&self) -> String
pub fn to_rust_bindings(&self) -> String
Generate Rust bindings for ring buffer access
Trait Implementations§
Source§impl Brick for AudioBrick
impl Brick for AudioBrick
Source§fn brick_name(&self) -> &'static str
fn brick_name(&self) -> &'static str
Get the brick’s unique type name
Source§fn assertions(&self) -> &[BrickAssertion]
fn assertions(&self) -> &[BrickAssertion]
Get all assertions for this brick
Source§fn budget(&self) -> BrickBudget
fn budget(&self) -> BrickBudget
Get the performance budget
Source§fn verify(&self) -> BrickVerification
fn verify(&self) -> BrickVerification
Verify all assertions against current state Read more
Source§fn can_render(&self) -> bool
fn can_render(&self) -> bool
Check if this brick can be rendered (all assertions pass)
Source§impl Clone for AudioBrick
impl Clone for AudioBrick
Source§fn clone(&self) -> AudioBrick
fn clone(&self) -> AudioBrick
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AudioBrick
impl RefUnwindSafe for AudioBrick
impl Send for AudioBrick
impl Sync for AudioBrick
impl Unpin for AudioBrick
impl UnsafeUnpin for AudioBrick
impl UnwindSafe for AudioBrick
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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