Beispiel #1
0
        public FftUpsampler(int factor, int fftLength)
            : base(FilterType.FftUpsampler)
        {
            if (factor <= 1 || !IsPowerOfTwo(factor))
            {
                throw new ArgumentException("factor must be power of two integer and larger than 1");
            }
            mFactor = factor;

            System.Diagnostics.Debug.Assert(IsPowerOfTwo(fftLength));

            mFFT = new WWOverlappedFft(fftLength, fftLength * mFactor);
            mFFT.SetGain(mFactor);
        }