pub struct AudioClip {Show 14 fields
pub id: u64,
pub name: String,
pub metadata: AudioFileMetadata,
pub timeline_start_seconds: f64,
pub timeline_end_seconds: f64,
pub source_offset_seconds: f64,
pub gain_db: f32,
pub fade_in_seconds: f32,
pub fade_out_seconds: f32,
pub pitch_semitones: f32,
pub time_stretch_ratio: f32,
pub mute: bool,
pub color: u32,
pub locked: bool,
}Fields§
§id: u64§name: String§metadata: AudioFileMetadata§timeline_start_seconds: f64§timeline_end_seconds: f64§source_offset_seconds: f64§gain_db: f32§fade_in_seconds: f32§fade_out_seconds: f32§pitch_semitones: f32§time_stretch_ratio: f32§mute: bool§color: u32§locked: boolImplementations§
Source§impl AudioClip
impl AudioClip
pub fn new(id: u64, name: &str, metadata: AudioFileMetadata) -> Self
pub fn duration_seconds(&self) -> f64
pub fn contains_time(&self, time: f64) -> bool
pub fn source_time_at(&self, timeline_time: f64) -> f64
pub fn gain_at_time(&self, timeline_time: f64) -> f32
pub fn move_to(&mut self, new_start: f64)
pub fn trim_start(&mut self, new_start: f64)
pub fn trim_end(&mut self, new_end: f64)
pub fn split_at(&self, time: f64) -> Option<(AudioClip, AudioClip)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioClip
impl RefUnwindSafe for AudioClip
impl Send for AudioClip
impl Sync for AudioClip
impl Unpin for AudioClip
impl UnsafeUnpin for AudioClip
impl UnwindSafe for AudioClip
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<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>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.