diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-08-12 02:41:22 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-08-12 02:41:22 +0000 |
commit | 83ff55addd23a3536ed179b58498a95321ce0482 (patch) | |
tree | e45367130afa1208c8fd7806888d372f18a1d826 /externals/grill/xsample/source/inter.h | |
parent | c582d203507d652d6e9c237d9a18bb001a483421 (diff) |
""
svn path=/trunk/; revision=843
Diffstat (limited to 'externals/grill/xsample/source/inter.h')
-rwxr-xr-x | externals/grill/xsample/source/inter.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/externals/grill/xsample/source/inter.h b/externals/grill/xsample/source/inter.h index d5f2b4ac..e7f929e8 100755 --- a/externals/grill/xsample/source/inter.h +++ b/externals/grill/xsample/source/inter.h @@ -138,11 +138,14 @@ TMPLDEF V xinter::st_play4(const S *bdt,const I smin,const I smax,const I n,cons register const S *fa,*fb,*fc,*fd; if(oint <= smin) { + // if oint < first sample set it to first sample + // \TODO what about wraparound (in loop/palindrome mode) ? if(oint < smin) oint = smin,o = (float)smin; - fa = bdt+smin*BCHNS; // position is first sample + // position is first sample + fa = bdt+smin*BCHNS; + fb = bdt+oint*BCHNS; - frac = o-oint; fc = fb+BCHNS; fd = fc+BCHNS; @@ -152,11 +155,11 @@ TMPLDEF V xinter::st_play4(const S *bdt,const I smin,const I smax,const I n,cons frac = o-oint; fb = bdt+oint*BCHNS; - fa = fb-BCHNS; // CACHE! + fa = fb-BCHNS; - // \TODO what about wrap-around??? - fc = fb >= maxp?maxp:fb+BCHNS; // ev. CACHE! - fd = fc >= maxp?maxp:fc+BCHNS; // ev. CACHE! + // \TODO what about wraparound (in loop/palindrome mode) ? + fc = fb >= maxp?maxp:fb+BCHNS; + fd = fc >= maxp?maxp:fc+BCHNS; } else { fa = bdt+oint*BCHNS-BCHNS; |