Struct libpulse_binding::volume::VolumeDB
source · 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
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
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
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
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 PartialEq<VolumeDB> for VolumeDB
impl PartialEq<VolumeDB> for VolumeDB
source§impl PartialOrd<VolumeDB> for VolumeDB
impl PartialOrd<VolumeDB> for VolumeDB
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for VolumeDB
impl StructuralPartialEq for VolumeDB
Auto Trait Implementations§
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