AudioLoadRequest¶
from acron.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
digraph inheritance99d0890662 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AsyncFuture" [URL="acron.core.AsyncFuture.html#acron.core.AsyncFuture",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "AsyncFuture" [arrowsize=0.75,style=""]; "AsyncTask" [URL="acron.core.AsyncTask.html#acron.core.AsyncTask",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "AsyncFuture" -> "AsyncTask" [arrowsize=0.75,style=""]; "Namable" -> "AsyncTask" [arrowsize=0.75,style=""]; "AudioLoadRequest" [URL="acron.core.AudioLoadRequest.html#acron.core.AudioLoadRequest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "AsyncTask" -> "AudioLoadRequest" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Namable" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- __init__()¶
Create a new
AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.Create a new
AudioLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
- get_audio_manager()¶
Returns the
AudioManagerthat will serve this asynchronousAudioLoadRequest.
- static get_class_type()¶
- get_filename()¶
Returns the filename associated with this asynchronous
AudioLoadRequest.
- get_positional()¶
Returns the positional flag associated with this asynchronous
AudioLoadRequest.
- get_sound()¶
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()¶
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().