Update of /cvsroot/pure-data/externals/grill/xsample/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29709/source
Modified Files: groove.cpp main.cpp main.h play.cpp record.cpp Log Message: fixes for Metrowerks update for new flext callback naming
Index: record.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/xsample/source/record.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** record.cpp 8 Jan 2005 04:59:44 -0000 1.17 --- record.cpp 13 Mar 2005 04:58:29 -0000 1.18 *************** *** 56,63 **** virtual void DoUpdate(unsigned int flags); 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); --- 56,64 ---- virtual void DoUpdate(unsigned int flags); + virtual void CbSignal(); + virtual void m_help(); virtual void m_print(); ! private: static void setup(t_classid c); *************** *** 386,390 **** }
! void xrecord::m_signal(int n,t_sample *const *in,t_sample *const *out) { int ret = ChkBuffer(true); --- 387,391 ---- }
! void xrecord::CbSignal() { int ret = ChkBuffer(true); *************** *** 394,398 ****
const lock_t l = Lock(); ! recfun(n,in,out); Unlock(l);
--- 395,399 ----
const lock_t l = Lock(); ! recfun(Blocksize(),InSig(),OutSig()); Unlock(l);
*************** *** 401,405 **** else // set position signal to zero ! ZeroSamples(out[0],n); }
--- 402,406 ---- else // set position signal to zero ! ZeroSamples(OutSig()[0],Blocksize()); }
Index: groove.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/xsample/source/groove.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** groove.cpp 28 Jan 2005 04:58:24 -0000 1.31 --- groove.cpp 13 Mar 2005 04:58:28 -0000 1.32 *************** *** 102,108 **** virtual void DoUpdate(unsigned int flags);
virtual void m_help(); virtual void m_print(); - virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
private: --- 102,109 ---- virtual void DoUpdate(unsigned int flags);
+ virtual void CbSignal(); + virtual void m_help(); virtual void m_print();
private: *************** *** 542,546 **** }
! void xgroove::m_signal(int n,t_sample *const *in,t_sample *const *out) { int ret = ChkBuffer(true); --- 543,547 ---- }
! void xgroove::CbSignal() { int ret = ChkBuffer(true); *************** *** 550,554 ****
const lock_t l = Lock(); ! posfun(n,in,out); Unlock(l);
--- 551,555 ----
const lock_t l = Lock(); ! posfun(Blocksize(),InSig(),OutSig()); Unlock(l);
*************** *** 556,560 **** } else ! zerofun(n,in,out); }
--- 557,561 ---- } else ! zerofun(Blocksize(),InSig(),OutSig()); }
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/xsample/source/main.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** main.cpp 8 Jan 2005 04:59:44 -0000 1.19 --- main.cpp 13 Mar 2005 04:58:29 -0000 1.20 *************** *** 37,40 **** --- 37,41 ---- 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); *************** *** 91,95 ****
/* called after all buffer objects have been created in the patch */ ! void xsample::m_loadbang() { ChkBuffer(true); --- 92,96 ----
/* called after all buffer objects have been created in the patch */ ! void xsample::CbLoadbang() { ChkBuffer(true); *************** *** 141,145 **** }
! void xsample::m_dsp(int /*n*/,t_sample *const * /*insigs*/,t_sample *const * /*outsigs*/) { // this is hopefully called at change of sample rate ?! --- 142,146 ---- }
! bool xsample::CbDsp() { // this is hopefully called at change of sample rate ?! *************** *** 153,156 **** --- 154,158 ----
Update(xsc_srate|xsc_buffer,true); + return true; }
Index: main.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/xsample/source/main.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** main.h 28 Jan 2005 04:58:24 -0000 1.34 --- main.h 13 Mar 2005 04:58:29 -0000 1.35 *************** *** 16,20 **** #endif
! #define XSAMPLE_VERSION "0.3.1pre5"
--- 16,20 ---- #endif
! #define XSAMPLE_VERSION "0.3.1pre6"
*************** *** 234,240 **** virtual void DoUpdate(unsigned int flags);
! virtual void m_loadbang(); virtual void m_print() = 0; - virtual void m_dsp(int n,t_sample *const *insigs,t_sample *const *outsigs);
private: --- 234,242 ---- virtual void DoUpdate(unsigned int flags);
! virtual void CbLoadbang(); ! virtual bool CbDsp(); ! ! virtual void m_help() = 0; virtual void m_print() = 0;
private: *************** *** 244,247 **** --- 246,250 ---- static void setup(t_classid c);
+ FLEXT_CALLBACK(m_help) FLEXT_CALLBACK_V(m_set) FLEXT_CALLBACK(m_print)
Index: play.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/xsample/source/play.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** play.cpp 8 Jan 2005 04:59:44 -0000 1.10 --- play.cpp 13 Mar 2005 04:58:29 -0000 1.11 *************** *** 30,36 **** protected: ! virtual void m_help(); virtual void m_print(); - virtual void m_signal(int n,t_sample *const *in,t_sample *const *out); private: --- 30,38 ---- protected: ! ! virtual void CbSignal(); ! ! virtual void m_help(); virtual void m_print(); private: *************** *** 84,90 **** }
! void xplay::m_signal(int n,t_sample *const *in,t_sample *const *out) { int ret = ChkBuffer(true);
// check whether buffer is invalid or changed --- 86,95 ---- }
! 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