diff options
Diffstat (limited to 'sc4pd/source/support.hpp')
-rw-r--r-- | sc4pd/source/support.hpp | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/sc4pd/source/support.hpp b/sc4pd/source/support.hpp index b6d67a8..79faff5 100644 --- a/sc4pd/source/support.hpp +++ b/sc4pd/source/support.hpp @@ -35,51 +35,22 @@ */ #include <flext.h> -#include <flsupport.h> +//#include <flsupport.h> +#include "SC_PlugIn.h" -#include <strings.h> + +//#include <strings.h> #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif +/* for argument parsing */ +bool sc_add (flext::AtomList a); +float sc_getfloatarg (flext::AtomList a,int i); +bool sc_ar(flext::AtomList a); -inline bool sc_add (flext::AtomList a) -{ - for (int i = 0; i!=a.Count();++i) - { - if ( flext::IsSymbol(a[i]) ) - { - const char * teststring; - teststring = flext::GetString(a[i]); - if((strcmp(teststring,"add"))==0) - return true; - } - } - return false; -} - -inline float sc_getfloatarg (flext::AtomList a,int i) -{ - if (a.Count() > 0 && a.Count() > i) - return flext::GetAFloat(a[i]); - else - return 0; -} -inline bool sc_ar(flext::AtomList a) -{ - for (int i = 0; i!=a.Count();++i) - { - if ( flext::IsSymbol(a[i]) ) - { - const char * teststring; - teststring = flext::GetString(a[i]); - if((strcmp(teststring,"ar"))==0) - return true; - } - } - return false; -} +/* for rngs */ // macros to put rgen state in registers #define RGET \ @@ -92,3 +63,4 @@ inline bool sc_ar(flext::AtomList a) rgen.s2 = s2; \ rgen.s3 = s3; +int32 timeseed(); |