Skip to content

Commit

Permalink
Merge pull request #257 from MagicMau/patch-1
Browse files Browse the repository at this point in the history
Update SilenceWaveProvider.cs
  • Loading branch information
markheath authored Nov 3, 2017
2 parents 48bfdb1 + d2fd492 commit a239f9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions NAudio/Wave/WaveProviders/SilenceWaveProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;

// ReSharper disable once CheckNamespace
Expand All @@ -21,11 +21,7 @@ public class SilenceProvider : IWaveProvider
/// </summary>
public int Read(byte[] buffer, int offset, int count)
{
var end = offset + count;
for (var pos = offset; pos < end; pos++)
{
buffer[pos] = 0;
}
Array.Clear(buffer, offset, count);
return count;
}

Expand Down

0 comments on commit a239f9f

Please sign in to comment.