fluidvis
|
#include <SXCore.h>
Public Member Functions | |
EX | AudioBuffer (const string &id) |
EX | ~AudioBuffer () |
EX void | load () |
EX void | unload () |
EX bool | isLoaded () const |
EX void | setPath (const string &path) |
EX unsigned int | getBufferID () const |
Public Member Functions inherited from sx::SXResource | |
virtual EX | ~SXResource () |
EX const string & | getID () const |
Additional Inherited Members | |
Protected Attributes inherited from sx::SXResource | |
string | id |
Audio Buffer class. This class holds the dataset specifying sound. To play the content stored in an AudioBuffer, an AudioObject must be used. Multiple AudioObjects can use and playback the content of one buffer simultaneously.
EX sx::AudioBuffer::AudioBuffer | ( | const string & | id | ) |
constructor
EX sx::AudioBuffer::~AudioBuffer | ( | ) |
deconstructor
EX unsigned int sx::AudioBuffer::getBufferID | ( | ) | const |
Returns the OpenAL buffer id. If this is not loaded, 0 is returned.
|
virtual |
returns true iff this is loaded
Implements sx::SXResource.
|
virtual |
If setPath was called with a valid url pointing to a file, load tries to load audio content to this. This is only loaded, iff the invocation of load succeeded in loading from the path specified by setPath. If setPath has not been called after the last successful invocation of load, the next invocation of load has no effect.
Implements sx::SXResource.
EX void sx::AudioBuffer::setPath | ( | const string & | path | ) |
Specifies the path of a file from which the audio content of this will be loaded. Currently only wav files are supported.
EX void sx::AudioBuffer::unload | ( | ) |
deconstructs the currently loaded resources, and leaves this unloaded