Skip to content

Commit

Permalink
Removed duplicate ReadBytes method.
Browse files Browse the repository at this point in the history
  • Loading branch information
filoe committed Jun 4, 2015
1 parent 2b50e09 commit a63837a
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions CSCore/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a63837a

Please sign in to comment.