[][src]Struct reaper_medium::ReaperVolumeValue

pub struct 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]

impl Copy for ReaperVolumeValue[src]

impl Debug for ReaperVolumeValue[src]

impl Default for ReaperVolumeValue[src]

impl Display for ReaperVolumeValue[src]

impl PartialEq<ReaperVolumeValue> for ReaperVolumeValue[src]

impl PartialOrd<ReaperVolumeValue> for ReaperVolumeValue[src]

impl StructuralPartialEq for ReaperVolumeValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.