aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/xsample/source/groove.cpp9
-rw-r--r--externals/grill/xsample/source/main.cpp6
-rw-r--r--externals/grill/xsample/source/main.h9
-rw-r--r--externals/grill/xsample/source/play.cpp11
-rw-r--r--externals/grill/xsample/source/record.cpp11
5 files changed, 29 insertions, 17 deletions
diff --git a/externals/grill/xsample/source/groove.cpp b/externals/grill/xsample/source/groove.cpp
index 305abb8c..ccea67df 100644
--- a/externals/grill/xsample/source/groove.cpp
+++ b/externals/grill/xsample/source/groove.cpp
@@ -101,9 +101,10 @@ protected:
virtual void DoReset();
virtual void DoUpdate(unsigned int flags);
+ virtual void CbSignal();
+
virtual void m_help();
virtual void m_print();
- virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
private:
static void setup(t_classid c);
@@ -541,7 +542,7 @@ void xgroove::s_pos_bidir(int n,t_sample *const *invecs,t_sample *const *outvecs
if(lpbang) ToOutBang(outchns+3);
}
-void xgroove::m_signal(int n,t_sample *const *in,t_sample *const *out)
+void xgroove::CbSignal()
{
int ret = ChkBuffer(true);
@@ -549,13 +550,13 @@ void xgroove::m_signal(int n,t_sample *const *in,t_sample *const *out)
FLEXT_ASSERT(buf.Valid());
const lock_t l = Lock();
- posfun(n,in,out);
+ posfun(Blocksize(),InSig(),OutSig());
Unlock(l);
Refresh();
}
else
- zerofun(n,in,out);
+ zerofun(Blocksize(),InSig(),OutSig());
}
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index 030c2675..a19dcb2c 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -36,6 +36,7 @@ FLEXT_LIB_SETUP(xsample,xsample_main)
void xsample::setup(t_classid c)
{
+ FLEXT_CADDMETHOD_(c,0,"help",m_help);
FLEXT_CADDMETHOD_(c,0,"set",m_set);
FLEXT_CADDMETHOD_(c,0,"print",m_print);
FLEXT_CADDMETHOD_(c,0,"refresh",m_refresh);
@@ -90,7 +91,7 @@ int xsample::ChkBuffer(bool refresh)
}
/* called after all buffer objects have been created in the patch */
-void xsample::m_loadbang()
+void xsample::CbLoadbang()
{
ChkBuffer(true);
}
@@ -140,7 +141,7 @@ void xsample::m_max(float mx)
}
}
-void xsample::m_dsp(int /*n*/,t_sample *const * /*insigs*/,t_sample *const * /*outsigs*/)
+bool xsample::CbDsp()
{
// this is hopefully called at change of sample rate ?!
@@ -152,6 +153,7 @@ void xsample::m_dsp(int /*n*/,t_sample *const * /*insigs*/,t_sample *const * /*o
// then we must reset the buffer
Update(xsc_srate|xsc_buffer,true);
+ return true;
}
void xsample::DoReset()
diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h
index aef9bb95..abb20e03 100644
--- a/externals/grill/xsample/source/main.h
+++ b/externals/grill/xsample/source/main.h
@@ -15,7 +15,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#error You need at least flext version 0.5.0
#endif
-#define XSAMPLE_VERSION "0.3.1pre5"
+#define XSAMPLE_VERSION "0.3.1pre6"
// most compilers are somehow broken - in other words - can't handle all C++ features
@@ -233,9 +233,11 @@ protected:
virtual void DoReset();
virtual void DoUpdate(unsigned int flags);
- virtual void m_loadbang();
+ virtual void CbLoadbang();
+ virtual bool CbDsp();
+
+ virtual void m_help() = 0;
virtual void m_print() = 0;
- virtual void m_dsp(int n,t_sample *const *insigs,t_sample *const *outsigs);
private:
@@ -243,6 +245,7 @@ private:
static void setup(t_classid c);
+ FLEXT_CALLBACK(m_help)
FLEXT_CALLBACK_V(m_set)
FLEXT_CALLBACK(m_print)
FLEXT_CALLBACK(m_refresh)
diff --git a/externals/grill/xsample/source/play.cpp b/externals/grill/xsample/source/play.cpp
index 268b853a..69f37cc3 100644
--- a/externals/grill/xsample/source/play.cpp
+++ b/externals/grill/xsample/source/play.cpp
@@ -29,9 +29,11 @@ public:
}
protected:
- virtual void m_help();
+
+ virtual void CbSignal();
+
+ virtual void m_help();
virtual void m_print();
- virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
private:
static void setup(t_classid c);
@@ -83,9 +85,12 @@ xplay::xplay(int argc,const t_atom *argv)
}
}
-void xplay::m_signal(int n,t_sample *const *in,t_sample *const *out)
+void xplay::CbSignal()
{
int ret = ChkBuffer(true);
+ int n = Blocksize();
+ const t_sample *const *in = InSig();
+ t_sample *const *out = OutSig();
// check whether buffer is invalid or changed
if(ret) {
diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp
index 1df51c81..3d9f0605 100644
--- a/externals/grill/xsample/source/record.cpp
+++ b/externals/grill/xsample/source/record.cpp
@@ -55,10 +55,11 @@ protected:
virtual void DoReset();
virtual void DoUpdate(unsigned int flags);
+ virtual void CbSignal();
+
virtual void m_help();
virtual void m_print();
- virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
-
+
private:
static void setup(t_classid c);
@@ -385,7 +386,7 @@ TMPLDEF void xrecord::s_rec(int n,t_sample *const *invecs,t_sample *const *outve
if(lpbang) ToOutBang(3);
}
-void xrecord::m_signal(int n,t_sample *const *in,t_sample *const *out)
+void xrecord::CbSignal()
{
int ret = ChkBuffer(true);
@@ -393,14 +394,14 @@ void xrecord::m_signal(int n,t_sample *const *in,t_sample *const *out)
// call the appropriate dsp function
const lock_t l = Lock();
- recfun(n,in,out);
+ recfun(Blocksize(),InSig(),OutSig());
Unlock(l);
Refresh();
}
else
// set position signal to zero
- ZeroSamples(out[0],n);
+ ZeroSamples(OutSig()[0],Blocksize());
}
void xrecord::DoUpdate(unsigned int flags)