public ComplexFilter( WaveFormat format, IWindowFunction windowFunction, IFilterImplementation filterImplementation) { if (format == null) { throw new ArgumentNullException("format", "Format cannot be null"); } if (windowFunction == null) { throw new ArgumentNullException("windowFunction", "Window function cannot be null"); } if (filterImplementation == null) { throw new ArgumentNullException("filterImplementation", "Filter implementation cannot be null"); } this.format = format; this.filterOrder = 20; this.windowFunction = windowFunction; this.FilterImplementation = filterImplementation; this.filters = new ObservableCollection<IDigitalFilter>(); this.filters.CollectionChanged += filters_CollectionChanged; updateCoefficients(); }
public ComplexFilter( WaveFormat format, IWindowFunction windowFunction, IFilterImplementation filterImplementation) { if (format == null) { throw new ArgumentNullException("format", "Format cannot be null"); } if (windowFunction == null) { throw new ArgumentNullException("windowFunction", "Window function cannot be null"); } if (filterImplementation == null) { throw new ArgumentNullException("filterImplementation", "Filter implementation cannot be null"); } this.format = format; this.filterOrder = 20; this.windowFunction = windowFunction; this.FilterImplementation = filterImplementation; this.filters = new ObservableCollection <IDigitalFilter>(); this.filters.CollectionChanged += filters_CollectionChanged; updateCoefficients(); }
public void TestInitialise() { format = new WaveFormat(44100, 2); windowFunction = Substitute.For <IWindowFunction>(); implementation = Substitute.For <IFilterImplementation>(); windowFunction .CalculateCoefficients(Arg.Any <int>()) .Returns(new float[21]); target = new ComplexFilter(format, windowFunction, implementation); }
public void TestInitialise() { format = new WaveFormat(44100, 2); windowFunction = Substitute.For<IWindowFunction>(); implementation = Substitute.For<IFilterImplementation>(); windowFunction .CalculateCoefficients(Arg.Any<int>()) .Returns(new float[21]); target = new ComplexFilter(format, windowFunction, implementation); }