Public Member Functions | |
| SoundBuffer (string filename) | |
| Constructs a SoundBuffer object, loading audio data from the specified file. | |
| SoundBuffer (IFileProvider fileProvider, string filename) | |
| Constructs a SoundBuffer object, loading audio data from the specified file given the specified IFileProvider. | |
| SoundBuffer (Stream source) | |
| Constructs a SoundBuffer object, loading audio data from the passed stream. | |
| 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. | |
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. | |
Events | |
| Audio.AudioCoreEventDelegate | StopEvent |
| Event which occurs when Stop is called on the SoundBuffer object. | |
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.
| AgateLib.AudioLib.SoundBuffer.SoundBuffer | ( | string | filename | ) |
| AgateLib.AudioLib.SoundBuffer.SoundBuffer | ( | IFileProvider | fileProvider, | |
| string | filename | |||
| ) |
Constructs a SoundBuffer object, loading audio data from the specified file given the specified IFileProvider.
| fileProvider | ||
| filename |
| AgateLib.AudioLib.SoundBuffer.SoundBuffer | ( | Stream | source | ) |
| SoundBufferSession AgateLib.AudioLib.SoundBuffer.CreateSession | ( | ) |
| void AgateLib.AudioLib.SoundBuffer.Dispose | ( | ) |
Disposes of the SoundBuffer object, and all SoundBufferSession objects created by this SoundBuffer.
| SoundBufferSession AgateLib.AudioLib.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.
| void AgateLib.AudioLib.SoundBuffer.Stop | ( | ) |
Stops all SoundBufferSession objects created from this sound.
string AgateLib.AudioLib.SoundBuffer.Filename [get] |
Filename this sound was originally loaded from.
SoundBufferImpl AgateLib.AudioLib.SoundBuffer.Impl [get] |
Returns the implemented object.
bool AgateLib.AudioLib.SoundBuffer.IsPlaying [get] |
Returns true if any SoundBufferSession objects are playing.
double AgateLib.AudioLib.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.
double AgateLib.AudioLib.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.
| Audio.AudioCoreEventDelegate AgateLib.AudioLib.SoundBuffer.StopEvent |
Event which occurs when Stop is called on the SoundBuffer object.
|
AgateLib Awesome Game and Tool Engine Library |
|