aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample/source/groove.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/xsample/source/groove.cpp')
-rw-r--r--externals/grill/xsample/source/groove.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/externals/grill/xsample/source/groove.cpp b/externals/grill/xsample/source/groove.cpp
index 7107f791..41f2248b 100644
--- a/externals/grill/xsample/source/groove.cpp
+++ b/externals/grill/xsample/source/groove.cpp
@@ -452,7 +452,7 @@ V xgroove::s_pos_loop(I n,S *const *invecs,S *const *outvecs)
S *pos = outvecs[outchns];
BL lpbang = false;
- const I smin = curmin,smax = curmax,plen = smax-smin; //curlen;
+ const D smin = curmin,smax = curmax,plen = smax-smin; //curlen;
if(buf && plen > 0) {
register D o = curpos;
@@ -461,7 +461,7 @@ V xgroove::s_pos_loop(I n,S *const *invecs,S *const *outvecs)
const S spd = speed[i]; // must be first because the vector is reused for output!
// normalize offset
- if(o >= smax) {
+ if(!(o < smax)) { // faster than o >= smax
o = fmod(o-smin,plen)+smin;
lpbang = true;
}