pub struct VolumeDB(pub f64);
Expand description
Software volume expressed in decibels (dBs).
Tuple Fields§
§0: f64
Implementations§
Source§impl VolumeDB
impl VolumeDB
Sourcepub const MINUS_INFINITY: Self
pub const MINUS_INFINITY: Self
Minus Infinity.
This floor value is used / can be used, when using converting between integer software volume and decibel (dB, floating point) software volume.
Trait Implementations§
Source§impl From<Volume> for VolumeDB
Converts a volume to a decibel value (amplitude, not power).
impl From<Volume> for VolumeDB
Converts a volume to a decibel value (amplitude, not power).
This is only valid for software volumes!
Source§impl From<VolumeDB> for Volume
Converts a decibel value to a volume (amplitude, not power).
impl From<VolumeDB> for Volume
Converts a decibel value to a volume (amplitude, not power).
This is only valid for software volumes!
Source§impl From<VolumeDB> for VolumeLinear
Converts a decibel value (amplitude, not power) to a linear factor.
impl From<VolumeDB> for VolumeLinear
Converts a decibel value (amplitude, not power) to a linear factor.
This is only valid for software volumes!
Source§impl From<VolumeLinear> for VolumeDB
Converts a linear factor to a decibel value (amplitude, not power).
impl From<VolumeLinear> for VolumeDB
Converts a linear factor to a decibel value (amplitude, not power).
0.0
and less is muted while 1.0
is Volume::NORMAL
.
This is only valid for software volumes!
Source§fn from(v: VolumeLinear) -> Self
fn from(v: VolumeLinear) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for VolumeDB
impl PartialOrd for VolumeDB
impl Copy for VolumeDB
impl StructuralPartialEq for VolumeDB
Auto Trait Implementations§
impl Freeze for VolumeDB
impl RefUnwindSafe for VolumeDB
impl Send for VolumeDB
impl Sync for VolumeDB
impl Unpin for VolumeDB
impl UnwindSafe for VolumeDB
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