/// <summary> /// Initializes a new instance of the <see cref="EqualizerChannelFilter" /> class. /// </summary> /// <param name="sampleRate">The sampleRate of the audio data to process.</param> /// <param name="centerFrequency">The center frequency to adjust.</param> /// <param name="bandWidth">The bandWidth.</param> /// <param name="gain">The gain value in dB.</param> public EqualizerChannelFilter(int sampleRate, double centerFrequency, double bandWidth, double gain) { if (sampleRate <= 0) throw new ArgumentOutOfRangeException("sampleRate"); if (centerFrequency <= 0) throw new ArgumentOutOfRangeException("centerFrequency"); if (bandWidth <= 0) throw new ArgumentOutOfRangeException("bandWidth"); _biQuadFilter = new EqualizerBiQuadFilter(sampleRate, centerFrequency, bandWidth, gain); }
/// <summary> /// Initializes a new instance of the <see cref="EqualizerChannelFilter" /> class. /// </summary> /// <param name="sampleRate">The sampleRate of the audio data to process.</param> /// <param name="centerFrequency">The center frequency to adjust.</param> /// <param name="bandWidth">The bandWidth.</param> /// <param name="gain">The gain value in dB.</param> public EqualizerChannelFilter(int sampleRate, double centerFrequency, double bandWidth, double gain) { if (sampleRate <= 0) { throw new ArgumentOutOfRangeException("sampleRate"); } if (centerFrequency <= 0) { throw new ArgumentOutOfRangeException("centerFrequency"); } if (bandWidth <= 0) { throw new ArgumentOutOfRangeException("bandWidth"); } _biQuadFilter = new EqualizerBiQuadFilter(sampleRate, centerFrequency, bandWidth, gain); }