int IComparable <EqualizerFilter> .CompareTo(EqualizerFilter other) { if (other == null) { return(1); } return(AverageFrequency.CompareTo(other.AverageFrequency)); }
/// <summary> /// Returns a new instance of the <see cref="EqualizerFilter" /> class. /// </summary> /// <param name="channels">The number of channels to use.</param> /// <param name="sampleRate">The samplerate of the data to process.</param> /// <param name="frequency">The frequency of the filter.</param> /// <param name="bandWidth">The bandwidth.</param> /// <param name="gain">The gain value.</param> /// <returns>A new instance of the <see cref="EqualizerFilter" /> class.</returns> public static EqualizerFilter CreateFilter(int channels, int sampleRate, double frequency, int bandWidth, float gain) { var result = new EqualizerFilter(); for (int c = 0; c < channels; c++) { result.Filters.Add(c, new EqualizerChannelFilter(sampleRate, frequency, bandWidth, gain)); } return(result); }