ERY.AgateLib.SoundBuffer Class Reference

A class which is used for loading and playing of sounds. Typically this is used for sound effects, whereas playing background music is done by the Music class. More...

List of all members.

Public Member Functions

 SoundBuffer (string filename)
 Constructs a SoundBuffer object, loading audio data from the specified file.
void Dispose ()
 Disposes of the SoundBuffer object, and all SoundBufferSession objects created by this SoundBuffer.
SoundBufferSession CreateSession ()
 Creates a SoundBufferSession object, for playing of this buffer.
SoundBufferSession Play ()
 Creates a SoundBufferSession object and starts it playing. You can ignore the return value of this function if you just want simple playback.
void Stop ()
 Stops all SoundBufferSession objects created from this sound.

Public Attributes

event Audio.AudioCoreEventDelegate StopEvent
 Event which occurs when Stop is called on the SoundBuffer object.

Properties

SoundBufferImpl Impl [get]
 Returns the implemented object.
string Filename [get]
 Filename this sound was originally loaded from.
double Volume [get, set]
 Gets or sets the default volume that will be used in new sessions. Range is: 0.0 Quiet 0.5 Sounds half volume 1.0 Full volume.
double Pan [get, set]
 Gets or sets the left-right balance that will be used in new sessions. -1 is entirely in the left speaker, 0 is equally in both and, 1 is entirely in the right speaker.
bool IsPlaying [get]
 Returns true if any SoundBufferSession objects are playing.


Detailed Description

A class which is used for loading and playing of sounds. Typically this is used for sound effects, whereas playing background music is done by the Music class.

The SoundBuffer class supports playing the same sound multiple times; this is done through the creation of SoundBufferSession objects for each time the SoundBuffer is played.

SoundBufferSession objects may be recycled, to cut down on the amount of new calls.

This class should support loading of .wav files, at the very least.


Constructor & Destructor Documentation

ERY.AgateLib.SoundBuffer.SoundBuffer ( string  filename  ) 

Constructs a SoundBuffer object, loading audio data from the specified file.

Parameters:
filename 


Member Function Documentation

void ERY.AgateLib.SoundBuffer.Dispose (  ) 

Disposes of the SoundBuffer object, and all SoundBufferSession objects created by this SoundBuffer.

SoundBufferSession ERY.AgateLib.SoundBuffer.CreateSession (  ) 

Creates a SoundBufferSession object, for playing of this buffer.

Returns:

SoundBufferSession ERY.AgateLib.SoundBuffer.Play (  ) 

Creates a SoundBufferSession object and starts it playing. You can ignore the return value of this function if you just want simple playback.

Returns:

void ERY.AgateLib.SoundBuffer.Stop (  ) 

Stops all SoundBufferSession objects created from this sound.


Member Data Documentation

event Audio.AudioCoreEventDelegate ERY.AgateLib.SoundBuffer.StopEvent

Event which occurs when Stop is called on the SoundBuffer object.


Property Documentation

SoundBufferImpl ERY.AgateLib.SoundBuffer.Impl [get]

Returns the implemented object.

string ERY.AgateLib.SoundBuffer.Filename [get]

Filename this sound was originally loaded from.

double ERY.AgateLib.SoundBuffer.Volume [get, set]

Gets or sets the default volume that will be used in new sessions. Range is: 0.0 Quiet 0.5 Sounds half volume 1.0 Full volume.

double ERY.AgateLib.SoundBuffer.Pan [get, set]

Gets or sets the left-right balance that will be used in new sessions. -1 is entirely in the left speaker, 0 is equally in both and, 1 is entirely in the right speaker.

bool ERY.AgateLib.SoundBuffer.IsPlaying [get]

Returns true if any SoundBufferSession objects are playing.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo