Realtime struct for CsoundUnityChild IAudioGenerator path.
More...
|
| GeneratorInstance.Result | Process (in RealtimeContext context, ProcessorInstance.Pipe pipe, ChannelBuffer buffer, GeneratorInstance.Arguments args) |
| | Called by Unity on every audio block (audio thread). Pulls one complete published block per channel from the parent and writes it into buffer .
|
| void | Update (ProcessorInstance.UpdatedDataContext context, ProcessorInstance.Pipe pipe) |
| | No-op — no pipe messages needed.
|
|
| bool | isFinite [get] |
| | Audio channel data is continuously produced by the parent — not finite.
|
| bool | isRealtime [get] |
| | Must run at the system audio rate.
|
| DiscreteTime? | length [get] |
| | Infinite generator — length unknown.
|
Realtime struct for CsoundUnityChild IAudioGenerator path.
Fully unmanaged struct implementing GeneratorInstance.IRealtime. Reads audio from the snapshots the parent CsoundUnity publishes at the end of each block, reached through CsoundChildRegistry.
No call to PerformKsmps is made here — Csound processing is entirely owned by the parent's CsoundRealtime. This struct is purely a data reader.
◆ Process()
| GeneratorInstance.Result Csound.Unity.CsoundChildRealtime.Process |
( |
in RealtimeContext | context, |
|
|
ProcessorInstance.Pipe | pipe, |
|
|
ChannelBuffer | buffer, |
|
|
GeneratorInstance.Arguments | args ) |
|
inline |
Called by Unity on every audio block (audio thread). Pulls one complete published block per channel from the parent and writes it into buffer .
Nothing here reads the parent's live working arrays: the two audio callbacks are not ordered against each other, so doing so meant sometimes seeing a block that was only half written. Taking published snapshots costs at most one DSP buffer of latency — constant, rather than varying with whichever callback happened to run first — and a parent that has stopped publishing yields silence instead of a looped last block.
- Parameters
-
| context | The audio thread context for this block. |
| pipe | The pipe that carries messages between the control and audio sides. |
| buffer | The block to write the output into. |
| args | What Unity says about the block being rendered. |
- Returns
- What the generator did with the block.
◆ Update()
| void Csound.Unity.CsoundChildRealtime.Update |
( |
ProcessorInstance.UpdatedDataContext | context, |
|
|
ProcessorInstance.Pipe | pipe ) |
|
inline |
No-op — no pipe messages needed.
- Parameters
-
| context | The context Unity passes when it hands over updated data. |
| pipe | The pipe that carries messages between the control and audio sides. |
◆ InstanceId
| int Csound.Unity.CsoundChildRealtime.InstanceId |
|
package |
◆ isFinite
| bool Csound.Unity.CsoundChildRealtime.isFinite |
|
get |
Audio channel data is continuously produced by the parent — not finite.
◆ isRealtime
| bool Csound.Unity.CsoundChildRealtime.isRealtime |
|
get |
Must run at the system audio rate.
◆ length
| DiscreteTime? Csound.Unity.CsoundChildRealtime.length |
|
get |
Infinite generator — length unknown.
The documentation for this struct was generated from the following file: