aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-06-06 02:37:17 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-06-06 02:37:17 +0000
commitd97d46e2806969c994647ee8e3ce64b4f3d1d9f6 (patch)
treea130ac9ea2144b6e2fd40dc56edb24558f54e566 /externals/grill/xsample
parent1b3a9c2ac678727df211d5de8bd032bc2cf1ac4b (diff)
""
svn path=/trunk/; revision=684
Diffstat (limited to 'externals/grill/xsample')
-rw-r--r--externals/grill/xsample/readme.txt1
-rw-r--r--externals/grill/xsample/source/inter.cpp5
-rw-r--r--externals/grill/xsample/source/main.cpp51
-rw-r--r--externals/grill/xsample/source/main.h2
-rw-r--r--externals/grill/xsample/source/record.cpp5
5 files changed, 8 insertions, 56 deletions
diff --git a/externals/grill/xsample/readme.txt b/externals/grill/xsample/readme.txt
index 1785d254..427c9327 100644
--- a/externals/grill/xsample/readme.txt
+++ b/externals/grill/xsample/readme.txt
@@ -103,6 +103,7 @@ Version history:
- Max/MSP OSX: new file xsample-objectmappings.txt fixes load of library on finding correct helpfiles!
- makefiles for command line MSVC++, BCC, cygwin GCC
- better handling of non-existent buffers
+- fixed flext-related error on setting buffers
0.2.4:
- according to flext 0.2.3 changed sample type to t_sample (S)
diff --git a/externals/grill/xsample/source/inter.cpp b/externals/grill/xsample/source/inter.cpp
index f3fba86c..f9d2fe1a 100644
--- a/externals/grill/xsample/source/inter.cpp
+++ b/externals/grill/xsample/source/inter.cpp
@@ -33,8 +33,9 @@ xinter::xinter():
I xinter::m_set(I argc,const t_atom *argv)
{
I r = xsample::m_set(argc,argv);
- if(r < 0) m_reset(); // resets pos/min/max
- if(r != 0) m_units();
+ if(r)
+ // buffer parameters have changed, reset pos/min/max
+ m_reset();
return r;
}
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index 1a44a866..5149ea05 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -222,54 +222,3 @@ 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--) {
- dst[0] = (src[0]+add)*mul;
- dst[1] = (src[1]+add)*mul;
- dst[2] = (src[2]+add)*mul;
- dst[3] = (src[3]+add)*mul;
- dst[4] = (src[4]+add)*mul;
- dst[5] = (src[5]+add)*mul;
- dst[6] = (src[6]+add)*mul;
- dst[7] = (src[7]+add)*mul;
- src += 8,dst += 8;
- }
-
- 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--) {
- dst[0] = src[0]*mul;
- dst[1] = src[1]*mul;
- dst[2] = src[2]*mul;
- dst[3] = src[3]*mul;
- dst[4] = src[4]*mul;
- dst[5] = src[5]*mul;
- dst[6] = src[6]*mul;
- dst[7] = src[7]*mul;
- src += 8,dst += 8;
- }
-
- while(n--) *(dst++) = *(src++)*mul;
-#endif
-}
-*/
-
-
-
diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h
index 2968624e..e73c4d84 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.0pre9"
+#define XSAMPLE_VERSION "0.3.0pre10"
#define FLEXT_ATTRIBUTES 1
diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp
index 02ab41b8..2f16a746 100644
--- a/externals/grill/xsample/source/record.cpp
+++ b/externals/grill/xsample/source/record.cpp
@@ -207,8 +207,9 @@ V xrecord::m_pos(F pos)
I xrecord::m_set(I argc,const t_atom *argv)
{
I r = xsample::m_set(argc,argv);
- if(r < 0) m_reset(); // resets pos/min/max
- if(r != 0) m_units();
+ if(r)
+ // buffer parameters have changed, reset pos/min/max
+ m_reset();
return r;
}