OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Static Public Member Functions | Protected Member Functions | Properties | List of all members
OmegaEngine.Assets.XSound Class Reference

Abstract base class for sound assets. More...

Inheritance diagram for OmegaEngine.Assets.XSound:
OmegaEngine.Assets.Asset OmegaEngine.Assets.IReferenceCount OmegaEngine.Assets.XOggSound OmegaEngine.Assets.XWaveSound

Static Public Member Functions

static XSound Get (Engine engine, string id)
 Returns a cached XWaveSound or XOggSound (based on the file ending) or creates a new one if the requested ID is not cached. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 To be called by IDisposable.Dispose and the object destructor. More...
 

Properties

Stream SoundData [get, set]
 
WaveFormat SoundFormat [get, set]
 
- Properties inherited from OmegaEngine.Assets.Asset
string Name [get, set]
 The filename More...
 
int ReferenceCount [get, set]
 How many Renderables use this asset More...
 
bool Disposed [get, set]
 Was this asset already disposed? More...
 

Additional Inherited Members

- Public Member Functions inherited from OmegaEngine.Assets.Asset
override string ToString ()
 
virtual void HoldReference ()
 Increments the ReferenceCount by one. More...
 
virtual void ReleaseReference ()
 Decrements the ReferenceCount by one. More...
 
void Dispose ()
 Disposes the internal DirectX resources of this asset. More...
 

Detailed Description

Abstract base class for sound assets.

Member Function Documentation

override void OmegaEngine.Assets.XSound.Dispose ( bool  disposing)
inlineprotectedvirtual

To be called by IDisposable.Dispose and the object destructor.

Parameters
disposingtrue if called manually and not by the garbage collector.

Reimplemented from OmegaEngine.Assets.Asset.

static XSound OmegaEngine.Assets.XSound.Get ( Engine  engine,
string  id 
)
inlinestatic

Returns a cached XWaveSound or XOggSound (based on the file ending) or creates a new one if the requested ID is not cached.

Parameters
engineThe Engine providing the cache.
idThe ID of the asset to be returned.
Returns
The requested asset; null if id was empty.
Exceptions
FileNotFoundExceptionThe specified file could not be found.
IOExceptionThere was an error reading the file.
UnauthorizedAccessExceptionRead access to the file is not permitted.
InvalidDataExceptionThe file does not contain valid sound data.

Remember to call CacheManager.Clean when done, otherwise this object will never be released.


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