Merge branch 'master' into windows
[ardour.git] / libs / ardour / ardour / panner.h
index ebb90ac50a0026220fef7828af484fbcd4edfe93..024dcd150c802e2ab74630ff4e8edb046fadf4f4 100644 (file)
 #include "ardour/types.h"
 #include "ardour/automation_control.h"
 #include "ardour/automatable.h"
+#include "ardour/visibility.h"
+
+#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building the ARDOUR Panners DLLs (instead of using them)
+    #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_EXPORT
+#else
+    #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_IMPORT
+#endif 
+#define ARDOURPANNER_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
 
 namespace ARDOUR {
 
@@ -71,6 +79,10 @@ public:
        virtual bool clamp_width (double&) { return true; }
        virtual bool clamp_elevation (double&) { return true; }
 
+       virtual std::pair<double, double> position_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); }
+       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 set_width (double) { }
        virtual void set_elevation (double) { }
@@ -81,10 +93,7 @@ public:
 
        virtual PBD::AngularVector signal_position (uint32_t) const { return PBD::AngularVector(); }
 
-       virtual void reset() {}
-
-       virtual bool bypassed() const { return _bypassed; }
-       virtual void set_bypassed (bool yn);
+       virtual void reset () = 0;
 
        void      set_automation_state (AutoState);
        AutoState automation_state() const;
@@ -140,16 +149,11 @@ public:
                                           framepos_t start, framepos_t end, pframes_t nframes,
                                           pan_t** buffers);
 
-       PBD::Signal0<void> StateChanged;
-
        int set_state (const XMLNode&, int version);
-       virtual XMLNode& state (bool full_state) = 0;
-
+       XMLNode& get_state ();
+       
        boost::shared_ptr<Pannable> pannable() const { return _pannable; }
 
-       //virtual std::string describe_parameter (Evoral::Parameter);
-       //virtual std::string value_as_string (Evoral::Parameter, double val);
-
        static bool equivalent (pan_t a, pan_t b) {
                return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner
        }
@@ -159,16 +163,18 @@ public:
                return fabs (a.azi - b.azi) < 1.0;
        }
 
+        virtual void freeze ();
+        virtual void thaw ();
+
 protected:
        boost::shared_ptr<Pannable> _pannable;
-       bool        _bypassed;
-
-       XMLNode& get_state ();
 
        virtual void distribute_one (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes, uint32_t which) = 0;
        virtual void distribute_one_automated (AudioBuffer&, BufferSet& obufs,
                                               framepos_t start, framepos_t end, pframes_t nframes,
                                               pan_t** buffers, uint32_t which) = 0;
+
+        int32_t _frozen;
 };
 
 } // namespace