Assets/Plugins/Unity.DSPGraph/Runtime/DSPCommandBlock.cs
/// <summary>
/// Inserts a sample provider to the list
/// </summary>
/// <param name="video">The provider to be inserted on the specified <typeparamref name="DSPNode"/></param>
/// <param name="node">The node to set the audio sample provider on</param>
/// <param name="item">The sample provider 'slot' that the given provider should be inserted into</param>
/// <param name="index">The index into the array that the provider should be set. This is if the sample provider slot is an array.</param>
/// <param name="trackIndex">The index of the audio track from which to create the sample provider</param>
/// <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>
/// <exception cref="ArgumentNullException">If the passed <typeparamref name="VideoPlayer"/>is null</exception>
/// <exception cref="InvalidOperationException">If the passed index into the sample provider slot is invalid</exception>
Inserts a sample provider to the list
Inserts a sample provider to the list
public void InsertSampleProvider<TParameters, TProviders, TAudioKernel>(
            VideoPlayer video, DSPNode node, TProviders item, int index = -1, int trackIndex = 0)
            where TParameters   : unmanaged, Enum
            where TProviders    : unmanaged, Enum
            where TAudioKernel : struct, IAudioKernel<TParameters, TProviders>
        {
            if (video == null)
                throw new ArgumentNullException(nameof(video));
            InsertSampleProvider<TParameters, TProviders, TAudioKernel>(video.InternalGetAudioSampleProviderId((ushort)trackIndex),
                node, item, index);
        }
public void InsertSampleProvider < TParameters , TProviders , TAudioKernel > ( VideoPlayer video , DSPNode node , TProviders item , int index = - 1 , int trackIndex = 0 ) where TParameters : unmanaged , Enum where TProviders : unmanaged , Enum where TAudioKernel : struct , IAudioKernel < TParameters , TProviders > { if ( video == null ) throw new ArgumentNullException ( nameof ( video ) ) ; InsertSampleProvider < TParameters , TProviders , TAudioKernel > ( video . InternalGetAudioSampleProviderId ( ( ushort ) trackIndex ) , node , item , index ) ; }
Inserts a sample provider to the list
Inserts a sample provider to the list
If the passed is null
If the passed is null
If the passed index into the sample provider slot is invalid
If the passed index into the sample provider slot is invalid
video
VideoPlayer
The provider to be inserted on the specified
The provider to be inserted on the specified
node
DSPNode
The node to set the audio sample provider on
The node to set the audio sample provider on
item
TProviders
The sample provider 'slot' that the given provider should be inserted into
The sample provider ' slot ' that the given provider should be inserted into
index
int
The index into the array that the provider should be set. This is if the sample provider slot is an array.
The index into the array that the provider should be set . This is if the sample provider slot is an array .
trackIndex
int
The index of the audio track from which to create the sample provider
The index of the audio track from which to create the sample provider
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