Remove C++11'ism
[ardour.git] / libs / panners / 1in2out / panner_1in2out.h
index 152eb7156aa5d5924464cfe4cf1f350e8a04d3ef..0818bdc9182b3cca669d3a21a8f003849c5d4910 100644 (file)
 #include "pbd/cartesian.h"
 
 #include "ardour/types.h"
-#include "ardour/automation_control.h"
-#include "ardour/automatable.h"
+#include "ardour/panner.h"
+
 
 namespace ARDOUR {
 
-class PannerStereoBase : public class Panner
+class Panner1in2out : public Panner
 {
   public:
-       PannerStereoBase (Panner&);
-       ~PannerStereoBase ();
+       Panner1in2out (boost::shared_ptr<Pannable>);
+       ~Panner1in2out ();
+
+    void set_position (double);
+    bool clamp_position (double&);
+       std::pair<double, double> position_range () const;
+
+       double position() const;
+
+       ChanCount in() const { return ChanCount (DataType::AUDIO, 1); }
+       ChanCount out() const { return ChanCount (DataType::AUDIO, 2); }
 
-        void set_position (double);
+       std::set<Evoral::Parameter> what_can_be_automated() const;
 
-        ChanCount in() const { return ChanCount (DataType::AUDIO, 1); }
-        ChanCount out() const { return ChanCount (DataType::AUDIO, 2); }
+       static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
 
-       /* this class just leaves the pan law itself to be defined
-          by the update(), do_distribute_automated()
-          methods. derived classes also need a factory method
-          and a type name. See EqualPowerStereoPanner as an example.
-       */
+       std::string describe_parameter (Evoral::Parameter);
+       std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
 
-       void do_distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes);
+       XMLNode& get_state ();
+
+       void reset ();
 
   protected:
-        boost::shared_ptr<AutomationControl> _position;
        float left;
        float right;
        float desired_left;
        float desired_right;
        float left_interp;
        float right_interp;
+
+       void distribute_one (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes, uint32_t which);
+       void distribute_one_automated (AudioBuffer& srcbuf, BufferSet& obufs,
+                                      samplepos_t start, samplepos_t end, pframes_t nframes,
+                                      pan_t** buffers, uint32_t which);
+
+       void update ();
 };
 
-}
+} // namespace
 
 #endif /* __ardour_panner_1in2out_h__ */