pub enum AudioCommand {
Play {
playback: PlaybackId,
sound: SoundId,
volume: f32,
looped: bool,
fade_in_ms: f32,
},
Stop {
playback: PlaybackId,
fade_ms: f32,
},
SetVolume {
playback: PlaybackId,
volume: f32,
tween_ms: f32,
},
Pause {
playback: PlaybackId,
fade_ms: f32,
},
Resume {
playback: PlaybackId,
fade_ms: f32,
},
MasterVolume {
volume: f32,
tween_ms: f32,
},
Unload {
sound: SoundId,
},
}Expand description
An audio intent for the frame driver. Durations are ms; volumes are linear amplitude. Drivers ignore playbacks they no longer hold.
Variants§
Play
Stop
SetVolume
Pause
Resume
MasterVolume
Unload
The sound was unregistered: drop any decoded copy.
Implementations§
Trait Implementations§
Source§impl Clone for AudioCommand
impl Clone for AudioCommand
Source§fn clone(&self) -> AudioCommand
fn clone(&self) -> AudioCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioCommand
impl Debug for AudioCommand
Source§impl PartialEq for AudioCommand
impl PartialEq for AudioCommand
impl StructuralPartialEq for AudioCommand
Auto Trait Implementations§
impl Freeze for AudioCommand
impl RefUnwindSafe for AudioCommand
impl Send for AudioCommand
impl Sync for AudioCommand
impl Unpin for AudioCommand
impl UnsafeUnpin for AudioCommand
impl UnwindSafe for AudioCommand
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.