Assets/Plugins/Unity.DSPGraph/Runtime/DSPCommandBlock.cs
/// <summary>
/// This API will run the <see cref="TAudioKernelUpdate"/> on the target DSPNode asynchronously.
/// </summary>
/// <remarks>
/// This version simply applies the update kernel to the specified DSP kernel.
/// The DSP kernel is passed as a ref to the update structure so that it can be modified.
/// </remarks>
/// <typeparam name="TAudioKernelUpdate">The update kernel type</typeparam>
/// <typeparam name="TParameters">Enum type of the parameters of the node</typeparam>
/// <typeparam name="TProviders">Enum type of the sample providers of the node</typeparam>
/// <typeparam name="TAudioKernel">The kernel type of the node</typeparam>
/// <param name="updateJob">The structure used to update the running DSP kernel</param>
/// <param name="node">The node that this update should operate on</param>
This API will run the  on the target DSPNode asynchronously.
This API will run the on the target DSPNode asynchronously .
public void UpdateAudioKernel<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel>(TAudioKernelUpdate updateJob, DSPNode node)
            where TAudioKernelUpdate : struct, IAudioKernelUpdate<TParameters, TProviders, TAudioKernel>
            where TParameters        : unmanaged, Enum
            where TProviders         : unmanaged, Enum
            where TAudioKernel       : struct, IAudioKernel<TParameters, TProviders>
        {
            AssertSameGraphAsNode(node);
            AudioKernelExtensions.GetReflectionData<TAudioKernel, TParameters, TProviders>(out void* nodeReflectionData, out AudioKernelExtensions.ParameterDescriptionData dummy);
            AudioKernelUpdateExtensions.GetReflectionData<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel>(out void* updateJobReflectionData);
            QueueCommand(new UpdateAudioKernelCommand
            {
                m_Type = DSPCommandType.UpdateAudioKernel,
                m_Graph = m_Graph,
                m_Handle = m_Handle,
                m_Node = node.Handle,
                m_JobReflectionData = nodeReflectionData,
                m_JobStructMemory = Utility.CopyToPersistentAllocation(ref updateJob),
                m_UpdateReflectionData = updateJobReflectionData,
            });
        }
public void UpdateAudioKernel < TAudioKernelUpdate , TParameters , TProviders , TAudioKernel > ( TAudioKernelUpdate updateJob , DSPNode node ) where TAudioKernelUpdate : struct , IAudioKernelUpdate < TParameters , TProviders , TAudioKernel > where TParameters : unmanaged , Enum where TProviders : unmanaged , Enum where TAudioKernel : struct , IAudioKernel < TParameters , TProviders > { AssertSameGraphAsNode ( node ) ; AudioKernelExtensions . GetReflectionData < TAudioKernel , TParameters , TProviders > ( out void * nodeReflectionData , out AudioKernelExtensions . ParameterDescriptionData dummy ) ; AudioKernelUpdateExtensions . GetReflectionData < TAudioKernelUpdate , TParameters , TProviders , TAudioKernel > ( out void * updateJobReflectionData ) ; QueueCommand ( new UpdateAudioKernelCommand { m_Type = DSPCommandType . UpdateAudioKernel , m_Graph = m_Graph , m_Handle = m_Handle , m_Node = node . Handle , m_JobReflectionData = nodeReflectionData , m_JobStructMemory = Utility . CopyToPersistentAllocation ( ref updateJob ) , m_UpdateReflectionData = updateJobReflectionData , } ) ; }
This API will run the  on the target DSPNode asynchronously.
This API will run the on the target DSPNode asynchronously .
updateJob
TAudioKernelUpdate
The structure used to update the running DSP kernel
The structure used to update the running DSP kernel
node
DSPNode
The node that this update should operate on
The node that this update should operate on
remarks
This version simply applies the update kernel to the specified DSP kernel.
The DSP kernel is passed as a ref to the update structure so that it can be modified.
This version simply applies the update kernel to the specified DSP kernel . The DSP kernel is passed as a ref to the update structure so that it can be modified .
typeparam
The update kernel type
The update kernel type
typeparam
Enum type of the parameters of the node
Enum type of the parameters of the node
typeparam
Enum type of the sample providers of the node
Enum type of the sample providers of the node
typeparam
The kernel type of the node
The kernel type of the node