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§

source§

impl AudioRenderCapacity

source

pub fn start(&self, options: AudioRenderCapacityOptions)

Start metric collection and analysis

source

pub fn stop(&self)

Stop metric collection and analysis

source

pub fn set_onupdate<F: FnMut(AudioRenderCapacityEvent) + Send + 'static>(
    &self,
    callback: F
)

The EventHandler for AudioRenderCapacityEvent.

Only a single event handler is active at any time. Calling this method multiple times will override the previous event handler.

source

pub fn clear_onupdate(&self)

Unset the EventHandler for AudioRenderCapacityEvent.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<S> FromSample<S> for S

source§

fn from_sample_(s: S) -> S

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for Fwhere
    T: FromSample<F>,

§

fn into_sample(self) -> T

source§

impl<T, U> ToSample<U> for Twhere
    U: FromSample<T>,

source§

fn to_sample_(self) -> U

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<S, T> Duplex<S> for Twhere
    T: FromSample<S> + ToSample<S>,