IPlayableSound Interface
Namespace: Stride.AudioAssembly: Stride.Audio.dll
Interface for a playable sound.
A playable sound can loop (ref
public interface IPlayableSound
Name | Description | |
---|---|---|
Properties | ||
IsLooping | Gets or sets whether the sound is automatically looping from beginning when it reaches the end. |
|
PlayState | The current state of the sound. |
|
Volume | The global volume at which the sound is played. |
|
Methods | ||
Pause() | Pause the sounds. |
|
Play() | Start or resume playing the sound. |
|
Stop() | Stop playing the sound immediately and reset the sound to the beginning of the track. |
Properties
IsLooping
Gets or sets whether the sound is automatically looping from beginning when it reaches the end.
bool IsLooping { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PlayState
The current state of the sound.
PlayState PlayState { get; }
Property Value
Type | Description |
---|---|
PlayState |
Volume
The global volume at which the sound is played.
float Volume { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Volume is ranging from 0.0f (silence) to 1.0f (full volume). Values beyond those limits are clamped.
Methods
Pause()
Pause the sounds.
void Pause()
Remarks
A call to Pause when the sound is already paused or stopped has no effects.
Play()
Start or resume playing the sound.
void Play()
Remarks
A call to Play when the sound is already playing has no effects.
Stop()
Stop playing the sound immediately and reset the sound to the beginning of the track.
void Stop()
Remarks
A call to Stop when the sound is already stopped has no effects