Assets/Plugins/Unity.DSPGraph/Runtime/DSPCommandBlock.cs
/// <summary>
/// Sets the audio sample provider for a node. To clear an existing entry, set the provider to null. If the provider is not an array, then index is ignored.
/// </summary>
/// <remarks>
/// The provider can be null to clear an existing entry.
/// </remarks>
/// <param name="video">The provider to be set 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 assigned to</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"></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="IndexOutOfRangeException">If the passed index into the sample provider slot is invalid</exception>
Sets the audio sample provider for a node. To clear an existing entry, set the provider to null. If the provider is not an array, then index is ignored.
Sets the audio sample provider for a node . To clear an existing entry set the provider to null . If the provider is not an array then index is ignored .
public void SetSampleProvider<TParameters, TProviders, TAudioKernel>(
            VideoPlayer video, DSPNode node, TProviders item, int index = 0, int trackIndex = 0)
            where TParameters  : unmanaged, Enum
            where TProviders   : unmanaged, Enum
            where TAudioKernel : struct, IAudioKernel<TParameters, TProviders>
        {
            uint sampleProviderId = (video == null) ? 0 : video.InternalGetAudioSampleProviderId((ushort)trackIndex);
            SetSampleProvider<TParameters, TProviders, TAudioKernel>(sampleProviderId, node, item, index);
        }
public void SetSampleProvider < TParameters , TProviders , TAudioKernel > ( VideoPlayer video , DSPNode node , TProviders item , int index = 0 , int trackIndex = 0 ) where TParameters : unmanaged , Enum where TProviders : unmanaged , Enum where TAudioKernel : struct , IAudioKernel < TParameters , TProviders > { uint sampleProviderId = ( video == null ) ? 0 : video . InternalGetAudioSampleProviderId ( ( ushort ) trackIndex ) ; SetSampleProvider < TParameters , TProviders , TAudioKernel > ( sampleProviderId , node , item , index ) ; }
Sets the audio sample provider for a node.
Sets the audio sample provider for a node .
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 set on the specified
The provider to be set 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 assigned to
The sample provider ' slot ' that the given provider should be assigned to
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
None
remarks
The provider can be null to clear an existing entry.
The provider can be null to clear an existing entry .
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