Commit ee22167d authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@252 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 3c1ecd9e
......@@ -90,8 +90,8 @@ HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
CHM_FILE = ..\flext.chm
HHC_LOCATION = "c:\programme\prog\html help workshop\hhc.exe"
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
......
......@@ -80,6 +80,8 @@ Version history:
0.3.2:
- doxygen generated inline documentation / functional reference
- added FLEXT_ADDMETHOD_V (for var arg lists) and FLEXT_ADDMETHOD_A (anythings)... just for clarity
- added some more functionality to the AtomAnything class
0.3.1:
- added some more functionality to the AtomList class
......
......@@ -8,12 +8,10 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
// This is all derived from GEM by Mark Danks
/*! \file flbase.h
\brief Declares the internal flext base classes
\brief Internal flext base classes
!Lacking Details.!
\remark This is all derived from GEM by Mark Danks
*/
#ifndef __FLEXT_BASE_H
......@@ -30,10 +28,11 @@ class flext_obj;
// ----------------------------------------------------------------------------
/*! \struct flext_hdr
\brief The obligatory PD or Max/MSP object header
\internal
This is in a separate struct to assure that obj is the very first thing.
If it were the first thing in flext_obj, then there could be problems with
the vtable.
the virtual table of the C++ class.
*/
// ----------------------------------------------------------------------------
......@@ -64,6 +63,7 @@ struct FLEXT_EXT flext_hdr
// ----------------------------------------------------------------------------
/*! \class flext_obj
\brief The mother of base classes for all flext externs
\internal
Each extern which is written in C++ needs to use the #defines at the
end of this header file.
......@@ -143,19 +143,22 @@ class FLEXT_EXT flext_obj
//! Creation callback
static void callb_setup(t_class *) {}
// --------------------
// This is a temporary holder - don't touch it
/*! \brief This is a temporary holder
\warning don't touch it!
*/
static flext_hdr *m_holder;
static const char *m_holdname; // hold object's name during construction
//! Hold object's name during construction
static const char *m_holdname;
//! The object's name in the patcher
const char *m_name;
// !check whether construction was successful
//! Check whether construction was successful
bool InitOk() const { return init_ok; }
#ifdef MAXMSP
/*! definitions for MaxMSP external libraries */
//@{
//! Definitions for MaxMSP external libraries
union lib_arg {
int i;
......@@ -167,18 +170,22 @@ class FLEXT_EXT flext_obj
static void libfun_add(const char *name,t_method newfun,void (*freefun)(flext_hdr *),int argtp1,...);
static flext_hdr *libfun_new(t_symbol *s,int argc,t_atom *argv);
static void libfun_free(flext_hdr *o);
//@}
#endif
};
//! This has a dummy arg so that NT won't complain
//! \remark This has a dummy arg so that NT won't complain
inline void *operator new(size_t, void *location, void *) { return location; }
//@{
//! Some utility functions for class setup
const char *fl_extract(const char *name,int ix = 0);
const char *fl_strdup(const char *name);
bool fl_chktilde(const char *name);
//@}
// ----------------------------------------
// This should be used in the header
// These should be used in the header
// ----------------------------------------
......
This diff is collapsed.
......@@ -175,28 +175,28 @@ REAL_LIB_1(NAME,NEW_CLASS, 1, TYPE)
// TWO ARGUMENTS
// ----------------------------------------
/*! Implementation of a flext class with two arguments
/*! Implementation of a flext class with 2 arguments
\ingroup FLEXT_NEW
*/
#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
REAL_NEW_2(NAME,NEW_CLASS, 0, TYPE1, TYPE2) \
REAL_EXT(NEW_CLASS, 0)
/*! Implementation of a flext tilde class with one argument
/*! Implementation of a flext tilde class with 2 arguments
\ingroup FLEXT_NEW_DSP
*/
#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
REAL_NEW_2(NAME,NEW_CLASS, 1, TYPE1, TYPE2) \
REAL_EXT(NEW_CLASS, 1)
/*! Implementation of a flext class (part of a library) with two arguments
/*! Implementation of a flext class (part of a library) with 2 arguments
\ingroup FLEXT_LIB
*/
#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_LIB_2(NAME,NEW_CLASS, 0, TYPE1, TYPE2)
/*! Implementation of a flext tilde class (part of a library) with two arguments
/*! Implementation of a flext tilde class (part of a library) with 2 arguments
\ingroup FLEXT_LIB_DSP
*/
#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
......@@ -207,28 +207,28 @@ REAL_LIB_2(NAME,NEW_CLASS, 1, TYPE1, TYPE2)
// THREE ARGUMENTS
// ----------------------------------------
/*! Implementation of a flext class with three arguments
/*! Implementation of a flext class with 3 arguments
\ingroup FLEXT_NEW
*/
#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
REAL_NEW_3(NAME,NEW_CLASS, 0, TYPE1, TYPE2, TYPE3) \
REAL_EXT(NEW_CLASS, 0)
/*! Implementation of a flext tilde class with three arguments
/*! Implementation of a flext tilde class with 3 arguments
\ingroup FLEXT_NEW_DSP
*/
#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
REAL_NEW_3(NAME,NEW_CLASS, 1, TYPE1, TYPE2, TYPE3) \
REAL_EXT(NEW_CLASS, 1)
/*! Implementation of a flext class (part of a library) with three arguments
/*! Implementation of a flext class (part of a library) with 3 arguments
\ingroup FLEXT_LIB
*/
#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_LIB_3(NAME,NEW_CLASS, 0,TYPE1, TYPE2, TYPE3)
/*! Implementation of a flext tilde class (part of a library) with three arguments
/*! Implementation of a flext tilde class (part of a library) with 3 arguments
\ingroup FLEXT_LIB_DSP
*/
#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
......@@ -265,47 +265,47 @@ REAL_LIB_3(NAME,NEW_CLASS, 1, TYPE1, TYPE2, TYPE3)
@{
*/
//! with no arguments
//! Set up a method callback with no arguments
#define FLEXT_CALLBACK(M_FUN) \
static void cb_ ## M_FUN(flext_base *c) \
{ static_cast<thisType *>(c)->M_FUN(); }
//! for anything
//! Set up a method callback for an anything argument
#define FLEXT_CALLBACK_A(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,t_symbol *s,int argc,t_atom *argv) \
{ static_cast<thisType *>(c)->M_FUN(s,argc,argv); }
//! for gimme
//! Set up a method callback for a variable argument list
#define FLEXT_CALLBACK_V(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,int argc,t_atom *argv) \
{ static_cast<thisType *>(c)->M_FUN(argc,argv); }
//! for boolean argument
//! Set up a method callback for a boolean argument
#define FLEXT_CALLBACK_B(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,int &arg1) \
{ static_cast<thisType *>(c)->M_FUN(arg1 != 0); }
//! 1 argument
//! Set up a method callback for 1 argument
#define FLEXT_CALLBACK_1(M_FUN,TP1) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1) \
{ static_cast<thisType *>(c)->M_FUN(arg1); }
//! 2 arguments
//! Set up a method callback for 2 arguments
#define FLEXT_CALLBACK_2(M_FUN,TP1,TP2) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2) \
{ static_cast<thisType *>(c)->M_FUN(arg1,arg2); }
//! 3 arguments
//! Set up a method callback for 3 arguments
#define FLEXT_CALLBACK_3(M_FUN,TP1,TP2,TP3) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) \
{ static_cast<thisType *>(c)->M_FUN(arg1,arg2,arg3); }
//! 4 arguments
//! Set up a method callback for 4 arguments
#define FLEXT_CALLBACK_4(M_FUN,TP1,TP2,TP3,TP4) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) \
{ static_cast<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4); }
//! 5 arguments
//! Set up a method callback for 5 arguments
#define FLEXT_CALLBACK_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) \
{ static_cast<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4,arg5); }
......@@ -313,37 +313,37 @@ static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,T
// Shortcuts
//! 1 float argument
//! Set up a method callback for 1 float argument
#define FLEXT_CALLBACK_F(M_FUN) \
\
FLEXT_CALLBACK_1(M_FUN,float)
//! 2 float arguments
//! Set up a method callback for 2 float arguments
#define FLEXT_CALLBACK_FF(M_FUN) \
\
FLEXT_CALLBACK_2(M_FUN,float,float)
//! 3 float arguments
//! Set up a method callback for 3 float arguments
#define FLEXT_CALLBACK_FFF(M_FUN) \
\
FLEXT_CALLBACK_3(M_FUN,float,float,float)
//! 1 int argument
//! Set up a method callback for 1 integer argument
#define FLEXT_CALLBACK_I(M_FUN) \
\
FLEXT_CALLBACK_1(M_FUN,int)
//! 2 int arguments
//! Set up a method callback for 2 integer arguments
#define FLEXT_CALLBACK_II(M_FUN) \
\
FLEXT_CALLBACK_2(M_FUN,int,int)
//! 3 int arguments
//! Set up a method callback for 3 integer arguments
#define FLEXT_CALLBACK_III(M_FUN) \
\
FLEXT_CALLBACK_3(M_FUN,int,int,int)
//! 1 symbol argument
//! Set up a method callback for 1 symbol argument
#define FLEXT_CALLBACK_S(M_FUN) \
\
FLEXT_CALLBACK_1(M_FUN,t_symptr)
......@@ -363,7 +363,7 @@ FLEXT_CALLBACK_1(M_FUN,t_symptr)
#ifdef FLEXT_THREADS
//! with no arguments
//! Set up a threaded method callback with no arguments
#define FLEXT_THREAD(M_FUN) \
static void cb_ ## M_FUN(flext_base *c) { \
thr_params *p = new thr_params(c); \
......@@ -380,7 +380,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! for anything
//! Set up a threaded method callback for an anything argument
#define FLEXT_THREAD_A(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,t_symbol *s,int argc,t_atom *argv) { \
thr_params *p = new thr_params(c); p->set_any(s,argc,argv); \
......@@ -398,7 +398,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! for gimme
//! Set up a threaded method callback for a variable argument list
#define FLEXT_THREAD_V(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,int argc,t_atom *argv) { \
thr_params *p = new thr_params(c); p->set_gimme(argc,argv); \
......@@ -416,7 +416,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! for boolean argument
//! Set up a threaded method callback for a boolean argument
#define FLEXT_THREAD_B(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,int &arg1) { \
thr_params *p = new thr_params(c); p->var[0]._bool = arg1 != 0; \
......@@ -434,7 +434,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! 1 argument
//! Set up a threaded method callback for 1 argument
#define FLEXT_THREAD_1(M_FUN,TP1) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1) { \
thr_params *p = new thr_params(c); \
......@@ -453,7 +453,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! 2 arguments
//! Set up a threaded method callback for 2 arguments
#define FLEXT_THREAD_2(M_FUN,TP1,TP2) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2) { \
thr_params *p = new thr_params(c); \
......@@ -474,7 +474,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! 3 arguments
//! Set up a threaded method callback for 3 arguments
#define FLEXT_THREAD_3(M_FUN,TP1,TP2,TP3) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) { \
thr_params *p = new thr_params(c); \
......@@ -497,7 +497,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! 4 arguments
//! Set up a threaded method callback for 4 arguments
#define FLEXT_THREAD_4(M_FUN,TP1,TP2,TP3,TP4) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) { \
thr_params *p = new thr_params(c); \
......@@ -522,7 +522,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
return NULL; \
}
//! 5 arguments
//! Set up a threaded method callback for 5 arguments
#define FLEXT_THREAD_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \
static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) { \
thr_params *p = new thr_params(c); \
......@@ -552,38 +552,37 @@ static void *thr_ ## M_FUN(thr_params *p) { \
//! Shortcuts
/*! \brief 1 float argument
*/
//! Set up a threaded method callback for 1 float argument
#define FLEXT_THREAD_F(M_FUN) \
\
FLEXT_THREAD_1(M_FUN,float)
//! 2 float arguments
//! Set up a threaded method callback for 2 float arguments
#define FLEXT_THREAD_FF(M_FUN) \
\
FLEXT_THREAD_2(M_FUN,float,float)
//! 3 float arguments
//! Set up a threaded method callback for 3 float arguments
#define FLEXT_THREAD_FFF(M_FUN) \
\
FLEXT_THREAD_3(M_FUN,float,float,float)
//! 1 int argument
//! Set up a threaded method callback for 1 integer argument
#define FLEXT_THREAD_I(M_FUN) \
\
FLEXT_THREAD_1(M_FUN,int)
//! 2 int arguments
//! Set up a threaded method callback for 2 integer arguments
#define FLEXT_THREAD_II(M_FUN) \
\
FLEXT_THREAD_2(M_FUN,int,int)
//! 3 int arguments
//! Set up a threaded method callback for 3 integer arguments
#define FLEXT_THREAD_III(M_FUN) \
\
FLEXT_THREAD_3(M_FUN,int,int,int)
//! 1 symbol argument
//! Set up a threaded method callback for 1 symbol argument
#define FLEXT_THREAD_S(M_FUN) \
\
FLEXT_THREAD_1(M_FUN,t_symptr)
......@@ -607,61 +606,61 @@ FLEXT_THREAD_1(M_FUN,t_symptr)
@{
*/
//! enable list element distribution over inlets (if no better handler found)
//! Enable list element distribution over inlets (if no better handler found)
#define FLEXT_ADDDIST() \
\
SetDist(true)
//! add handler for bang
//! Add a method handler for bang
#define FLEXT_ADDBANG(IX,M_FUN) \
\
AddMethod(IX,"bang",cb_ ## M_FUN)
//! add handler for method with no args
//! Add a handler for a method with no arguments
#define FLEXT_ADDMETHOD(IX,M_FUN) \
AddMethod(IX,cb_ ## M_FUN)
//! add handler for method with a variable arg list
//! Add a handler for a method with a (variable argument) list
#define FLEXT_ADDMETHOD_V(IX,M_FUN) \
\
AddMethod(IX,cb_ ## M_FUN)
//! add handler for method with an anything argument
//! Add a handler for a method with an anything argument
#define FLEXT_ADDMETHOD_A(IX,M_FUN) \
\
AddMethod(IX,cb_ ## M_FUN)
//! add handler for method with implicit args
//! Add a a handler for a method with implicit arguments
#define FLEXT_ADDMETHOD_(IX,M_TAG,M_FUN) \
\
AddMethod(IX,M_TAG,cb_ ## M_FUN)
//! add handler for method with 1 enum type arg
//! Add a handler for a method with 1 enum type argument
#define FLEXT_ADDMETHOD_E(IX,M_TAG,M_FUN) \
\
AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),a_int,a_null)
//! add handler for method with 1 arg
//! Add a handler for a method with 1 argument
#define FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,TP1) \
\
AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),FLEXTARG(TP1),a_null)
//! add handler for method with 2 args
//! Add a handler for a method with 2 arguments
#define FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,TP1,TP2) \
\
AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),FLEXTARG(TP1),FLEXTARG(TP2),a_null)
//! add handler for method with 3 args
//! Add a handler for a method with 3 arguments
#define FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,TP1,TP2,TP3) \
\
AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null)
//! add handler for method with 4 args
//! Add a handler for a method with 4 arguments
#define FLEXT_ADDMETHOD_4(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \
\
AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null)
//! add handler for method with 5 args
//! Add a handler for a method with 5 arguments
#define FLEXT_ADDMETHOD_5(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \
\
AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null)
......@@ -669,37 +668,37 @@ AddMethod(IX,M_TAG,(methfun)(cb_ ## M_FUN),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(
// Shortcuts
//! boolean argument
//! Add a handler for a method with a boolean argument
#define FLEXT_ADDMETHOD_B(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,bool)
//! 1 float argument
//! Add a handler for a method with 1 float argument
#define FLEXT_ADDMETHOD_F(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,float)
//! 2 float arguments
//! Add a handler for a method with 2 float arguments
#define FLEXT_ADDMETHOD_FF(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,float,float)
//! 3 float arguments
//! Add a handler for a method with 3 float arguments
#define FLEXT_ADDMETHOD_FFF(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,float,float,float)
//! 1 int argument
//! Add a handler for a method with 1 integer argument
#define FLEXT_ADDMETHOD_I(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,int)
//! 2 int arguments
//! Add a handler for a method with 2 integer arguments
#define FLEXT_ADDMETHOD_II(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,int,int)
//! 3 int arguments
//! Add a handler for a method with 3 integer arguments
#define FLEXT_ADDMETHOD_III(IX,M_TAG,M_FUN) \
\
FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,int,int,int)
......@@ -714,37 +713,37 @@ FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,int,int,int)
@{
*/
//! call method with no args
//! Call a (already defined) method with no arguments
#define FLEXT_CALLMETHOD(M_FUN) \
\
cb_ ## M_FUN(this)
//! call method with 1 enum type arg
//! Call a (already defined) method with 1 enum type argument
#define FLEXT_CALLMETHOD_E(M_FUN,ARG) \
\
cb_ ## M_FUN(this,ARG)
//! call method with 1 arg
//! Call a (already defined) method with 1 argument
#define FLEXT_CALLMETHOD_1(M_FUN,ARG) \
\
cb_ ## M_FUN(this,ARG)
//! call method with 2 args
//! Call a (already defined) method with 2 arguments
#define FLEXT_CALLMETHOD_2(M_FUN,ARG1,ARG2) \
\
cb_ ## M_FUN(this,ARG1,ARG2)
//! call method with 3 args
//! Call a (already defined) method with 3 arguments
#define FLEXT_CALLMETHOD_3(M_FUN,ARG1,ARG2,ARG3) \
\
cb_ ## M_FUN(this,ARG1,ARG2,ARG3)
//! call method with 4 args
//! Call a (already defined) method with 4 arguments
#define FLEXT_CALLMETHOD_4(M_FUN,ARG1,ARG2,ARG3,ARG4) \
\
cb_ ## M_FUN(this,ARG1,ARG2,ARG3,ARG4)
//! call method with 5 args
//! Call a (already defined) method with 5 arguments
#define FLEXT_CALLMETHOD_5(M_FUN,ARG1,ARG2,ARG3,ARG4,ARG5) \
\
cb_ ## M_FUN(this,ARG1,ARG2,ARG3,ARG4,ARG5)
......
......@@ -11,22 +11,19 @@ WARRANTIES, see the file, "license.txt," in this distribution.
/*! \file fldsp.h
\brief Declares the flext dsp class
!Lacking Details.!
*/
#ifndef __FLDSP_H
#define __FLDSP_H
//! include the header file declaring the base classes
// include the header file declaring the base classes
#include "flext.h"
// === flext_dsp ==================================================
/*! \class flext_dsp
\brief dsp enabled base object
/*! \brief Flext dsp enabled base object
*/
class flext_dsp:
public flext_base
{
......@@ -34,49 +31,82 @@ class flext_dsp:
public:
/*! \defgroup FLEXT_C_DSP Flext basic dsp functionality
@{
*/
//! returns current sample rate
float Samplerate() const { return srate; }
//! returns current block size
//! returns current block (aka vector) size
int Blocksize() const { return blksz; }
//! returns number of audio system input channels
/*! \brief returns number of audio system input channels
\bug Doesn't work in Max/MSP - is always 0
*/
int ChannelsIn() const { return chnsin; }
//! returns number of audio system output channels
/*! \brief returns number of audio system output channels
\bug Doesn't work in Max/MSP - is always 0
*/
int ChannelsOut() const { return chnsout; }
//! @}
// --- inheritable virtual methods --------------------------------
/*! \defgroup FLEXT_C_VIRTUAL_DSP Flext virtual dsp functions
@{
*/
/*! \brief Called on every dsp init.
\remark Don't expect any valid data in the signal vectors!
@param n: frames (aka samples) in one signal vector
@param insigs: array of input vectors (get number with function CntInSig())
@param outsigs: array of output vectors (get number with function CntOutSig())
\note Don't expect any valid data in the signal vectors!
\param n: frames (aka samples) in one signal vector
\param insigs: array of input vectors (get number with function CntInSig())
\param outsigs: array of output vectors (get number with function CntOutSig())
*/
virtual void m_dsp(int n,t_sample *const *insigs,t_sample *const *outsigs);
/*! \brief Called with every signal vector.
Here you do the dsp calculation
@param n: frames (aka samples) in one signal vector
@param insigs: array of input vectors (get number with function CntInSig())
@param outsigs: array of output vectors (get number with function CntOutSig())
/*! \brief Called with every signal vector - here you do the dsp calculation
\param n: frames (aka samples) in one signal vector
\param insigs: array of input vectors (get number with function CntInSig())
\param outsigs: array of output vectors (get number with function CntOutSig())
*/
virtual void m_signal(int n,t_sample *const *insigs,t_sample *const *outsigs) = 0;
#ifndef MAXMSP
//! called with "enable" message: pauses/resumes dsp - implicitely defined in MaxMSP
/*! \brief called with "enable" message: pauses/resumes dsp
\note PD only - implicitely defined in MaxMSP
*/