Table of Contents

Class XOggSound

Namespace
OmegaEngine.Assets
Assembly
OmegaEngine.dll

A sound loaded from an OGG Vorbis file.

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

Constructors

XOggSound(Stream)

Loads a sound from an OGG file.

protected XOggSound(Stream stream)

Parameters

stream Stream

The OGG 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 Ogg Vorbis sound file.

Methods

Get(Engine, string)

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

public static XOggSound Get(Engine engine, string id)

Parameters

engine Engine

The Engine providing the cache.

id string

The ID of the asset to be returned.

Returns

XOggSound

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