2 Copyright (C) 2004-2011 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_panner_1in2out_h__
21 #define __ardour_panner_1in2out_h__
29 #include "pbd/stateful.h"
30 #include "pbd/controllable.h"
31 #include "pbd/cartesian.h"
33 #include "ardour/types.h"
34 #include "ardour/panner.h"
38 class Panner1in2out : public Panner
41 Panner1in2out (boost::shared_ptr<Pannable>);
44 void set_position (double);
45 bool clamp_position (double&);
47 double position() const;
49 ChanCount in() const { return ChanCount (DataType::AUDIO, 1); }
50 ChanCount out() const { return ChanCount (DataType::AUDIO, 2); }
52 std::set<Evoral::Parameter> what_can_be_automated() const;
54 static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
56 std::string describe_parameter (Evoral::Parameter);
57 std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
59 XMLNode& get_state ();
71 void distribute_one (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes, uint32_t which);
72 void distribute_one_automated (AudioBuffer& srcbuf, BufferSet& obufs,
73 framepos_t start, framepos_t end, pframes_t nframes,
74 pan_t** buffers, uint32_t which);
81 #endif /* __ardour_panner_1in2out_h__ */