Expand description
A change in volume of a sound.
Variants
Amplitude(f64)
All samples are multiplied by the specified factor.
Decibels(f64)
The volume is adjusted by the given number of decibels.
Implementations
sourceimpl Volume
impl Volume
sourcepub const MIN_DECIBELS: f64
pub const MIN_DECIBELS: f64
The minimum decibel value at which a sound is considered silent.
sourcepub fn as_amplitude(&self) -> f64
pub fn as_amplitude(&self) -> f64
Returns the volume as an amplitude.
sourcepub fn as_decibels(&self) -> f64
pub fn as_decibels(&self) -> f64
Returns the volume as a difference in the number of decibels.
Trait Implementations
impl Copy for Volume
impl StructuralPartialEq for Volume
Auto Trait Implementations
impl RefUnwindSafe for Volume
impl Send for Volume
impl Sync for Volume
impl Unpin for Volume
impl UnwindSafe for Volume
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<F, T> IntoSample<T> for F where
T: FromSample<F>,
impl<F, T> IntoSample<T> for F where
T: FromSample<F>,
fn into_sample(self) -> T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more