3 #ifndef VISR_MAXMSP_MAXSUPPORT_EXTERNAL_WRAPPER_HPP_INCLUDED 4 #define VISR_MAXMSP_MAXSUPPORT_EXTERNAL_WRAPPER_HPP_INCLUDED 33 template<
class ExternalType>
class ClassRegistrar;
35 template<
class ExternalClass>
38 template<
class ExternalType>
58 ExternalClass* mObject;
61 static void dsp64( PlainObject *obj, t_object *dsp64,
short *count,
double samplerate,
long maxvectorsize,
long flags );
63 static void perform64( PlainObject *x, t_object *dsp64,
double **ins,
64 long numins,
double **outs,
long numouts,
65 long sampleframes,
long flags,
void *userparam );
67 static void free( PlainObject *x );
69 static void assist( PlainObject *x,
void *b,
long msg,
long arg,
char *dst );
71 static void getFloat( PlainObject *x,
double f );
73 PlainObject* mPlainStruct;
76 template<
class ExternalClass>
79 post(
"ExternalWrapper<ExternalClass>::dsp64 called." );
83 obj->mObject->initDsp( dsp64, count, samplerate, maxvectorsize, flags );
85 catch( std::exception
const & ex )
87 std::stringstream errMsg;
88 errMsg <<
"maxmsp::ExternalWrapper: Error during dsp_add64(): " << ex.what( );
89 object_error( reinterpret_cast<t_object*>(obj), errMsg.str( ).c_str( ) );
95 template<
class ExternalClass>
97 long numins,
double **outs,
long numouts,
98 long sampleframes,
long flags,
void *userparam )
100 x->mObject->perform( dsp64, ins, numins, outs, numouts, sampleframes, flags, userparam );
103 template<
class ExternalClass>
106 post(
"ExternalWrapper<ExternalClass>::free() called." );
109 dsp_free( &(obj->mMaxProxy) );
113 template<
class ExternalClass>
116 obj->mObject->assist( b, msg, arg, dst );
119 template<
class ExternalClass>
122 obj->mObject->getFloat( f );
128 #endif // VISR_MAXMSP_MAXSUPPORT_EXTERNAL_WRAPPER_HPP_INCLUDED Definition: class_registrar.hpp:31
Definition: options.cpp:10
Definition: external_wrapper.hpp:36