CsoundUnity 4.0.0-alpha.3
Loading...
Searching...
No Matches
Csound.Unity.CsoundRootControl Struct Reference

Control struct for the AudioPath.RootOutput path (Unity 6+). More...

Inheritance diagram for Csound.Unity.CsoundRootControl:

Public Member Functions

JobHandle Configure (ControlContext context, ref CsoundRootRealtime realtime, in AudioFormat format)
 Called by Unity before the first mix frame and on audio-system reconfiguration. Keeps CsoundRootRealtime.InstanceId in sync.
void Dispose (ControlContext context, ref CsoundRootRealtime realtime)
 No managed resources to release.
void Update (ControlContext context, ProcessorInstance.Pipe pipe)
 No pipe messages used in Phase 1.
ProcessorInstance.Response OnMessage (ControlContext context, ProcessorInstance.Pipe pipe, ProcessorInstance.Message message)
 No incoming messages handled in Phase 1.

Package Attributes

int InstanceId
 Index into CsoundBridgeRegistry.

Detailed Description

Control struct for the AudioPath.RootOutput path (Unity 6+).

Implements RootOutputInstance.IControl<CsoundRootRealtime>. Mirrors CsoundControl on the IAudioGenerator path: drains the command queue (SetChannel, MIDI) each audio block, and keeps CsoundRootRealtime.InstanceId in sync.

Key difference from CsoundControl: Configure does not return a GeneratorInstance.Setup — for RootOutput the audio format is always the system format; there is no per-generator override.

Member Function Documentation

◆ Configure()

JobHandle Csound.Unity.CsoundRootControl.Configure ( ControlContext context,
ref CsoundRootRealtime realtime,
in AudioFormat format )
inline

Called by Unity before the first mix frame and on audio-system reconfiguration. Keeps CsoundRootRealtime.InstanceId in sync.

Parameters
contextThe control thread context Unity passes in.
realtimeThe unmanaged realtime struct Unity keeps for this instance.
formatThe audio format Unity is configuring.
Returns
The job the configuration runs as.

◆ Dispose()

void Csound.Unity.CsoundRootControl.Dispose ( ControlContext context,
ref CsoundRootRealtime realtime )
inline

No managed resources to release.

Parameters
contextThe control thread context Unity passes in.
realtimeThe unmanaged realtime struct Unity keeps for this instance.

◆ OnMessage()

ProcessorInstance.Response Csound.Unity.CsoundRootControl.OnMessage ( ControlContext context,
ProcessorInstance.Pipe pipe,
ProcessorInstance.Message message )
inline

No incoming messages handled in Phase 1.

Parameters
contextThe control thread context Unity passes in.
pipeThe pipe that carries messages between the control and audio sides.
messageThe message Unity is delivering.
Returns
Whether the message was handled.

◆ Update()

void Csound.Unity.CsoundRootControl.Update ( ControlContext context,
ProcessorInstance.Pipe pipe )
inline

No pipe messages used in Phase 1.

Parameters
contextThe control thread context Unity passes in.
pipeThe pipe that carries messages between the control and audio sides.

Member Data Documentation

◆ InstanceId

int Csound.Unity.CsoundRootControl.InstanceId
package

Index into CsoundBridgeRegistry.


The documentation for this struct was generated from the following file: