Aengine == "audio engine" The audio engine is the beating heart of Hz. At least when it's making sounds. There is a single audio engine within each running instance of Hz and you can use the MusicAPI to initiate requests to start and stop it.
Within the audio engine is a single Audio Graph. Each Ascene owns a subset of Anodes that reside within the graph.
It's unusual for user-scripts to directly interact with
Aengine
since the Ascene module and AudioStatus panel are its usual controllers. The audio engine instance creation is the responsibility of the system which also provides access to its instance.
Method | Description |
---|---|
async Probe() |
Report audio interfaces. See example. |
async Open(outdev=0, indev=0, api="default", srate=0) |
Ensure audio engine is running. You can override Audio Settings by providing non-default values for the parameters. Note that if the audio engine is already running, new settings will be ignored. |
async Close() |
Requests engine shutdown. |
GetGraph() |
Returns the current (global) audio graph. |
IsRunning() |
Returns the boolean indicating whether the engine is running. |
GetSampleRate() |
Returns the current sample rate, 0 if not running. |
GetCurrentTime() |
Returns the time (in samples), 0 if not running. |
Seconds(float number) |
Returns a duration (in samples) that represents the requested seconds. |
async Wait(samples) |
Returns a promise to wait the number of samples relative to the current time. |
async WaitTil(samples) |
Returns a promise to wait 'til the absolute number of samples are reached in the engine. |
async ResetTimeContext) |
Returns a promise to reset the time context associated with the calling context. |