Skip to content

Commit

Permalink
Only update PPQPos by Block when we call process
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed Nov 30, 2021
1 parent d04ac3d commit 8b29233
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/surge-xt/SurgeSynthProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ void SurgeSynthProcessor::processBlock(juce::AudioBuffer<float> &buffer,
auto outL = mainOutput.getWritePointer(0, i);
auto outR = mainOutput.getWritePointer(1, i);

surge->time_data.ppqPos += (double)BLOCK_SIZE * surge->time_data.tempo / (60. * samplerate);

if (blockPos == 0 && mainInput.getNumChannels() > 0)
{
auto inL = mainInput.getReadPointer(0, i);
Expand All @@ -284,6 +282,8 @@ void SurgeSynthProcessor::processBlock(juce::AudioBuffer<float> &buffer,
if (blockPos == 0)
{
surge->process();
surge->time_data.ppqPos +=
(double)BLOCK_SIZE * surge->time_data.tempo / (60. * samplerate);
}
*outL = surge->output[0][blockPos];
*outR = surge->output[1][blockPos];
Expand Down

0 comments on commit 8b29233

Please sign in to comment.