pub enum ProgressSource {
LocalWindow,
MprisAutoTrack,
}Expand description
Source for the MD2 progress uniform.
LocalWindow is the historical behaviour — progress ramps from
0 at preset load to 1 after EngineConfig::preset_display_duration_s
seconds. MprisAutoTrack instead reads the active MPRIS2 player’s
track position and clamps it to [0, 1]; presets that authoring
against progress (build-ups, fade-ins) sync to the song. When no
player is reachable or the metadata is incomplete, the variant
transparently falls back to LocalWindow per frame.
Variants§
LocalWindow
Derive progress from preset_display_duration_s.
MprisAutoTrack
Read progress from the active MPRIS2 player’s track position;
fall back to LocalWindow when no player is reachable.
Trait Implementations§
Source§impl Clone for ProgressSource
impl Clone for ProgressSource
Source§fn clone(&self) -> ProgressSource
fn clone(&self) -> ProgressSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressSource
impl Debug for ProgressSource
Source§impl PartialEq for ProgressSource
impl PartialEq for ProgressSource
impl Copy for ProgressSource
impl Eq for ProgressSource
impl StructuralPartialEq for ProgressSource
Auto Trait Implementations§
impl Freeze for ProgressSource
impl RefUnwindSafe for ProgressSource
impl Send for ProgressSource
impl Sync for ProgressSource
impl Unpin for ProgressSource
impl UnwindSafe for ProgressSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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