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§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