Struct web_audio_api::AudioRenderCapacity
source · pub struct AudioRenderCapacity { /* private fields */ }Expand description
Provider for rendering performance metrics
A load value is computed for each system-level audio callback, by dividing its execution duration by the system-level audio callback buffer size divided by the sample rate.
Ideally the load value is below 1.0, meaning that it took less time to render the audio than it took to play it out. An audio buffer underrun happens when this load value is greater than 1.0: the system could not render audio fast enough for real-time.
Implementations
sourceimpl AudioRenderCapacity
impl AudioRenderCapacity
sourcepub fn start(&self, options: AudioRenderCapacityOptions)
pub fn start(&self, options: AudioRenderCapacityOptions)
Start metric collection and analysis
sourcepub fn onupdate<F: FnMut(AudioRenderCapacityEvent) + Send + 'static>(
&self,
callback: F
)
pub fn onupdate<F: FnMut(AudioRenderCapacityEvent) + Send + 'static>(
&self,
callback: F
)
An EventHandler for AudioRenderCapacityEvent.
Auto Trait Implementations
impl RefUnwindSafe for AudioRenderCapacity
impl Send for AudioRenderCapacity
impl Sync for AudioRenderCapacity
impl Unpin for AudioRenderCapacity
impl UnwindSafe for AudioRenderCapacity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more