pub struct AnalysisMetadata { /* private fields */ }Expand description
Metadata needed to interpret one live Analysis snapshot.
Implementations§
Source§impl AnalysisMetadata
impl AnalysisMetadata
pub fn new( sample_rate: f32, fft_size: u32, min_decibels: f32, max_decibels: f32, smoothing: f64, ) -> Self
Sourcepub fn sample_rate(self) -> f32
pub fn sample_rate(self) -> f32
Effective sample rate of the audio graph, in hertz.
Sourcepub fn frequency_bin_count(self) -> u32
pub fn frequency_bin_count(self) -> u32
Number of frequency values in each snapshot.
Sourcepub fn frequency_bin_width(self) -> f32
pub fn frequency_bin_width(self) -> f32
Width of each frequency bin, in hertz.
Sourcepub fn frequency_for_bin(self, bin: u32) -> Option<f32>
pub fn frequency_for_bin(self, bin: u32) -> Option<f32>
Center frequency represented by bin, or None when it is out of range.
pub fn min_decibels(self) -> f32
pub fn max_decibels(self) -> f32
Sourcepub fn decibels_for_frequency_value(self, value: f32) -> f32
pub fn decibels_for_frequency_value(self, value: f32) -> f32
Convert a normalized byte-frequency value to its configured decibel value.
Trait Implementations§
Source§impl Clone for AnalysisMetadata
impl Clone for AnalysisMetadata
Source§fn clone(&self) -> AnalysisMetadata
fn clone(&self) -> AnalysisMetadata
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 moreimpl Copy for AnalysisMetadata
Source§impl Debug for AnalysisMetadata
impl Debug for AnalysisMetadata
Source§impl PartialEq for AnalysisMetadata
impl PartialEq for AnalysisMetadata
impl StructuralPartialEq for AnalysisMetadata
Auto Trait Implementations§
impl Freeze for AnalysisMetadata
impl RefUnwindSafe for AnalysisMetadata
impl Send for AnalysisMetadata
impl Sync for AnalysisMetadata
impl Unpin for AnalysisMetadata
impl UnsafeUnpin for AnalysisMetadata
impl UnwindSafe for AnalysisMetadata
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,
impl<T> DependencyElement for T
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.