aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-07-09 02:37:10 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-07-09 02:37:10 +0000
commitb9702fd55d7ed6d94f93a207014059bcf3578a6a (patch)
tree3956f63c9b00a48c8081361e3431fd16603fe224 /externals/grill/xsample/source
parent9faada387fd8557a8ea69f2ec303dc28edbe44d6 (diff)
""
svn path=/trunk/; revision=767
Diffstat (limited to 'externals/grill/xsample/source')
-rw-r--r--externals/grill/xsample/source/groove.cpp4
-rwxr-xr-xexternals/grill/xsample/source/inter.h2
2 files changed, 3 insertions, 3 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;
}
diff --git a/externals/grill/xsample/source/inter.h b/externals/grill/xsample/source/inter.h
index 697c66df..bd8ec894 100755
--- a/externals/grill/xsample/source/inter.h
+++ b/externals/grill/xsample/source/inter.h
@@ -156,7 +156,7 @@ TMPLDEF V xinter::st_play4(const S *bdt,const I smin,const I smax,const I n,cons
for(I ci = 0; ci < OCHNS; ++ci) {
const F cmb = fc[ci]-fb[ci];
sig[ci][si] = fb[ci] + frac*(
- cmb - 0.5f*(frac-1.) * ((fa[ci]-fd[ci]+3.0f*cmb)*frac + (fb[ci]-fa[ci]-cmb))
+ cmb - 0.5f*(frac-1.0f) * ((fa[ci]-fd[ci]+3.0f*cmb)*frac + (fb[ci]-fa[ci]-cmb))
);
}
}