aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-08-12 02:41:22 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-08-12 02:41:22 +0000
commit83ff55addd23a3536ed179b58498a95321ce0482 (patch)
treee45367130afa1208c8fd7806888d372f18a1d826 /externals/grill/xsample/source
parentc582d203507d652d6e9c237d9a18bb001a483421 (diff)
""
svn path=/trunk/; revision=843
Diffstat (limited to 'externals/grill/xsample/source')
-rwxr-xr-xexternals/grill/xsample/source/inter.h15
-rw-r--r--externals/grill/xsample/source/main.h6
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
{