Struct kira::arrangement::SoundClip [−][src]
A segment of a sound in an arrangement.
Fields
sound_id: SoundId
The ID of the sound.
clip_time_range: (f64, f64)
The start and end point of the clip.
sound_time_range: (f64, f64)
The start and end point of the sound.
This range of the sound is stretched over the range of the clip.
Implementations
impl SoundClip
[src]
pub fn new(sound_handle: &SoundHandle, clip_start_time: f64) -> Self
[src]
Creates a new sound clip that starts at the specified time and contains the whole sound without any cropping or speed up/slow down.
pub fn duration(&self) -> f64
[src]
Gets the duration of the sound clip.
pub fn stretch(self, factor: f64) -> Self
[src]
Increases the length of the clip by the given factor.
A factor greater than 1 will slow down the sound, and a factor less than 1 will speed it up.
pub fn trim(self, duration: f64) -> Self
[src]
Sets the duration of the clip, preserving the playback rate of the sound.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SoundClip
impl Send for SoundClip
impl Sync for SoundClip
impl Unpin for SoundClip
impl UnwindSafe for SoundClip
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,