diff options
Diffstat (limited to 'externals/grill/xsample/source')
-rwxr-xr-x | externals/grill/xsample/source/inter.h | 15 | ||||
-rw-r--r-- | externals/grill/xsample/source/main.h | 6 |
2 files changed, 13 insertions, 8 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; diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h index 61c0bf4d..e174915b 100644 --- a/externals/grill/xsample/source/main.h +++ b/externals/grill/xsample/source/main.h @@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #define __XSAMPLE_H -#define XSAMPLE_VERSION "0.3.0pre13" +#define XSAMPLE_VERSION "0.3.0pre14" #define FLEXT_ATTRIBUTES 1 @@ -41,7 +41,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif #elif defined(__MWERKS__) // CodeWarrior <= 8 can't take address of a template member function - #ifndef FEXLT_DEBUG + #ifndef FLEXT_DEBUG #define TMPLOPT #endif // #define SIGSTATIC // define that for CW6 @@ -72,6 +72,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #define STD #endif + #ifdef __ALTIVEC__ #if FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) #pragma altivec_model on @@ -95,6 +96,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. } #endif + class xsample: public flext_dsp { |