Skip to content

Commit

Permalink
Revert "GranularPitchShifterEffect should not call checkGate"
Browse files Browse the repository at this point in the history
This reverts commit 67526f0.
  • Loading branch information
messmerd committed Sep 4, 2024
1 parent 8f77cfa commit f552f7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ double GranularPitchShifterEffect::processImpl(SampleFrame* buf, const fpp_t fra
const float shapeK = cosWindowApproxK(shape);
const int sizeSamples = m_sampleRate / size;
const float waitMult = sizeSamples / (density * 2);
double outSum = 0.0;

for (fpp_t f = 0; f < frames; ++f)
{
Expand Down Expand Up @@ -235,6 +236,7 @@ double GranularPitchShifterEffect::processImpl(SampleFrame* buf, const fpp_t fra

buf[f][0] = d * buf[f][0] + w * s[0];
buf[f][1] = d * buf[f][1] + w * s[1];
outSum += buf[f].sumOfSquaredAmplitudes();
}

if (m_sampleRateNeedsUpdate)
Expand All @@ -243,7 +245,7 @@ double GranularPitchShifterEffect::processImpl(SampleFrame* buf, const fpp_t fra
changeSampleRate();
}

return -1.0;
return outSum;
}

Check notice on line 250 in plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp

View check run for this annotation

codefactor.io / CodeFactor

plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp#L63-L250

Complex Method
void GranularPitchShifterEffect::changeSampleRate()
Expand Down

0 comments on commit f552f7c

Please sign in to comment.