Table of Contents

Class XWaveSound

Namespace
OmegaEngine.Assets
Assembly
OmegaEngine.dll

A sound loaded from a WAVE file.

public class XWaveSound : XSound, IReferenceCount, IDisposable, INamed, IComparable<Asset>
Inheritance
XWaveSound
Implements
Inherited Members
Extension Methods

Constructors

XWaveSound(Stream)

Loads a sound from an WAVE file.

protected XWaveSound(Stream stream)

Parameters

stream Stream

The WAVE file to load the sound from.

Remarks

This should only be called by Get(Engine, string) to prevent unnecessary duplicates.

Exceptions

InvalidDataException

stream does not contain a valid WAVE sound file.

Methods

Get(Engine, string)

Returns a cached XWaveSound or creates a new one if the requested ID is not cached.

public static XWaveSound Get(Engine engine, string id)

Parameters

engine Engine

The Engine providing the cache.

id string

The ID of the asset to be returned.

Returns

XWaveSound

The requested asset; null if id was empty.

Remarks

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

Exceptions

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.