pub trait Signal {
// Required methods
fn frame_rate_hz(&self) -> u32;
fn num_channels(&self) -> u16;
fn num_frames_estimate(&self) -> Option<usize>;
// Provided methods
fn duration_estimate(&self) -> Option<Duration> { ... }
fn duration_estimate_to_str(&self) -> String { ... }
}
Expand description
A trait that describes common properties of all digital audio signals.
Required Methods§
sourcefn frame_rate_hz(&self) -> u32
fn frame_rate_hz(&self) -> u32
The frame rate (or sample rate) of the Signal
, measured in frames per second.
sourcefn num_channels(&self) -> u16
fn num_channels(&self) -> u16
The number of audio channels in the Signal
.
sourcefn num_frames_estimate(&self) -> Option<usize>
fn num_frames_estimate(&self) -> Option<usize>
An estimate of the total number of frames in the Signal
.
Provided Methods§
sourcefn duration_estimate(&self) -> Option<Duration>
fn duration_estimate(&self) -> Option<Duration>
The wall-clock duration of this Signal
, based on the estimated number of frames.
sourcefn duration_estimate_to_str(&self) -> String
fn duration_estimate_to_str(&self) -> String
A string representation of this Signal
’s wall-clock duration.