Skip to content

Commit

Permalink
grapefruit
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRobotMusic committed Jun 18, 2024
1 parent 409991f commit 9e667a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/GranularPitchShifter/GranularPitchShifter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool GranularPitchShifterEffect::processAudioBuffer(sampleFrame* buf, const fpp_
}

const float shapeK = cosWindowApproxK(shape);
const int sizeSamples = static_cast<int>((m_sampleRate / size) * 0.5) * 2;
const int sizeSamples = m_sampleRate / size;
const float waitMult = sizeSamples / (density * 2);

for (fpp_t f = 0; f < frames; ++f)
Expand All @@ -117,7 +117,7 @@ bool GranularPitchShifterEffect::processAudioBuffer(sampleFrame* buf, const fpp_
{
m_updatePitches = false;

const double speed[2] = {std::exp2(m_truePitch[0] * (1. / 12.)), std::exp2(m_truePitch[1] * (1. / 12.))};
std::array<double, 2> speed = {std::exp2(m_truePitch[0] * (1. / 12.)), std::exp2(m_truePitch[1] * (1. / 12.))};
std::array<double, 2> ratio = {speed[0] / m_speed[0], speed[1] / m_speed[1]};

for (int i = 0; i < m_grainCount; ++i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ QString GranularPitchShifterHelpView::s_helpText=

GranularPitchShifterHelpView::GranularPitchShifterHelpView():QTextEdit(s_helpText)
{
#if QT_VERSION < 0x50C00
#if (QT_VERSION < QT_VERSION_CHECK(5,12,0))
// Bug workaround: https://codereview.qt-project.org/c/qt/qtbase/+/225348
using ::operator|;
#endif
Expand Down

0 comments on commit 9e667a1

Please sign in to comment.