aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r--externals/grill/flext/source/fldsp.h8
-rw-r--r--externals/grill/flext/source/flext.h11
-rw-r--r--externals/grill/flext/source/flstdc.h41
3 files changed, 17 insertions, 43 deletions
diff --git a/externals/grill/flext/source/fldsp.h b/externals/grill/flext/source/fldsp.h
index 7004b891..f4c6f470 100644
--- a/externals/grill/flext/source/fldsp.h
+++ b/externals/grill/flext/source/fldsp.h
@@ -64,8 +64,14 @@ public:
t_sample *const *OutSig() const
{
int i = CntInSig();
- // we have at least one actual dsp in vector
+ // in PD we have at least one actual dsp in vector
+#if FLEXT_SYS == FLEXT_SYS_PD
return vecs+(i?i:1);
+#elif FLEXT_SYS == FLEXT_SYS_MAX
+ return vecs+i;
+#else
+#error
+#endif
}
//! returns output vector
diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h
index 7fb2be89..71a35ea6 100644
--- a/externals/grill/flext/source/flext.h
+++ b/externals/grill/flext/source/flext.h
@@ -56,12 +56,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
-#if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN
-// for wmax alignment must be 2 bytes!
-#pragma pack(2)
-#endif
-
-
// include all the flext interface definitions
#include "fldefs.h"
@@ -71,9 +65,4 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// include the flext dsp class
#include "fldsp.h"
-/*
-#if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN
-#pragma pack(pop)
-#endif
-*/
#endif // FLEXT_H
diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h
index 3d699ce1..4d913afe 100644
--- a/externals/grill/flext/source/flstdc.h
+++ b/externals/grill/flext/source/flstdc.h
@@ -96,6 +96,11 @@ typedef t_clock t_qelem;
/* Max/MSP definitions start here */
+// 2-byte alignment for Max/MSP structures
+#ifdef _MSC_VER
+#pragma pack(push,flext_maxsdk)
+#pragma pack(2)
+#endif
// Include the relevant Max/MSP header files
@@ -117,7 +122,6 @@ typedef t_clock t_qelem;
#define WIN_EXT_VERSION 1
#endif
-
// necessary for the old OS9 SDK
extern "C" {
@@ -137,7 +141,6 @@ extern "C" {
#undef WIN_VERSION
-
typedef t_pxobject t_sigobj; // that's the all-in-one object type of Max/MSP (not very memory-efficent, i guess)
typedef t_patcher t_canvas;
@@ -187,36 +190,12 @@ typedef void t_binbuf;
#define critical_exit(N)
#endif
-#elif FLEXT_SYS == FLEXT_SYS_JMAX
-
-extern "C" {
- // Wow, the jMax developers made excessive use of C++ reserved words
- // good hit!
- #define typeid c_typeid_
- #define template c_template_
- #define this c_this_
- #define class c_class_
-
- #include <fts/fts.h>
-
- // undefine them again
- #undef typeid
- #undef template
- #undef this
- #undef class
-}
-
-typedef fts_dsp_object t_sigobj;
-typedef void t_canvas; // decide type later on
-
-typedef char t_symbol;
-typedef fts_atom_t t_atom;
-typedef fts_class_t t_class;
-typedef float t_sample; // is there no sample type in jMax?
-
-typedef fts_timebase_entry_t t_clock;
-typedef fts_timebase_entry_t t_qelem;
+#ifdef _MSC_VER
+#pragma pack(pop,flext_maxsdk)
+#endif
+#else
+#error Platform not supported
#endif // FLEXT_SYS