diff --git a/shared/PhaseVocoder.cpp b/shared/PhaseVocoder.cpp index 75d2fe7..eb79502 100644 --- a/shared/PhaseVocoder.cpp +++ b/shared/PhaseVocoder.cpp @@ -110,6 +110,10 @@ void PhaseVocoder::doFFTWork() { } bool PhaseVocoder::setFFTSize(int newSize){ + if(newSize > 32768) { + setUsePvoc(false); + } + bool status = StandardFFTProcessor::setFFTSize(newSize); phaseBuffer->requestResize(newSize/2); return status; diff --git a/shared/PhaseVocoder.h b/shared/PhaseVocoder.h index 990757a..7a2c63f 100644 --- a/shared/PhaseVocoder.h +++ b/shared/PhaseVocoder.h @@ -23,7 +23,14 @@ class PhaseVocoder : public StandardFFTProcessor { PhaseVocoder(int size, int hops, int offset, int sRate, std::shared_ptr _phaseBuffer); ~PhaseVocoder() {} - virtual void setUsePvoc(bool usePvoc){ phaseBuffer->setUsePvoc(usePvoc); } + virtual void setUsePvoc(bool usePvoc){ + if(this->m_fftSize > 32768) { + phaseBuffer->setUsePvoc(false); + return; + } + + phaseBuffer->setUsePvoc(usePvoc); + } virtual bool setFFTSize(int newSize) override; virtual void process(const FftDecimal* input, FftDecimal* output, int blockSize) override;