panda3d.core.AudioLoadRequest

class AudioLoadRequest

Bases: AsyncTask

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.

Inheritance diagram

Inheritance diagram of AudioLoadRequest

__init__(param0: AudioLoadRequest) → None
__init__(audio_manager: AudioManager, filename: str, positional: bool) → None

Create a new AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.

getAudioManager() → AudioManager

Returns the AudioManager that will serve this asynchronous AudioLoadRequest.

Return type

AudioManager

getFilename() → str

Returns the filename associated with this asynchronous AudioLoadRequest.

getPositional() → bool

Returns the positional flag associated with this asynchronous AudioLoadRequest.

isReady() → bool

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 getSound(). Equivalent to req.done() and not req.cancelled().

See done().

getSound() → AudioSound

Returns the sound that was loaded asynchronously, if any, or nullptr if there was an error. It is an error to call this unless done() returns true.

Deprecated: Use result() instead.

Return type

AudioSound

static getClassType() → TypeHandle
Return type

TypeHandle