AudioLoadRequest
from panda3d.core import AudioLoadRequest
- class AudioLoadRequest
Bases:
Bases:
AsyncTaskA 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
- __init__(audio_manager: AudioManager, filename: Filename, positional: bool)
Create a new
AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
- __init__(audio_manager: AudioManager, source: MovieAudio, positional: bool)
Create a new
AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
- get_audio_manager() AudioManager
Returns the
AudioManagerthat will serve this asynchronousAudioLoadRequest.
- static get_class_type() TypeHandle
- get_filename() Filename
Returns the filename associated with this asynchronous
AudioLoadRequest.
- get_positional() bool
Returns the positional flag associated with this asynchronous
AudioLoadRequest.
- get_sound() 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.
- is_ready() 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
get_sound(). Equivalent toreq.done() and not req.cancelled().
