Enum tetra::audio::SoundState
source · pub enum SoundState {
Playing,
Paused,
Stopped,
}
Expand description
The states that playback of a SoundInstance
can be in.
Variants§
Playing
The sound is currently playing.
If a SoundInstance
is created via Sound::play
, Sound::play_with
,
Sound::repeat
or Sound::repeat_with
, it will be in this state
initially.
Paused
The sound is paused. If playback is resumed, it will continue from the point where it was paused.
If a SoundInstance
is created via Sound::spawn
or Sound::spawn_with
,
it will be in this state initially.
Stopped
The sound has stopped, either manually or as a result of it reaching the end of the audio data. If playback is resumed, it will start over from the beginning of the sound.
This state will never occur while a SoundInstance
is set
to be repeating
.
Trait Implementations§
source§impl Clone for SoundState
impl Clone for SoundState
source§fn clone(&self) -> SoundState
fn clone(&self) -> SoundState
Returns a copy 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 moresource§impl Debug for SoundState
impl Debug for SoundState
source§impl PartialEq<SoundState> for SoundState
impl PartialEq<SoundState> for SoundState
source§fn eq(&self, other: &SoundState) -> bool
fn eq(&self, other: &SoundState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.