OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
OmegaEngine.Audio.Song Class Reference

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

Inheritance diagram for OmegaEngine.Audio.Song:
OmegaEngine.EngineElement OmegaEngine.IAudio

Public Member Functions

 Song (string id)
 Loads a song from an OGG file More...
 
void StartPlayback (bool looping)
 Starts the song playback More...
 
void StopPlayback ()
 Stops the song playback More...
 
- Public Member Functions inherited from OmegaEngine.EngineElement
void Dispose ()
 

Public Attributes

bool Playing => !_soundBuffer.Disposed && _soundBuffer.Status == BufferStatus.Playing
 
bool Looping => !_soundBuffer.Disposed && _soundBuffer.Status == BufferStatus.Looping
 
- Public Attributes inherited from OmegaEngine.EngineElement
bool IsEngineSet => _engine != null
 true if the Engine has been set. More...
 

Protected Member Functions

override void OnEngineSet ()
 Hook that is calld when Engine is set for the first time.
 
override void OnDispose ()
 Hook that is called when the object needs to dispose its internal resources.
 
- Protected Member Functions inherited from OmegaEngine.EngineElement
void RegisterChild (EngineElement element, bool autoDispose=true)
 Registers a child EngineElement for automatic Engine setting and Dispose calling. More...
 
void UnregisterChild (EngineElement element)
 Unregisters a child EngineElement (opposite of RegisterChild). More...
 

Properties

string ID [get, set]
 The ID of this song More...
 
int Volume [get, set]
 >
 
- Properties inherited from OmegaEngine.EngineElement
Engine Engine [get, set]
 The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set! More...
 
bool IsDisposed [get, set]
 Indicates whether this object has been disposed and can therefore no longer be used. More...
 
- Properties inherited from OmegaEngine.IAudio
bool Playing [get]
 Is this sound currently being played? More...
 
bool Looping [get]
 Is this sound set to loop? More...
 
int Volume [get, set]
 The playback volume for the asset. More...
 

Detailed Description

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

Constructor & Destructor Documentation

OmegaEngine.Audio.Song.Song ( string  id)
inline

Loads a song from an OGG file

Parameters
idThe OGG file to load the song from
Exceptions
IOExceptionThere was a problem loading the song.

Member Function Documentation

void OmegaEngine.Audio.Song.StartPlayback ( bool  looping)
inline

Starts the song playback

Implements OmegaEngine.IAudio.

void OmegaEngine.Audio.Song.StopPlayback ( )
inline

Stops the song playback

Implements OmegaEngine.IAudio.

Property Documentation

string OmegaEngine.Audio.Song.ID
getset

The ID of this song


The documentation for this class was generated from the following file: