/// <summary> /// Sets new target rate. Normal rate = 1.0, smaller values represent slower /// rate, larger faster rates. /// </summary> public virtual void SetRate(double newRate) { double fCutoff; _transposer.SetRate(newRate); // design a new anti-alias filter fCutoff = newRate > 1.0 ? 0.5 / newRate : 0.5 * newRate; _pAAFilter.SetCutoffFreq(fCutoff); }
/// <summary> /// Sets new target rate. Normal rate = 1.0, smaller values represent /// slower rate, larger faster rates. /// </summary> public virtual void SetRate(float newRate) { double cutoff; Rate = newRate; // design a new anti-alias filter if (newRate > 1.0f) { cutoff = 0.5f / newRate; } else { cutoff = 0.5f * newRate; } _antiAliasFilter.SetCutoffFreq(cutoff); }
/// <summary> /// Sets new target rate. Normal rate = 1.0, smaller values represent /// slower rate, larger faster rates. /// </summary> public virtual void SetRate(double newRate) { double cutoff; _transposer.SetRate(newRate); // design a new anti-alias filter if (newRate > 1.0) { cutoff = 0.5 / newRate; } else { cutoff = 0.5 * newRate; } _antiAliasFilter.SetCutoffFreq(cutoff); }