public void setWindowType(WindowType windowType) { mWindowType = windowType; if (mSampleType == SampleType.COMPLEX) { mWindow = Window.getWindow(mWindowType, mDFTSize.getSize() * 2); } else { mWindow = Window.getWindow(mWindowType, mDFTSize.getSize()); } }
private void calculate() { float[] samples = getSamples(); Window.apply(mWindow, samples); if (mSampleType == SampleType.REAL) { mFFT.realForward(samples); } else { mFFT.complexForward(samples); } dispatch(samples); }