diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2004-07-15 19:05:05 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:11:55 +0200 |
commit | 9ecfff90135ec05498f9f55a39cd386c855a8571 (patch) | |
tree | 4df5eeeadcca3431512a2a6f4a22b29bbeb0756e /sc4pd/source/support.hpp | |
parent | 0f1258611b064b215d1dd877f69e694fedf0d109 (diff) |
rng have setable seed and other changes
svn path=/trunk/externals/tb/; revision=1867
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(); |