pub struct AtomicDynamicLoudnessState {
pub volume: AtomicF32,
pub strength: AtomicF32,
pub enabled: AtomicBool,
}Expand description
Thread-safe state for DynamicLoudness control from UI thread
Fields§
§volume: AtomicF32Linear volume (0.0 - 1.0)
strength: AtomicF32Strength (0.0 - 1.0)
enabled: AtomicBoolEnabled flag
Implementations§
Source§impl AtomicDynamicLoudnessState
impl AtomicDynamicLoudnessState
pub fn new() -> Self
Sourcepub fn set_volume(&self, volume: f32)
pub fn set_volume(&self, volume: f32)
Set volume (call from UI thread)
Sourcepub fn set_strength(&self, strength: f32)
pub fn set_strength(&self, strength: f32)
Set strength (call from UI thread)
Sourcepub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Set enabled (call from UI thread)
Sourcepub fn sync_to_processor(&self, processor: &mut DynamicLoudness)
pub fn sync_to_processor(&self, processor: &mut DynamicLoudness)
Sync to processor (call from audio thread)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AtomicDynamicLoudnessState
impl !RefUnwindSafe for AtomicDynamicLoudnessState
impl Send for AtomicDynamicLoudnessState
impl Sync for AtomicDynamicLoudnessState
impl Unpin for AtomicDynamicLoudnessState
impl UnsafeUnpin for AtomicDynamicLoudnessState
impl UnwindSafe for AtomicDynamicLoudnessState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more