Class Song
- Namespace
- OmegaEngine.Audio
- Assembly
- OmegaEngine.dll
A streamed sound that is played in the background as music.
public class Song : EngineElement, IDisposable, IAudio
- Inheritance
-
Song
- Implements
- Inherited Members
- Extension Methods
Constructors
Song(string)
Loads a song from an OGG file
public Song(string id)
Parameters
id
stringThe OGG file to load the song from
Exceptions
- IOException
There was a problem loading the song.
Properties
ID
The ID of this song
public string ID { get; }
Property Value
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 song playback
public void StartPlayback(bool looping)
Parameters
looping
bool
StopPlayback()
Stops the song playback
public void StopPlayback()