dcfilter: reject out of range filterwidth

This commit is contained in:
goyuken 2012-10-10 11:56:49 +00:00
parent 2d8ea045f3
commit b28b677be2
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@ namespace BizHawk.Emulation.Sound.Utilities
/// <param name="input"></param>
public DCFilter(ISoundProvider input = null, int filterwidth = 65536)
{
if (filterwidth < 1 || filterwidth > 65536)
throw new ArgumentOutOfRangeException();
this.input = input;
this.depth = filterwidth;
this.buffer = new Queue<short>(depth * 2);