Struct vst::api::TimeInfo

source ·
#[repr(C)]
pub struct TimeInfo {
Show 14 fields pub sample_pos: f64, pub sample_rate: f64, pub nanoseconds: f64, pub ppq_pos: f64, pub tempo: f64, pub bar_start_pos: f64, pub cycle_start_pos: f64, pub cycle_end_pos: f64, pub time_sig_numerator: i32, pub time_sig_denominator: i32, pub smpte_offset: i32, pub smpte_frame_rate: SmpteFrameRate, pub samples_to_next_clock: i32, pub flags: i32,
}
Expand description

Describes the time at the start of the block currently being processed

Fields§

§sample_pos: f64

current Position in audio samples (always valid)

§sample_rate: f64

current Sample Rate in Hertz (always valid)

§nanoseconds: f64

System Time in nanoseconds (10^-9 second)

§ppq_pos: f64

Musical Position, in Quarter Note (1.0 equals 1 Quarter Note)

§tempo: f64

current Tempo in BPM (Beats Per Minute)

§bar_start_pos: f64

last Bar Start Position, in Quarter Note

§cycle_start_pos: f64

Cycle Start (left locator), in Quarter Note

§cycle_end_pos: f64

Cycle End (right locator), in Quarter Note

§time_sig_numerator: i32

Time Signature Numerator (e.g. 3 for 3/4)

§time_sig_denominator: i32

Time Signature Denominator (e.g. 4 for 3/4)

§smpte_offset: i32

SMPTE offset in SMPTE subframes (bits; 1/80 of a frame). The current SMPTE position can be calculated using sample_pos, sample_rate, and smpte_frame_rate.

§smpte_frame_rate: SmpteFrameRate

See SmpteFrameRate

§samples_to_next_clock: i32

MIDI Clock Resolution (24 Per Quarter Note), can be negative (nearest clock)

§flags: i32

See TimeInfoFlags

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.