[−][src]Struct reaper_medium::ReaperVolumeValue
This represents a volume measured in REAPER's native volume unit.
Implementations
impl ReaperVolumeValue
[src]
pub const MIN: ReaperVolumeValue
[src]
The minimum possible value (0.0).
If the scale would be linear, this would be less than -150 dB. But it's not. In practice,
REAPER considers this as equal to the MINUS_150_DB
value.
There's no maximum value because REAPER allows to exceed the soft maximum of 12 dB!
pub const NAN: ReaperVolumeValue
[src]
The not-a-number volume (f64::NAN
= 1.#R dB).
It's reasonable to assume that this isn't actually a valid value. However, REAPER doesn't prevent extensions from setting it, so you might run into it.
pub const MINUS_150_DB: ReaperVolumeValue
[src]
The "soft minimum" volume (3.1622776601684e-008 = -150.0 dB).
When setting a value, use MIN
(0.0) instead because this is just an approximation.
pub const ZERO_DB: ReaperVolumeValue
[src]
The "unaltered" volume (1.0 = 0.0 dB).
pub const TWELVE_DB: ReaperVolumeValue
[src]
The "soft maximum" volume (3.981071705535 = 12.0 dB).
pub fn new(value: f64) -> ReaperVolumeValue
[src]
Creates a REAPER volume value.
Panics
This function panics if the given value is not within the range supported by REAPER
(0.0..)
.
pub const fn get(&self) -> f64
[src]
Returns the wrapped value.
Trait Implementations
impl Clone for ReaperVolumeValue
[src]
fn clone(&self) -> ReaperVolumeValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ReaperVolumeValue
[src]
impl Debug for ReaperVolumeValue
[src]
impl Default for ReaperVolumeValue
[src]
fn default() -> ReaperVolumeValue
[src]
impl Display for ReaperVolumeValue
[src]
impl PartialEq<ReaperVolumeValue> for ReaperVolumeValue
[src]
fn eq(&self, other: &ReaperVolumeValue) -> bool
[src]
fn ne(&self, other: &ReaperVolumeValue) -> bool
[src]
impl PartialOrd<ReaperVolumeValue> for ReaperVolumeValue
[src]
fn partial_cmp(&self, other: &ReaperVolumeValue) -> Option<Ordering>
[src]
fn lt(&self, other: &ReaperVolumeValue) -> bool
[src]
fn le(&self, other: &ReaperVolumeValue) -> bool
[src]
fn gt(&self, other: &ReaperVolumeValue) -> bool
[src]
fn ge(&self, other: &ReaperVolumeValue) -> bool
[src]
impl StructuralPartialEq for ReaperVolumeValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for ReaperVolumeValue
impl Send for ReaperVolumeValue
impl Sync for ReaperVolumeValue
impl Unpin for ReaperVolumeValue
impl UnwindSafe for ReaperVolumeValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,