Struct ez_audio::AudioHandle [−][src]
A handle that can be used to control audio playback.
Implementations
impl<T> AudioHandle<T>
[src]
pub fn play(&self)
[src]
Starts playing audio.
pub fn stop(&self)
[src]
Pauses playback.
pub fn reset(&self)
[src]
Resets to start of audio clip.
pub fn path(&self) -> &Path
[src]
Returns the path used to create the handle.
pub fn name(&self) -> &str
[src]
Returns name of file used to create the handle.
pub fn set_volume(&self, volume: f32)
[src]
Sets volume.
pub fn volume(&self) -> f32
[src]
Returns volume.
pub fn is_playing(&self) -> bool
[src]
Checks if the handle is currently playing
pub fn is_paused(&self) -> bool
[src]
Checks if the handle is currently paused
pub fn duration(&self) -> Duration
[src]
Gets duration of audio handle
pub fn set_output_device(&self, device: &Device)
[src]
Sets playback device
pub fn set_user_data(&mut self, data: T)
[src]
Sets userdata.
pub fn modify_user_data<I: FnMut(&mut T)>(&self, closure: I)
[src]
Modifes userdata using closure.
Trait Implementations
impl<T> Drop for AudioHandle<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for AudioHandle<T>
impl<T> Send for AudioHandle<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Sync for AudioHandle<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Unpin for AudioHandle<T>
impl<T> UnwindSafe for AudioHandle<T>
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, 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>,