diff options
author | John Emmas <johne53@tiscali.co.uk> | 2013-08-30 19:51:45 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2013-08-30 19:51:45 +0100 |
commit | 4a8cd4375d5fd1b5733e691051d1fa7c2ccce595 (patch) | |
tree | 8c2a9330e281b7b60b01e73731a57f9fe8e1749d /libs/ardour/ardour/panner.h | |
parent | 9b6687ff3f980f501bcb3a9e170cf2785c59361e (diff) |
'libs/panners' - A small test (before going too far) to see if these changes have any detrimental affect on the non-MSVC builds.
Diffstat (limited to 'libs/ardour/ardour/panner.h')
-rw-r--r-- | libs/ardour/ardour/panner.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index b30b1859a3..7ebf1ec989 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -34,6 +34,31 @@ #include "ardour/automation_control.h" #include "ardour/automatable.h" +#if !defined(ARDOURPANNER_IS_IN_WINDLL) + #if defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + // If you need '__declspec' compatibility, add extra compilers to the above as necessary + #define ARDOURPANNER_IS_IN_WINDLL 1 + #else + #define ARDOURPANNER_IS_IN_WINDLL 0 + #endif +#endif + +#if ARDOURPANNER_IS_IN_WINDLL && !defined(ARDOURPANNER_API) + #if defined(BUILDING_ARDOURPANNERS) + #define ARDOURPANNER_API __declspec(dllexport) + #define ARDOURPANNER_APICALLTYPE __thiscall + #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point + #define ARDOURPANNER_API __declspec(dllimport) + #define ARDOURPANNER_APICALLTYPE __thiscall + #else + #error "Attempting to define __declspec with an incompatible compiler !" + #endif +#elif !defined(ARDOURPANNER_API) + // Other compilers / platforms could be accommodated here + #define ARDOURPANNER_API + #define ARDOURPANNER_APICALLTYPE +#endif + namespace ARDOUR { class Session; @@ -67,7 +92,7 @@ public: * return false */ - virtual bool clamp_position (double&) { return true; } + virtual bool ARDOURPANNER_APICALLTYPE clamp_position (double&) { return true; } virtual bool clamp_width (double&) { return true; } virtual bool clamp_elevation (double&) { return true; } @@ -75,7 +100,7 @@ public: virtual std::pair<double, double> width_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); } virtual std::pair<double, double> elevation_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); } - virtual void set_position (double) { } + virtual void ARDOURPANNER_APICALLTYPE set_position (double) { } virtual void set_width (double) { } virtual void set_elevation (double) { } |