Skip to content

Commit

Permalink
change limit_range call
Browse files Browse the repository at this point in the history
  • Loading branch information
luismrguimaraes committed Sep 17, 2024
1 parent 486da79 commit afed6e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/sst/effects/RotarySpeaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,12 @@ inline void RotarySpeaker<FXConfig>::processBlock(float *__restrict dataL, float
int rpL = (wpos - i_dtimeL + k);
int rpR = (wpos - i_dtimeR + k);

assert(sincTable.FIRipol_M - 1 > 0);
int sincL = sincTable.FIRipol_N *
limit_range((int)(sincTable.FIRipol_M * (float(i_dtimeL + 1) - dL.v)), 0,
std::clamp((int)(sincTable.FIRipol_M * (float(i_dtimeL + 1) - dL.v)), 0,
sincTable.FIRipol_M - 1);
int sincR = sincTable.FIRipol_N *
limit_range((int)(sincTable.FIRipol_M * (float(i_dtimeR + 1) - dR.v)), 0,
std::clamp((int)(sincTable.FIRipol_M * (float(i_dtimeR + 1) - dR.v)), 0,
sincTable.FIRipol_M - 1);

// get delay output
Expand Down

0 comments on commit afed6e2

Please sign in to comment.