Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
AudioLoadRequest Class Reference

A class object that manages a single asynchronous audio load request. More...

Inheritance diagram for AudioLoadRequest:
AsyncTask AsyncTaskBase TypedReferenceCount Namable TypedObject ReferenceCount

List of all members.

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 ()

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

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().

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties