OmegaEngine API
1.0.3
|
A sound loaded from a WAVE file. More...
Static Public Member Functions | |
static new XWaveSound | Get (Engine engine, string id) |
Returns a cached XWaveSound or creates a new one if the requested ID is not cached. More... | |
Static Public Member Functions inherited from OmegaEngine.Assets.XSound | |
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 | |
XWaveSound (Stream stream) | |
Loads a sound from an WAVE file. More... | |
Protected Member Functions inherited from OmegaEngine.Assets.XSound | |
override void | Dispose (bool disposing) |
To be called by IDisposable.Dispose and the object destructor. 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... | |
Properties inherited from OmegaEngine.Assets.XSound | |
Stream | SoundData [get, protected set] |
WaveFormat | SoundFormat [get, protected set] |
Properties inherited from OmegaEngine.Assets.Asset | |
string | Name [get, set] |
The filename More... | |
int | ReferenceCount [get] |
How many Renderables use this asset More... | |
bool | Disposed [get] |
Was this asset already disposed? More... | |
Properties inherited from NanoByte.Common.INamed< Asset > | |
string | Name |
A sound loaded from a WAVE file.
|
inlineprotected |
Loads a sound from an WAVE file.
stream | The WAVE file to load the sound from. |
InvalidDataException | stream does not contain a valid WAVE sound file. |
This should only be called by Get to prevent unnecessary duplicates.
|
inlinestatic |
Returns a cached XWaveSound or creates a new one if the requested ID is not cached.
engine | The Engine providing the cache. |
id | The ID of the asset to be returned. |
null
if id was empty.FileNotFoundException | The specified file could not be found. |
IOException | There was an error reading the file. |
UnauthorizedAccessException | Read access to the file is not permitted. |
InvalidDataException | The file does not contain valid WAVE sound data. |
Remember to call CacheManager.Clean when done, otherwise this object will never be released.