Struct kira::sound::static_sound::StaticSoundHandle [−][src]
pub struct StaticSoundHandle { /* fields omitted */ }
Expand description
Controls a static sound.
Implementations
Returns the current playback state of the sound.
pub fn set_volume(
&mut self,
volume: impl Into<Volume>,
tween: Tween
) -> Result<(), CommandError>
pub fn set_volume(
&mut self,
volume: impl Into<Volume>,
tween: Tween
) -> Result<(), CommandError>
Sets the volume of the sound (as a factor of the original volume).
pub fn set_playback_rate(
&mut self,
playback_rate: impl Into<PlaybackRate>,
tween: Tween
) -> Result<(), CommandError>
pub fn set_playback_rate(
&mut self,
playback_rate: impl Into<PlaybackRate>,
tween: Tween
) -> Result<(), CommandError>
Sets the playback rate of the sound.
Changing the playback rate will change both the speed and pitch of the sound.
Sets the panning of the sound, where 0.0
is hard left,
0.5
is center, and 1.0
is hard right.
Fades out the sound to silence with the given tween and then pauses playback.
Resumes playback and fades in the sound from silence with the given tween.
Fades out the sound to silence with the given tween and then stops playback.
Once the sound is stopped, it cannot be restarted.
Sets the playback position to the specified time in seconds.