From 83ff55addd23a3536ed179b58498a95321ce0482 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 12 Aug 2003 02:41:22 +0000 Subject: "" svn path=/trunk/; revision=843 --- externals/grill/xsample/source/inter.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'externals/grill/xsample/source/inter.h') 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; -- cgit v1.2.1