pub struct AudioProfiler {
pub frames: VecDeque<AudioProfilerFrame>,
pub frame_capacity: usize,
pub sound_bank_memory: HashMap<String, u64>,
pub effect_cpu_breakdown: HashMap<EffectType, f32>,
pub total_samples_processed: u64,
pub dropouts: u64,
pub peak_voice_count: usize,
pub average_voice_count: f32,
}Fields§
§frames: VecDeque<AudioProfilerFrame>§frame_capacity: usize§sound_bank_memory: HashMap<String, u64>§effect_cpu_breakdown: HashMap<EffectType, f32>§total_samples_processed: u64§dropouts: u64§peak_voice_count: usize§average_voice_count: f32Implementations§
Source§impl AudioProfiler
impl AudioProfiler
pub fn new(capacity: usize) -> Self
pub fn record_frame(&mut self, frame: AudioProfilerFrame)
pub fn update_dsp_costs(&mut self, graph: &SignalFlowGraph)
pub fn register_sound_bank(&mut self, name: String, size_bytes: u64)
pub fn total_sound_bank_memory_mb(&self) -> f32
pub fn average_cpu_percent(&self) -> f32
pub fn peak_cpu_percent(&self) -> f32
pub fn record_dropout(&mut self)
pub fn most_expensive_effect(&self) -> Option<(EffectType, f32)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioProfiler
impl RefUnwindSafe for AudioProfiler
impl Send for AudioProfiler
impl Sync for AudioProfiler
impl Unpin for AudioProfiler
impl UnsafeUnpin for AudioProfiler
impl UnwindSafe for AudioProfiler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.