From a63837aad8f84a3b0137ef749cf0f39c683dec35 Mon Sep 17 00:00:00 2001 From: filoe Date: Thu, 4 Jun 2015 15:58:05 +0200 Subject: [PATCH] Removed duplicate ReadBytes method. --- CSCore/Extensions.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/CSCore/Extensions.cs b/CSCore/Extensions.cs index 22ab1bec..2bf0814c 100644 --- a/CSCore/Extensions.cs +++ b/CSCore/Extensions.cs @@ -266,20 +266,6 @@ internal static byte[] ReadBytes(this IWaveSource waveSource, int count) return buffer; } - internal static byte[] ReadBytes(this IWaveSource waveSource, int count) - { - if (waveSource == null) - throw new ArgumentNullException("waveSource"); - if (count <= 0 || (count % waveSource.WaveFormat.BlockAlign) != 0) - throw new ArgumentOutOfRangeException("count"); - - byte[] buffer = new byte[count]; - int read = waveSource.Read(buffer, 0, buffer.Length); - if (read < count) - Array.Resize(ref buffer, read); - return buffer; - } - internal static bool IsClosed(this Stream stream) { return !stream.CanRead && !stream.CanWrite;