pub struct PulsePlaybackHandle { /* private fields */ }Expand description
Handle for a real-time or looping sound started by PulsePlaybackEngine.
Implementations§
Source§impl PulsePlaybackHandle
impl PulsePlaybackHandle
Sourcepub fn from_parts(engine: Rc<AudioEngine>, sound_id: SoundId) -> Self
pub fn from_parts(engine: Rc<AudioEngine>, sound_id: SoundId) -> Self
Creates a handle from an engine reference and tunes sound identifier.
Sourcepub fn stop(&self) -> PulseResult<Self>
pub fn stop(&self) -> PulseResult<Self>
Stops playback and returns a cloned handle for Lua chainability.
§Errors
Returns an error when the engine rejects the stop request.
Sourcepub fn volume(&self, volume: f32) -> PulseResult<Self>
pub fn volume(&self, volume: f32) -> PulseResult<Self>
Sets playback volume and returns a cloned handle for Lua chainability.
§Errors
Returns an error when volume is invalid or the engine rejects the request.
Sourcepub fn pan(&self, pan: f32) -> PulseResult<Self>
pub fn pan(&self, pan: f32) -> PulseResult<Self>
Sets playback stereo pan and returns a cloned handle for Lua chainability.
§Errors
Returns an error when pan is invalid or the engine rejects the request.
Sourcepub fn rate(&self, rate: f32) -> PulseResult<Self>
pub fn rate(&self, rate: f32) -> PulseResult<Self>
Sets playback rate and returns a cloned handle for Lua chainability.
§Errors
Returns an error when rate is invalid or the engine rejects the request.
Sourcepub fn pause(&self) -> PulseResult<Self>
pub fn pause(&self) -> PulseResult<Self>
Pauses playback and returns a cloned handle for Lua chainability.
§Errors
Returns an error when the engine rejects the pause request.
Sourcepub fn resume(&self) -> PulseResult<Self>
pub fn resume(&self) -> PulseResult<Self>
Resumes playback and returns a cloned handle for Lua chainability.
§Errors
Returns an error when the engine rejects the resume request.
Trait Implementations§
Source§impl Clone for PulsePlaybackHandle
impl Clone for PulsePlaybackHandle
Source§fn clone(&self) -> PulsePlaybackHandle
fn clone(&self) -> PulsePlaybackHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PulsePlaybackHandle
impl Debug for PulsePlaybackHandle
Source§impl UserData for PulsePlaybackHandle
impl UserData for PulsePlaybackHandle
Source§fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
Source§fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
Source§fn register(registry: &mut UserDataRegistry<Self>)
fn register(registry: &mut UserDataRegistry<Self>)
Auto Trait Implementations§
impl !RefUnwindSafe for PulsePlaybackHandle
impl !Send for PulsePlaybackHandle
impl !Sync for PulsePlaybackHandle
impl !UnwindSafe for PulsePlaybackHandle
impl Freeze for PulsePlaybackHandle
impl Unpin for PulsePlaybackHandle
impl UnsafeUnpin for PulsePlaybackHandle
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
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,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more