Assets/Plugins/Unity.DSPGraph/Runtime/DSPCommandBlock.cs
/// <summary>
/// This API will sustain the previous parameter value until the dspclock time is reached
/// </summary>
/// <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="node">The node that should have its parameter sustained</param>
/// <param name="parameter">The parameter to sustain</param>
/// <param name="dspClock">The time in which the parameter should be sustained until</param>
/// <exception cref="ArgumentException">Throws exception when parameter is unknown</exception>
This API will sustain the previous parameter value until the dspclock time is reached
This API will sustain the previous parameter value until the dspclock time is reached
public void SustainFloat<TParameters, TProviders, TAudioKernel>(DSPNode node, TParameters parameter, long dspClock)
            where TParameters  : unmanaged, Enum
            where TProviders   : unmanaged, Enum
            where TAudioKernel : struct, IAudioKernel<TParameters, TProviders>
        {
            AssertSameGraphAsNode(node);
            AudioKernelExtensions.GetReflectionData<TAudioKernel, TParameters, TProviders>(out void* jobReflectionData, out AudioKernelExtensions.ParameterDescriptionData parameterDescriptionData);
            QueueCommand(new SustainFloatCommand
            {
                m_Type = DSPCommandType.SustainFloat,
                m_Graph = m_Graph,
                m_Handle = m_Handle,
                m_Node = node.Handle,
                m_JobReflectionData = jobReflectionData,
                m_ParameterDescriptionData = parameterDescriptionData,
                m_Parameter = (uint)UnsafeUtility.EnumToInt(parameter),
                m_DSPClock = (ulong)dspClock,
            });
        }
public void SustainFloat < TParameters , TProviders , TAudioKernel > ( DSPNode node , TParameters parameter , long dspClock ) where TParameters : unmanaged , Enum where TProviders : unmanaged , Enum where TAudioKernel : struct , IAudioKernel < TParameters , TProviders > { AssertSameGraphAsNode ( node ) ; AudioKernelExtensions . GetReflectionData < TAudioKernel , TParameters , TProviders > ( out void * jobReflectionData , out AudioKernelExtensions . ParameterDescriptionData parameterDescriptionData ) ; QueueCommand ( new SustainFloatCommand { m_Type = DSPCommandType . SustainFloat , m_Graph = m_Graph , m_Handle = m_Handle , m_Node = node . Handle , m_JobReflectionData = jobReflectionData , m_ParameterDescriptionData = parameterDescriptionData , m_Parameter = ( uint ) UnsafeUtility . EnumToInt ( parameter ) , m_DSPClock = ( ulong ) dspClock , } ) ; }
This API will sustain the previous parameter value until the dspclock time is reached
This API will sustain the previous parameter value until the dspclock time is reached
Throws exception when parameter is unknown
Throws exception when parameter is unknown
node
DSPNode
The node that should have its parameter sustained
The node that should have its parameter sustained
parameter
TParameters
The parameter to sustain
The parameter to sustain
dspClock
long
The time in which the parameter should be sustained until
The time in which the parameter should be sustained until
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