pub struct ActiveAudioClip<'a> {
pub clip_id: &'a ClipId,
pub source_id: &'a SourceId,
pub track_id: &'a TrackId,
pub track_order: usize,
pub clip_order: usize,
pub visual_track: bool,
pub timeline_range: TimeRange,
pub source_range: TimeRange,
pub time_map: TimeMap,
pub active_range: TimeRange,
pub audio: &'a AudioProperties,
}Expand description
One audio clip overlapping an evaluated timeline span.
Identities and authored properties are borrowed from the
crate::ActiveIndex that produced the span.
Fields§
§clip_id: &'a ClipIdActive clip identity.
source_id: &'a SourceIdMedia source needed for this clip.
track_id: &'a TrackIdTrack containing the clip.
track_order: usizePosition of the containing track in project order.
clip_order: usizePosition of the clip in its track’s clip list.
visual_track: boolWhether the containing track composites this clip visually as well.
A video clip with an audio stream is reported here and by
crate::evaluate, so a host mixes its sound without a second clip.
timeline_range: TimeRangeWhole timeline interval occupied by the clip.
source_range: TimeRangeWhole source interval consumed by the clip.
time_map: TimeMapHow the clip’s timeline time maps onto its source range.
active_range: TimeRangePart of the evaluated span this clip covers.
audio: &'a AudioPropertiesAuthored presentation of the immutable project snapshot.
Implementations§
Source§impl ActiveAudioClip<'_>
impl ActiveAudioClip<'_>
Sourcepub fn speed(&self) -> f64
pub fn speed(&self) -> f64
Returns the rate at which the clip consumes its source, forward or backward: the source-to-timeline duration ratio, one for a loop, and zero for a frozen clip.
One means untouched playback. Two consumes source twice as fast, which raises pitch by an octave because the mixer resamples rather than time-stretches.
Sourcepub fn source_time_at(&self, time: MediaTime) -> Option<MediaTime>
pub fn source_time_at(&self, time: MediaTime) -> Option<MediaTime>
Maps a timeline timestamp inside Self::timeline_range to source time.