struct in UnityEngine.Audio
/
Implemented in:UnityEngine.AudioModule
Implements interfaces:IAudioScriptingContext
Control data communication, scripting-, creation-, destruction- and data query of Processors in an audio system.
A ControlContext effectively represents an instance of an audio system, and is responsible for synchronizing efficient and deterministic data communication between a controlling thread and a realtime audio rendering thread. Use ControlContext.builtIn for scripting the shared audio system Unity uses, or use ControlContext.CreateManualControlContext for exercising your own auxillary system.
Property | Description |
---|---|
builtIn | The default-provided ControlContext which is used and updated in tandem with Unity's built-in audio system. |
Method | Description |
---|---|
AllocateGenerator | Allocate a Generator with the specified processor and control state. |
AllocateRootOutput | Allocate a RootOutput with the specified processor and control state. |
Destroy | Destroy a Processor previously created from this context. |
Exists | Test whether a given Processor still exists. |
GetAvailableData | Access an enumerator to the currently available data on the Processor. This has been communicated back and accumulated from the Processor itself during all the Audio.Processor.IProcessor.RealtimeReturnData calls that happened since the last frame update. |
GetConfiguration | Get the declared configuration the Generator in question runs in. |
IsGenerator | Test whether the Processor is a Generator built from the specified components. |
IsRootOutput | Test whether the Processor is a RootOutput built from the specified components. |
SendData | Send a piece of data to make it available to the processor in the next mix cycle where Processor.IProcessor.DataAvailable will be called. |
SendMessage | Send a message with a piece of data to be immediately evaluated by the processor's Audio.Processor.Control.OnMessage. |
Method | Description |
---|---|
CreateManualControlContext | Create a new ControlContext with additional functionality you can drive manually. |
WaitForBuiltInQueueFlush | Forcefully wait for any commands created on ControlContext.builtIn or on any derivative objects to have taken effect. |