pub struct FilePlaybackHandle { /* private fields */ }Expand description
Change runtime playback properties of a playing FileSource and test
if a source is still playing.
Handles are Send and Sync so they can be sent across threads.
To track detailed playback status use a PlaybackStatusEvent
sync_channel in the Player.
Implementations§
Source§impl FilePlaybackHandle
impl FilePlaybackHandle
Sourcepub fn id(&self) -> PlaybackId
pub fn id(&self) -> PlaybackId
Get the playback ID of this source.
Sourcepub fn is_playing(&self) -> bool
pub fn is_playing(&self) -> bool
Check if this source is still playing.
Sourcepub fn stop<T: Into<Option<u64>>>(&self, stop_time: T) -> Result<(), Error>
pub fn stop<T: Into<Option<u64>>>(&self, stop_time: T) -> Result<(), Error>
Stop this source at the given sample time or immediately.
Sourcepub fn seek<T: Into<Option<u64>>>(
&self,
position: Duration,
sample_time: T,
) -> Result<(), Error>
pub fn seek<T: Into<Option<u64>>>( &self, position: Duration, sample_time: T, ) -> Result<(), Error>
Change playback position of the source at a specific sample time or immediately.
Sourcepub fn set_speed<T: Into<Option<u64>>>(
&self,
speed: f64,
glide: Option<f32>,
sample_time: T,
) -> Result<(), Error>
pub fn set_speed<T: Into<Option<u64>>>( &self, speed: f64, glide: Option<f32>, sample_time: T, ) -> Result<(), Error>
Set file source’s speed at a given sample time in future or immediately, with the given optional glide rate in semitones per second.
Trait Implementations§
Source§impl Clone for FilePlaybackHandle
impl Clone for FilePlaybackHandle
Source§fn clone(&self) -> FilePlaybackHandle
fn clone(&self) -> FilePlaybackHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FilePlaybackHandle
impl !RefUnwindSafe for FilePlaybackHandle
impl Send for FilePlaybackHandle
impl Sync for FilePlaybackHandle
impl Unpin for FilePlaybackHandle
impl !UnwindSafe for FilePlaybackHandle
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