Table of Contents

Class XSound

Namespace
OmegaEngine.Assets
Assembly
OmegaEngine.dll

Abstract base class for sound assets.

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

Properties

SoundData

public Stream SoundData { get; protected set; }

Property Value

Stream

SoundFormat

public WaveFormat SoundFormat { get; protected set; }

Property Value

WaveFormat

Methods

Dispose(bool)

To be called by Dispose() and the object destructor.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if called manually and not by the garbage collector.

Get(Engine, string)

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

public static XSound Get(Engine engine, string id)

Parameters

engine Engine

The Engine providing the cache.

id string

The ID of the asset to be returned.

Returns

XSound

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 sound data.