pub enum EventInstant {
Seconds(InstantSeconds),
Samples(InstantSamples),
Musical(InstantMusical),
}Expand description
When a particular audio event should occur, in units of absolute audio clock time.
Variants§
Seconds(InstantSeconds)
The event should happen when the clock reaches the given time in seconds.
The value is an absolute time, NOT a delta time. Use
FirewheelCtx::audio_clock to get the current time of the clock.
Samples(InstantSamples)
The event should happen when the clock reaches the given time in samples (of a single channel of audio).
The value is an absolute time, NOT a delta time. Use
FirewheelCtx::audio_clock to get the current time of the clock.
Musical(InstantMusical)
The event should happen when the musical clock reaches the given musical time.
Implementations§
Source§impl EventInstant
impl EventInstant
pub fn is_musical(&self) -> bool
Sourcepub fn to_samples(&self, proc_info: &ProcInfo) -> Option<InstantSamples>
pub fn to_samples(&self, proc_info: &ProcInfo) -> Option<InstantSamples>
Convert the instant to the given time in samples.
If this instant is of type EventInstant::Musical and either
there is no musical transport or the musical transport is not
currently playing, then this will return None.
Trait Implementations§
Source§impl Clone for EventInstant
impl Clone for EventInstant
Source§fn clone(&self) -> EventInstant
fn clone(&self) -> EventInstant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventInstant
impl Debug for EventInstant
Source§impl Diff for EventInstant
impl Diff for EventInstant
Source§fn diff<E: EventQueue>(
&self,
baseline: &Self,
path: PathBuilder,
event_queue: &mut E,
)
fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )
self to baseline and generate events to resolve any differences.Source§impl From<EventInstant> for ParamData
impl From<EventInstant> for ParamData
Source§fn from(value: EventInstant) -> Self
fn from(value: EventInstant) -> Self
Source§impl From<InstantMusical> for EventInstant
impl From<InstantMusical> for EventInstant
Source§fn from(value: InstantMusical) -> Self
fn from(value: InstantMusical) -> Self
Source§impl From<InstantSamples> for EventInstant
impl From<InstantSamples> for EventInstant
Source§fn from(value: InstantSamples) -> Self
fn from(value: InstantSamples) -> Self
Source§impl From<InstantSeconds> for EventInstant
impl From<InstantSeconds> for EventInstant
Source§fn from(value: InstantSeconds) -> Self
fn from(value: InstantSeconds) -> Self
Source§impl PartialEq for EventInstant
impl PartialEq for EventInstant
Source§impl Patch for EventInstant
impl Patch for EventInstant
Source§type Patch = EventInstant
type Patch = EventInstant
Source§fn patch(data: &ParamData, _path: &[u32]) -> Result<Self::Patch, PatchError>
fn patch(data: &ParamData, _path: &[u32]) -> Result<Self::Patch, PatchError>
Source§fn patch_event(event: &NodeEventType) -> Option<Self::Patch>
fn patch_event(event: &NodeEventType) -> Option<Self::Patch>
Source§impl TryInto<EventInstant> for &ParamData
impl TryInto<EventInstant> for &ParamData
Source§type Error = PatchError
type Error = PatchError
Source§fn try_into(self) -> Result<EventInstant, PatchError>
fn try_into(self) -> Result<EventInstant, PatchError>
impl Copy for EventInstant
impl StructuralPartialEq for EventInstant
Auto Trait Implementations§
impl Freeze for EventInstant
impl RefUnwindSafe for EventInstant
impl Send for EventInstant
impl Sync for EventInstant
impl Unpin for EventInstant
impl UnwindSafe for EventInstant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.