2 Copyright (C) 2004-2014 Paul Davis
3 adopted from 2in2out panner by Robin Gareus <robin@gareus.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __ardour_panner_balance_h__
22 #define __ardour_panner_balance_h__
30 #include "pbd/stateful.h"
31 #include "pbd/controllable.h"
32 #include "pbd/cartesian.h"
34 #include "ardour/automation_control.h"
35 #include "ardour/automatable.h"
36 #include "ardour/panner.h"
37 #include "ardour/types.h"
41 class Pannerbalance : public Panner
44 Pannerbalance (boost::shared_ptr<Pannable>);
47 ChanCount in() const { return ChanCount (DataType::AUDIO, 2); }
48 ChanCount out() const { return ChanCount (DataType::AUDIO, 2); }
50 void set_position (double);
51 bool clamp_position (double&);
52 std::pair<double, double> position_range () const;
53 double position () const;
55 std::set<Evoral::Parameter> what_can_be_automated() const;
57 static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
59 std::string describe_parameter (Evoral::Parameter);
60 std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
62 XMLNode& get_state ();
75 void distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes, uint32_t which);
76 void distribute_one_automated (AudioBuffer& srcbuf, BufferSet& obufs,
77 samplepos_t start, samplepos_t end, pframes_t nframes,
78 pan_t** buffers, uint32_t which);
83 #endif /* __ardour_panner_balance_h__ */