Skip to content

Commit

Permalink
Don't compute interpolation of samples when no pitch shifting
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Licameli committed Oct 10, 2023
1 parent bbb8ed3 commit f1d08d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/lib-time-and-pitch/StaffPad/TimeAndPitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void TimeAndPitch::feedAudio(const float* const* input_smp, int numSamples)
{
float smp[6];
d->inResampleInputBuffer[ch].readBlock(int_pos - 6, 6, smp);
float s = lagrange6(smp, frac_pos);
float s = (frac_pos == 0) ? smp[2] : lagrange6(smp, frac_pos);
d->inCircularBuffer[ch].writeOffset0(s);
d->inCircularBuffer[ch].advance(1);
}
Expand Down

0 comments on commit f1d08d1

Please sign in to comment.