X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fpanner.h;h=1838fb5f56b807c97227b6fa767f291af1b8b25b;hb=71a90399fe8561310b848fbfb8d28a65a395a6c1;hp=c23d3bd33fbe97b0e3331e0a34b9c9a24e93da53;hpb=a6c85286fef1df3f8f025ee6012796898fc5d77f;p=ardour.git diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index c23d3bd33f..1838fb5f56 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -30,37 +30,22 @@ #include "pbd/signals.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #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 - #define ARDOURPANNER_CAPICALLTYPE __cdecl - #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point - #define ARDOURPANNER_API __declspec(dllimport) - #define ARDOURPANNER_APICALLTYPE __thiscall - #define ARDOURPANNER_CAPICALLTYPE __cdecl - #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 - #define ARDOURPANNER_CAPICALLTYPE -#endif + +/* This section is for actual panners to use. They will include this file, + * declare ARDOURPANNER_DLL_EXPORTS during compilation, and ... voila. + */ + +#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building a panner implementation + #define ARDOURPANNER_API LIBARDOUR_DLL_EXPORT + #else + #define ARDOURPANNER_API LIBARDOUR_DLL_IMPORT + #endif +#define ARDOURPANNER_LOCAL LIBARDOUR_DLL_LOCAL namespace ARDOUR { @@ -70,7 +55,7 @@ class BufferSet; class AudioBuffer; class Speakers; -class Panner : public PBD::Stateful, public PBD::ScopedConnectionList +class LIBARDOUR_API Panner : public PBD::Stateful, public PBD::ScopedConnectionList { public: Panner (boost::shared_ptr); @@ -95,7 +80,7 @@ public: * return false */ - virtual bool ARDOURPANNER_APICALLTYPE clamp_position (double&) { return true; } + virtual bool clamp_position (double&) { return true; } virtual bool clamp_width (double&) { return true; } virtual bool clamp_elevation (double&) { return true; } @@ -103,7 +88,7 @@ public: virtual std::pair width_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); } virtual std::pair elevation_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); } - virtual void ARDOURPANNER_APICALLTYPE set_position (double) { } + virtual void set_position (double) { } virtual void set_width (double) { } virtual void set_elevation (double) { } @@ -115,6 +100,9 @@ public: virtual void reset () = 0; + /* azimut, width or elevation updated -> recalc signal_position -> emit Changed */ + PBD::Signal0 SignalPositionChanged; + void set_automation_state (AutoState); AutoState automation_state() const; void set_automation_style (AutoStyle); @@ -171,7 +159,7 @@ public: int set_state (const XMLNode&, int version); XMLNode& get_state (); - + boost::shared_ptr pannable() const { return _pannable; } static bool equivalent (pan_t a, pan_t b) { @@ -200,10 +188,13 @@ protected: } // namespace extern "C" { -struct PanPluginDescriptor { +struct LIBARDOUR_API PanPluginDescriptor { std::string name; + std::string panner_uri; + std::string gui_uri; int32_t in; int32_t out; + uint32_t priority; ARDOUR::Panner* (*factory)(boost::shared_ptr, boost::shared_ptr); }; }