Assets/Plugins/Unity.DSPGraph/Runtime/SampleProviderContainer.cs
/// <summary>
/// Reads a part of the samples as short integers in the specified output format from the sample provider.
/// </summary>
/// <param name="destination">The destination buffer that decoded samples are written to.</param>
/// <param name="format">The destination format that the samples are decoded to.</param>
/// <returns>The number of samples that could be read. Will be less than the destination size when the end of the sound is reached.</returns>
Reads a part of the samples as short integers in the specified output format from the sample provider.
Reads a part of the samples as short integers in the specified output format from the sample provider .
public int Read(NativeSlice<short> destination, NativeFormatType format)
        {
            CheckValidAndThrow();
            if (format != NativeFormatType.PCM16_LE && format != NativeFormatType.PCM16_BE)
                throw new ArgumentException("Using buffer of short to capture samples of a different size.");
            return DSPSampleProviderInternal.Internal_ReadSInt16FromSampleProviderById(
                ProviderHandle, (int)format,
                destination.GetUnsafePtr(), destination.Length);
        }
public int Read ( NativeSlice < short > destination , NativeFormatType format ) { CheckValidAndThrow ( ) ; if ( format != NativeFormatType . PCM16_LE && format != NativeFormatType . PCM16_BE ) throw new ArgumentException ( " " ) ; return DSPSampleProviderInternal . Internal_ReadSInt16FromSampleProviderById ( ProviderHandle , ( int ) format , destination . GetUnsafePtr ( ) , destination . Length ) ; }
Reads a part of the samples as short integers in the specified output format from the sample provider.
Reads a part of the samples as short integers in the specified output format from the sample provider .
The number of samples that could be read. Will be less than the destination size when the end of the sound is reached.
The number of samples that could be read . Will be less than the destination size when the end of the sound is reached .
destination
NativeSlice<short>
The destination buffer that decoded samples are written to.
The destination buffer that decoded samples are written to .
format
NativeFormatType
The destination format that the samples are decoded to.
The destination format that the samples are decoded to .