Struct libpulse_binding::volume::Volume
source ·
[−]pub struct Volume(pub pa_volume_t);Expand description
Software volume expressed as an integer.
Tuple Fields
0: pa_volume_tImplementations
Get the recommended maximum volume to show in user facing UIs.
Note: UIs should deal gracefully with volumes greater than this value and not cause feedback loops etc. - i.e. if the volume is more than this, the UI should not limit it and push the limited value back to the server.
Multiplies two software volumes, returning the result.
This uses Volume::NORMAL as neutral element of multiplication.
This is only valid for software volumes!
Divides two software volumes, returning the result.
This uses Volume::NORMAL as neutral element of division. If a division by zero is tried
the result will be 0.
This is only valid for software volumes!
This is supported on crate feature pa_v5 only.
pa_v5 only.Pretty prints a volume in a verbose way.
The volume is printed in several formats: the raw volume value, percentage, and if
print_db is true, also the dB value.
Trait Implementations
Converts a volume to a decibel value (amplitude, not power).
This is only valid for software volumes!
Converts a volume to a linear factor.
This is only valid for software volumes!
Converts a decibel value to a volume (amplitude, not power).
This is only valid for software volumes!
Converts a linear factor to a volume.
0.0 and less is muted while 1.0 is Volume::NORMAL.
This is only valid for software volumes!
Performs the conversion.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Volume
impl UnwindSafe for Volume
Blanket Implementations
Mutably borrows from an owned value. Read more