|
| void | Configure (ControlContext context, ref CsoundRealtime realtime, in AudioFormat format, out GeneratorInstance.Setup setup, ref GeneratorInstance.Properties properties) |
| | Called on the control thread at first use and on every audio-system reconfiguration. Synchronises the realtime struct's InstanceId.
|
| void | Dispose (ControlContext context, ref CsoundRealtime realtime) |
| | No teardown needed in Phase 1.
|
| void | Update (ControlContext context, ProcessorInstance.Pipe pipe) |
| | No pipe messages sent in Phase 1.
|
| ProcessorInstance.Response | OnMessage (ControlContext context, ProcessorInstance.Pipe pipe, ProcessorInstance.Message message) |
| | No incoming messages handled in Phase 1.
|
Layer 2a — Control state (control thread).
Fully unmanaged struct implementing GeneratorInstance.IControl (with CsoundRealtime) and GeneratorInstance.ICapabilities. Unity requires TControl to be unmanaged (same constraint as TRealtime), so this struct stores only an int InstanceId and resolves the bridge through CsoundBridgeRegistry, the same registry the realtime struct uses.
Unity calls Configure on the control thread when the generator is first used and again whenever the audio system reconfigures — not once per audio block. Unity's own documentation is explicit about this, and adds that during a reconfiguration the instance is suspended from processing, so its properties can be modified safely from there. Nothing reacts to a reconfiguration yet; see the audio-path documentation.