A class object that manages a single asynchronous audio load request. More...
Public Member Functions | |
AudioLoadRequest (AudioManager audio_manager, string filename, bool positional) | |
Create a new AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load. | |
AudioManager | getAudioManager () |
Returns the AudioManager that will serve this asynchronous AudioLoadRequest. | |
string | getFilename () |
Returns the filename associated with this asynchronous AudioLoadRequest. | |
bool | getPositional () |
Returns the positional flag associated with this asynchronous AudioLoadRequest. | |
AudioSound | getSound () |
Returns the sound that was loaded asynchronously, if any, or NULL if there was an error. | |
bool | isReady () |
Returns true if this request has completed, false if it is still pending. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
A class object that manages a single asynchronous audio load request.
This works in conjunction with the Loader class defined in pgraph, or really with any AsyncTaskManager. Create a new AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
AudioLoadRequest | ( | AudioManager | audio_manager, |
string | filename, | ||
bool | positional | ||
) |
Create a new AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
Returns the AudioManager that will serve this asynchronous AudioLoadRequest.
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from AsyncTask.
string getFilename | ( | ) |
Returns the filename associated with this asynchronous AudioLoadRequest.
bool getPositional | ( | ) |
Returns the positional flag associated with this asynchronous AudioLoadRequest.
AudioSound getSound | ( | ) |
Returns the sound that was loaded asynchronously, if any, or NULL if there was an error.
It is an error to call this unless is_ready() returns true.
bool isReady | ( | ) |
Returns true if this request has completed, false if it is still pending.
When this returns true, you may retrieve the sound loaded by calling get_sound().