Assets/Plugins/Unity.DSPGraph/Runtime/DSPCommandBlock.cs
/// <summary>
/// This API will run the TAudioKernelUpdate on the target DSPNode asynchronously. Also returns
/// a <typeparamref name="DSPNodeUpdateRequest"/> that can be used to track the progress of
/// the update.
/// </summary>
/// <remarks>
/// The <typeparamref name="DSPNodeUpdateRequest"/> returned allow access to the update structure
/// after it has updated the DSP kernel. This can be used to retrieve information from the DSP kernel
/// and process it on the main thread.
/// </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>
/// <param name="callback">This will be executed on the main thread after the update job has run asynchronously</param>
/// <returns>A struct that can query status and also retrieve the update structure after it has updated the node</returns>
This API will run the TAudioKernelUpdate on the target DSPNode asynchronously. Also returns
a  that can be used to track the progress of
the update.
This API will run the TAudioKernelUpdate on the target DSPNode asynchronously . Also returns a that can be used to track the progress of the update .
public DSPNodeUpdateRequest<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel> CreateUpdateRequest<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel>(
            TAudioKernelUpdate updateJob, DSPNode node, Action<DSPNodeUpdateRequest<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel>> callback)
            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);
            var request = new DSPNodeUpdateRequest<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel>(node);
            m_Graph.RegisterUpdateRequest(request, DSPGraphExtensions.WrapAction(callback, request));
            QueueCommand(new UpdateAudioKernelRequestCommand
            {
                m_Type = DSPCommandType.UpdateAudioKernelRequest,
                m_Graph = m_Graph,
                m_Handle = m_Handle,
                m_Node = node.Handle,
                m_UpdateRequestHandle = request.Handle,
                m_JobStructMemory = Utility.CopyToPersistentAllocation(ref updateJob),
                m_JobReflectionData = nodeReflectionData,
                m_UpdateReflectionData = updateJobReflectionData,
            });
            return request;
        }
public DSPNodeUpdateRequest < TAudioKernelUpdate , TParameters , TProviders , TAudioKernel > CreateUpdateRequest < TAudioKernelUpdate , TParameters , TProviders , TAudioKernel > ( TAudioKernelUpdate updateJob , DSPNode node , Action < DSPNodeUpdateRequest < TAudioKernelUpdate , TParameters , TProviders , TAudioKernel > > callback ) 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 ) ; var request = new DSPNodeUpdateRequest < TAudioKernelUpdate , TParameters , TProviders , TAudioKernel > ( node ) ; m_Graph . RegisterUpdateRequest ( request , DSPGraphExtensions . WrapAction ( callback , request ) ) ; QueueCommand ( new UpdateAudioKernelRequestCommand { m_Type = DSPCommandType . UpdateAudioKernelRequest , m_Graph = m_Graph , m_Handle = m_Handle , m_Node = node . Handle , m_UpdateRequestHandle = request . Handle , m_JobStructMemory = Utility . CopyToPersistentAllocation ( ref updateJob ) , m_JobReflectionData = nodeReflectionData , m_UpdateReflectionData = updateJobReflectionData , } ) ; return request ; }
This API will run the TAudioKernelUpdate on the target DSPNode asynchronously.
This API will run the TAudioKernelUpdate on the target DSPNode asynchronously .
A struct that can query status and also retrieve the update structure after it has updated the node
A struct that can query status and also retrieve the update structure after it has updated the node
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
callback
Action<DSPNodeUpdateRequest<TAudioKernelUpdate, TParameters, TProviders, TAudioKernel>>
This will be executed on the main thread after the update job has run asynchronously
This will be executed on the main thread after the update job has run asynchronously
remarks
The  returned allow access to the update structure
after it has updated the DSP kernel. This can be used to retrieve information from the DSP kernel
and process it on the main thread.
The returned allow access to the update structure after it has updated the DSP kernel . This can be used to retrieve information from the DSP kernel and process it on the main thread .
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