Struct ExecuteContext<TParameters, TProviders>
A context for execution of DSP nodes, providing I/O operations and information. It is used inside Execute(ref ExecuteContext<TParameters, TProviders>)
Inherited Members
Namespace: Unity.Audio
Syntax
public struct ExecuteContext<TParameters, TProviders>
where TParameters : struct, Enum where TProviders : struct, Enum
Type Parameters
Name | Description |
---|---|
TParameters | |
TProviders |
Fields
Inputs
An array of read-only input buffers of audio samples. This is incoming samples from other DSP nodes.
Declaration
public SampleBufferArray Inputs
Field Value
Type | Description |
---|---|
SampleBufferArray |
Outputs
An array of write-only output buffers of audio samples. These buffers will later on be used from other DSP nodes.
Declaration
public SampleBufferArray Outputs
Field Value
Type | Description |
---|---|
SampleBufferArray |
Parameters
A context providing interpolated parameter values. IAudioKernel<TParameters, TProviders>
Declaration
public ParameterData<TParameters> Parameters
Field Value
Type | Description |
---|---|
ParameterData<TParameters> |
Providers
A container holding the available sample providers for this audio job. This is where you get access to sample playback. SampleProvider IAudioKernel<TParameters, TProviders>
Declaration
public SampleProviderContainer<TProviders> Providers
Field Value
Type | Description |
---|---|
SampleProviderContainer<TProviders> |
Properties
DSPBufferSize
The amount of samples being processed in this mix down. Inputs and Outputs, the array size of the I/O buffers will be of this size, and after this mixdown, the DSPClock will increase by this amount.
Declaration
public int DSPBufferSize { get; }
Property Value
Type | Description |
---|---|
Int32 |
DSPClock
The amount of samples that has been processed for this DSP graph so far. This is a monotonic clock representing an abstract playback position in a DSP graph. This value is shared for all nodes in a mixdown.
Declaration
public long DSPClock { get; }
Property Value
Type | Description |
---|---|
Int64 |
SampleRate
The sample rate currently being used in this DSP graph.
Declaration
public int SampleRate { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
PostEvent<TNodeEvent>(TNodeEvent)
Posts an event back to the main thread, to any handlers listening for this event. AddNodeEventHandler<TNodeEvent>(Action<DSPNode, TNodeEvent>)
Declaration
public void PostEvent<TNodeEvent>(TNodeEvent eventMsg)
where TNodeEvent : struct
Parameters
Type | Name | Description |
---|---|---|
TNodeEvent | eventMsg |
Type Parameters
Name | Description |
---|---|
TNodeEvent | Value and type of this event. |
Remarks
This function is currently not Burst compatible