Struct rsynth::event::Timed[][src]

pub struct Timed<E> {
    pub time_in_frames: u32,
    pub event: E,
}

Timed<E> adds timing to an event.

Suggestion

If you want to handle events in a sample-accurate way, you can use an EventQueue to queue them when you receive them, and later use the split method on the queue to render the audio.

Fields

time_in_frames: u32

The offset (in frames) of the event relative to the start of the audio buffer.

E.g. when time_in_frames is 6, this means that the event happens on the sixth frame of the buffer in the call to the render_buffer method of the Plugin trait.

event: E

The underlying event.

Implementations

impl<E> Timed<E>[src]

pub fn new(time_in_frames: u32, event: E) -> Self[src]

Trait Implementations

impl<E> AsMut<E> for Timed<E>[src]

impl<E> AsRef<E> for Timed<E>[src]

impl<E> Clone for Timed<E> where
    E: Clone
[src]

impl<E> Copy for Timed<E> where
    E: Copy
[src]

impl<E: Debug> Debug for Timed<E>[src]

impl<E: Eq> Eq for Timed<E>[src]

impl<W> EventHandler<Timed<RawMidiEvent>> for MidiWriterWrapper<W> where
    W: MidiWriter
[src]

impl<E: PartialEq> PartialEq<Timed<E>> for Timed<E>[src]

impl<E> StructuralEq for Timed<E>[src]

impl<E> StructuralPartialEq for Timed<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for Timed<E> where
    E: RefUnwindSafe

impl<E> Send for Timed<E> where
    E: Send

impl<E> Sync for Timed<E> where
    E: Sync

impl<E> Unpin for Timed<E> where
    E: Unpin

impl<E> UnwindSafe for Timed<E> where
    E: UnwindSafe

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<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 

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

impl<S> FromSample<S> for S

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, U> ToSample<U> for T where
    U: FromSample<T>, 

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.