|
CsoundUnity 4.0.0-alpha.3
|
Drives Csound for one Unity audio block and copies spout into the block's buffer. The two Unity 6 audio paths, AudioPath.IAudioGenerator and AudioPath.RootOutput, both consist of this: they differ in where Unity hands the buffer to them, not in what they do with it, so they embed this and keep their own plumbing. More...
Package Functions | |
| void | Render (int instanceId, ChannelBuffer buffer, bool pannedByUnity) |
Fills one block: performs Csound every ksmps frames and writes spout into buffer , honouring mute, pause and the startup fade. Writes silence instead whenever the bridge is not there to be read, so the caller never has to. | |
Drives Csound for one Unity audio block and copies spout into the block's buffer. The two Unity 6 audio paths, AudioPath.IAudioGenerator and AudioPath.RootOutput, both consist of this: they differ in where Unity hands the buffer to them, not in what they do with it, so they embed this and keep their own plumbing.
Unmanaged and blittable, like the two structs that hold it: Unity stores them in its own audio memory between invocations, which is also what makes the three fields below persist.
|
inlinepackage |
Fills one block: performs Csound every ksmps frames and writes spout into buffer , honouring mute, pause and the startup fade. Writes silence instead whenever the bridge is not there to be read, so the caller never has to.
| instanceId | This instance's key in CsoundBridgeRegistry. |
| buffer | The block Unity gave the caller, this instance's own. |
| pannedByUnity | True on IAudioGenerator, where Unity's panner receives what is written here and sums the channels for a spatialized source. False on RootOutput, which goes to the main output with no panner in between. See AudioPathShared.SpreadDivisor. |