Class Sound
- Namespace
- OmegaEngine.Audio
- Assembly
- OmegaEngine.dll
A memory-cached sound that is played on-demand.
public class Sound : EngineElement, IDisposable, IAudio
- Inheritance
-
Sound
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Sound(XSound)
Sets up a new Sound based on an XSound asset.
public Sound(XSound sound)
Parameters
Fields
Asset
A reference to the asset providing the data for this sound.
protected readonly XSound Asset
Field Value
SoundBuffer
The sound buffer containing the decoded data ready for playback.
protected SecondarySoundBuffer SoundBuffer
Field Value
- SecondarySoundBuffer
Properties
Looping
Is this sound set to loop?
public bool Looping { get; }
Property Value
Playing
Is this sound currently being played?
public bool Playing { get; }
Property Value
Volume
The playback volume for the asset.
public int Volume { get; set; }
Property Value
Methods
OnDispose()
Hook that is called when the object needs to dispose its internal resources.
protected override void OnDispose()
OnEngineSet()
Hook that is called when Engine is set for the first time.
protected override void OnEngineSet()
StartPlayback(bool)
Starts the sound playback
public virtual void StartPlayback(bool looping)
Parameters
looping
bool
StopPlayback()
Stops the sound playback
public virtual void StopPlayback()