aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-06-04 02:38:08 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-06-04 02:38:08 +0000
commita6d4aa2bcc49633db1d8464f7727cb73e2c0d052 (patch)
treedd3bc68f69d188f32d18022cf5d773a8f201079e /externals/grill/xsample
parent3fb9132261bbc69087161c0f80a3be10a60f07a9 (diff)
""
svn path=/trunk/; revision=681
Diffstat (limited to 'externals/grill/xsample')
-rw-r--r--externals/grill/xsample/source/main.cpp12
-rw-r--r--externals/grill/xsample/source/main.h8
2 files changed, 14 insertions, 6 deletions
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index 6e17b0a0..1a44a866 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -223,9 +223,12 @@ V xsample::m_dsp(I /*n*/,S *const * /*insigs*/,S *const * /*outsigs*/)
if(!m_refresh()) s_dsp();
}
-
+/*
V xsample::arrscale(I n,const S *src,S *dst,S add,S mul)
{
+#if 1
+ flext::ScaleSamples(dst,src,mul,add*mul,n);
+#else
int n8 = n>>3;
n -= n8<<3;
while(n8--) {
@@ -241,10 +244,14 @@ V xsample::arrscale(I n,const S *src,S *dst,S add,S mul)
}
while(n--) *(dst++) = (*(src++)+add)*mul;
+#endif
}
V xsample::arrmul(I n,const S *src,S *dst,S mul)
{
+#if 1
+ flext::MulSamples(dst,src,mul,n);
+#else
int n8 = n>>3;
n -= n8<<3;
while(n8--) {
@@ -260,8 +267,9 @@ V xsample::arrmul(I n,const S *src,S *dst,S mul)
}
while(n--) *(dst++) = *(src++)*mul;
+#endif
}
-
+*/
diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h
index bfbebfe2..2968624e 100644
--- a/externals/grill/xsample/source/main.h
+++ b/externals/grill/xsample/source/main.h
@@ -19,8 +19,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 402)
-#error You need at least flext version 0.4.2
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500)
+#error You need at least flext version 0.5.0
#endif
@@ -127,10 +127,10 @@ protected:
inline F scale(F smp) const { return (smp-sclmin)*sclmul; }
- static V arrscale(I n,const S *in,S *out,S add,S mul);
+ static V arrscale(I n,const S *in,S *out,S add,S mul) { flext::ScaleSamples(out,in,mul,add,n); }
inline V arrscale(I n,const S *in,S *out) const { arrscale(n,in,out,(S)-sclmin,sclmul); }
- static V arrmul(I n,const S *in,S *out,S mul);
+ static V arrmul(I n,const S *in,S *out,S mul) { flext::MulSamples(out,in,mul,n); }
inline V arrmul(I n,const S *in,S *out) const { arrmul(n,in,out,(S)(1./s2u)); }
BL bufchk();