aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/xsample')
-rw-r--r--externals/grill/xsample/readme.txt1
-rw-r--r--externals/grill/xsample/source/main.cpp5
-rw-r--r--externals/grill/xsample/source/main.h6
-rw-r--r--externals/grill/xsample/source/record.cpp15
-rwxr-xr-xexternals/grill/xsample/xsample.cwbin280733 -> 280733 bytes
5 files changed, 21 insertions, 6 deletions
diff --git a/externals/grill/xsample/readme.txt b/externals/grill/xsample/readme.txt
index 094a2966..1785d254 100644
--- a/externals/grill/xsample/readme.txt
+++ b/externals/grill/xsample/readme.txt
@@ -102,6 +102,7 @@ Version history:
- added validity check for buffers
- 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
0.2.4:
- according to flext 0.2.3 changed sample type to t_sample (S)
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index 1f79335f..6e17b0a0 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -93,7 +93,10 @@ BL xsample::bufchk()
I xsample::m_set(I argc,const t_atom *argv)
{
- return buf->Set(argc >= 1?GetASymbol(argv[0]):NULL);
+ const t_symbol *sym = argc >= 1?GetASymbol(argv[0]):NULL;
+ int r = buf->Set(sym);
+ if(sym && r < 0) post("%s - can't find buffer %s",thisName(),GetString(sym));
+ return r;
}
BL xsample::m_refresh()
diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h
index bff42b7d..bfbebfe2 100644
--- a/externals/grill/xsample/source/main.h
+++ b/externals/grill/xsample/source/main.h
@@ -11,7 +11,9 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __XSAMPLE_H
#define __XSAMPLE_H
-#define XSAMPLE_VERSION "0.3.0pre8"
+
+#define XSAMPLE_VERSION "0.3.0pre9"
+
#define FLEXT_ATTRIBUTES 1
@@ -37,7 +39,9 @@ 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
#define TMPLOPT
+ #endif
// #define SIGSTATIC // define that for CW6
#elif defined(__MRC__)
// Apple MPW - MrCpp
diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp
index d6b9e70e..02ab41b8 100644
--- a/externals/grill/xsample/source/record.cpp
+++ b/externals/grill/xsample/source/record.cpp
@@ -67,10 +67,7 @@ private:
TMPLSIGFUN(s_rec);
DEFSIGCALL(recfun);
- virtual V m_signal(I n,S *const *in,S *const *out)
- {
- if(bufchk()) recfun(n,in,out);
- }
+ virtual V m_signal(I n,S *const *in,S *const *out);
FLEXT_CALLVAR_F(mg_pos,m_pos)
FLEXT_CALLBACK(m_all)
@@ -393,6 +390,16 @@ TMPLDEF V xrecord::s_rec(I n,S *const *invecs,S *const *outvecs)
if(lpbang) ToOutBang(3);
}
+V xrecord::m_signal(I n,S *const *in,S *const *out)
+{
+ if(bufchk())
+ // call the appropriate dsp function
+ recfun(n,in,out);
+ else
+ // set position signal to zero
+ ZeroSamples(out[0],n);
+}
+
V xrecord::s_dsp()
{
switch(buf->Channels()*1000+inchns) {
diff --git a/externals/grill/xsample/xsample.cw b/externals/grill/xsample/xsample.cw
index 35e592d5..7d44bbe2 100755
--- a/externals/grill/xsample/xsample.cw
+++ b/externals/grill/xsample/xsample.cw
Binary files differ