|
CsoundUnity 4.0.0-alpha.3
|
Shared static registry of Csound bridges for the IAudioGenerator path. More...
Static Package Functions | |
| static int | Register (CsoundUnityBridge bridge) |
| Registers a bridge (and an optional command queue) and returns the stable integer ID that CsoundRealtime.InstanceId and CsoundControl.InstanceId must store. | |
| static void | Unregister (int id) |
Nulls out the slot at id so that any in-flight audio-thread call to GetBridge returns null (→ silence) after teardown. Does not shrink the lists; IDs remain stable. | |
| static void | RegisterSpinFillCallback (int id, System.Action< int > callback) |
Registers an action to be called before each PerformKsmps for instance id . The int argument is the buffer-frame offset at which the new ksmps block begins. | |
| static void | InvokeSpinFillCallback (int id, int bufferFrameOffset) |
Invoked by CsoundRealtime on the audio thread immediately before each PerformKsmps. | |
| static void | RegisterKsmpsCallback (int id, System.Action< int > callback) |
Registers an action to be called after each PerformKsmps for instance id . The int argument is the buffer-frame offset at which the new ksmps block begins. | |
| static void | InvokeKsmpsCallback (int id, int bufferFrameOffset) |
Invoked by CsoundRealtime on the audio thread after each successful PerformKsmps. | |
| static void | RegisterPerformanceFinishedCallback (int id, System.Action callback) |
| static void | InvokePerformanceFinishedCallback (int id) |
| static CsoundUnityBridge | GetBridge (int id) |
Returns the bridge at id , or null if not found. | |
Shared static registry of Csound bridges for the IAudioGenerator path.
CsoundUnity registers its bridge here, on the AudioPath.IAudioGenerator and AudioPath.RootOutput paths, so that the fully unmanaged CsoundRealtime and CsoundRootRealtime structs can resolve it by integer index on the audio thread, without holding any managed references themselves.
Slots are never removed from the lists — they are nulled on unregister — so IDs stay stable for as long as the lists do. That is one Play session: ResetForNewPlaySession clears them at each start, because with domain reload disabled the statics outlive a session and would otherwise carry dead slots into the next one.
|
inlinestaticpackage |
Returns the bridge at id , or null if not found.
|
inlinestaticpackage |
Invoked by CsoundRealtime on the audio thread after each successful PerformKsmps.
|
inlinestaticpackage |
|
inlinestaticpackage |
Invoked by CsoundRealtime on the audio thread immediately before each PerformKsmps.
|
inlinestaticpackage |
Registers a bridge (and an optional command queue) and returns the stable integer ID that CsoundRealtime.InstanceId and CsoundControl.InstanceId must store.
Always called on the main thread, before the audio system starts producing frames — no additional synchronisation is needed.
|
inlinestaticpackage |
Registers an action to be called after each PerformKsmps for instance id . The int argument is the buffer-frame offset at which the new ksmps block begins.
|
inlinestaticpackage |
|
inlinestaticpackage |
Registers an action to be called before each PerformKsmps for instance id . The int argument is the buffer-frame offset at which the new ksmps block begins.
|
inlinestaticpackage |
Nulls out the slot at id so that any in-flight audio-thread call to GetBridge returns null (→ silence) after teardown. Does not shrink the lists; IDs remain stable.