Table of Contents

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
object
Song
Implements
Inherited Members

Constructors

Song(string)

A streamed sound that is played in the background as music.

public Song(string id)

Parameters

id string

The file name of the song relative to the Music content directory.

Properties

ID

The ID of this song (the file name relative to the Music content directory).

public string ID { get; }

Property Value

string

Looping

Is this sound set to loop?

public override bool Looping { get; }

Property Value

bool

Playing

Is this sound currently being played?

public override bool Playing { get; }

Property Value

bool

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

looping bool

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()