pub struct ReaperVolumeValue(/* private fields */);Expand description
This represents a volume measured in REAPER’s native volume unit.
Implementations§
Source§impl ReaperVolumeValue
impl ReaperVolumeValue
Sourcepub const MIN: ReaperVolumeValue
pub const MIN: ReaperVolumeValue
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!
Sourcepub const NAN: ReaperVolumeValue
pub const NAN: ReaperVolumeValue
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.
Sourcepub const MINUS_150_DB: ReaperVolumeValue
pub const MINUS_150_DB: ReaperVolumeValue
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.
Sourcepub const ZERO_DB: ReaperVolumeValue
pub const ZERO_DB: ReaperVolumeValue
The “unaltered” volume (1.0 = 0.0 dB).
Sourcepub const TWELVE_DB: ReaperVolumeValue
pub const TWELVE_DB: ReaperVolumeValue
The “soft maximum” volume (3.981071705535 = 12.0 dB).
Sourcepub fn new(value: f64) -> ReaperVolumeValue
pub fn new(value: f64) -> ReaperVolumeValue
Creates a REAPER volume value.
§Panics
This function panics if the given value is not within the range supported by REAPER
(0.0..).
Trait Implementations§
Source§impl Clone for ReaperVolumeValue
impl Clone for ReaperVolumeValue
Source§fn clone(&self) -> ReaperVolumeValue
fn clone(&self) -> ReaperVolumeValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more