pub struct Sound { /* private fields */ }
Expand description

Represents a sound in the AudioEngine. If this is dropped, the sound will continue to play until it ends.

Implementations

Starts or continue to play the sound.

If the sound was paused or stop, it will start playing again. Otherwise, does nothing.

Pause the sound.

If the sound is playing, it will pause. If play is called, this sound will continue from where it was before pause. If the sound is not playing, does nothing.

Stop the sound.

If the sound is playing, it will pause and reset the song. When play is called, this sound will start from the begging. Even if the sound is not playing, it will reset the sound to the start.

Reset the sound to the start.

The behaviour is the same being the sound playing or not.

Set the volume of the sound.

Set if the sound will repeat even time it reach the end.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.