globally change all use of "frame" to refer to audio into "sample".
[ardour.git] / libs / ardour / ardour / panner.h
index 7dd9de6e0ab18e5ab4ff854b5c4834e97b745125..947baca73382cb26a68a05ef796f4d59590fcf72 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
+
+/* 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 {
 
@@ -96,14 +100,15 @@ public:
 
        virtual void reset () = 0;
 
+       /* azimut, width or elevation updated -> recalc signal_position ->  emit Changed */
+       PBD::Signal0<void> SignalPositionChanged;
+
        void      set_automation_state (AutoState);
        AutoState automation_state() const;
-       void      set_automation_style (AutoStyle);
-       AutoStyle automation_style() const;
 
        virtual std::set<Evoral::Parameter> what_can_be_automated() const;
        virtual std::string describe_parameter (Evoral::Parameter);
-       virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
+       virtual std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
 
        bool touching() const;
 
@@ -135,7 +140,7 @@ public:
         *  @param ibufs Input buffers (one per panner input)
         *  @param obufs Output buffers (one per panner output).
         *  @param gain_coeff fixed, additional gain coefficient to apply to output samples.
-        *  @param nframes Number of frames in the input.
+        *  @param nframes Number of samples in the input.
         *
         *  Derived panners can choose to implement these if they need to gain more
         *  control over the panning algorithm.  The default is to call
@@ -147,12 +152,12 @@ public:
         */
        virtual void distribute (BufferSet& ibufs, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes);
        virtual void distribute_automated (BufferSet& ibufs, BufferSet& obufs,
-                                          framepos_t start, framepos_t end, pframes_t nframes,
+                                          samplepos_t start, samplepos_t end, pframes_t nframes,
                                           pan_t** buffers);
 
        int set_state (const XMLNode&, int version);
        XMLNode& get_state ();
-       
+
        boost::shared_ptr<Pannable> pannable() const { return _pannable; }
 
        static bool equivalent (pan_t a, pan_t b) {
@@ -164,18 +169,18 @@ public:
                return fabs (a.azi - b.azi) < 1.0;
        }
 
-        virtual void freeze ();
-        virtual void thaw ();
+       virtual void freeze ();
+       virtual void thaw ();
 
 protected:
        boost::shared_ptr<Pannable> _pannable;
 
        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,
+                                              samplepos_t start, samplepos_t end, pframes_t nframes,
                                               pan_t** buffers, uint32_t which) = 0;
 
-        int32_t _frozen;
+       int32_t _frozen;
 };
 
 } // namespace
@@ -183,8 +188,11 @@ protected:
 extern "C" {
 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<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
 };
 }