Skip to content

Commit

Permalink
Merge branch 'release/2.1.5' of github.com:andrewreeman/SpectralSuite…
Browse files Browse the repository at this point in the history
… into release/2.1.5
  • Loading branch information
andrewreeman committed Jun 23, 2022
2 parents 82e7253 + b6384be commit 178146e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions shared/PhaseVocoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 8 additions & 1 deletion shared/PhaseVocoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ class PhaseVocoder : public StandardFFTProcessor {
PhaseVocoder(int size, int hops, int offset, int sRate, std::shared_ptr<PhaseBuffer> _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;
Expand Down

0 comments on commit 178146e

Please sign in to comment.