Ejemplo n.º 1
0
        public void WriteBlock(byte[] data, int startIndex, int length)
        {
            Argument.IsNotNull(data, nameof(data));
            Argument.IsNotNegative(startIndex, nameof(startIndex));
            Argument.IsPositive(length, nameof(length));
            Argument.ConditionIsMet(startIndex + length <= data.Length, "End offset exceeds the length of data.");

#if NET5_0_OR_GREATER
            WriteBlock(data.AsSpan(startIndex, length));
#else
            writeHandler.WriteAudioBlock(this, data, startIndex, length);
            System.Threading.Interlocked.Increment(ref blocksWritten);
#endif
        }
Ejemplo n.º 2
0
 public void WriteBlock(byte[] buffer, int startIndex, int count)
 {
     writeHandler.WriteAudioBlock(this, buffer, startIndex, count);
     System.Threading.Interlocked.Increment(ref blocksWritten);
 }