Class Song
- Namespace
- OmegaEngine.Audio
- Assembly
- OmegaEngine.dll
A streamed sound that is played in the background as music.
public class Song : AudioElement, IDisposable, IAudio
- Inheritance
-
objectSong
- Implements
- Inherited Members
Constructors
Song(string)
A streamed sound that is played in the background as music.
public Song(string id)
Parameters
idstringThe file name of the song relative to the
Musiccontent directory.
Properties
ID
The ID of this song (the file name relative to the Music content directory).
public string ID { get; }
Property Value
Looping
Is this sound set to loop?
public override bool Looping { get; }
Property Value
Playing
Is this sound currently being played?
public override bool Playing { get; }
Property Value
Methods
ApplyVolume()
Applies the current EffectiveVolume to the active playback (if any).
protected override void ApplyVolume()
OnDispose()
Hook that is called when the object needs to dispose its internal resources.
protected override void OnDispose()
StartPlayback(bool)
Starts the song playback
public override void StartPlayback(bool looping)
Parameters
loopingbool
Exceptions
- FileNotFoundException
The song file could not be found.
- IOException
There was a problem loading the song.
- InvalidDataException
The song file does not contain valid sound data.
StopPlayback()
Stops the song playback
public override void StopPlayback()