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_shell_h__
21 #define __ardour_panner_shell_h__
29 #include <boost/noncopyable.hpp>
31 #include "pbd/cartesian.h"
33 #include "ardour/libardour_visibility.h"
34 #include "ardour/types.h"
35 #include "ardour/session_object.h"
47 /** Class to manage panning by instantiating and controlling
48 * an appropriate Panner object for a given in/out configuration.
50 class LIBARDOUR_API PannerShell : public SessionObject
53 PannerShell (std::string name, Session&, boost::shared_ptr<Pannable>);
54 virtual ~PannerShell ();
56 std::string describe_parameter (Evoral::Parameter param);
58 bool can_support_io_configuration (const ChanCount& /*in*/, ChanCount& /*out*/) { return true; };
59 void configure_io (ChanCount in, ChanCount out);
61 /// The fundamental Panner function
62 void run (BufferSet& src, BufferSet& dest, framepos_t start_frame, framepos_t end_frames, pframes_t nframes);
64 XMLNode& get_state ();
65 int set_state (const XMLNode&, int version);
67 PBD::Signal0<void> Changed; /* panner and/or outputs count and/or bypass state changed */
69 boost::shared_ptr<Panner> panner() const { return _panner; }
70 boost::shared_ptr<Pannable> pannable() const { return _pannable; }
72 bool bypassed () const;
73 void set_bypassed (bool);
75 std::string current_panner_uri() const { return _current_panner_uri; }
76 std::string user_selected_panner_uri() const { return _user_selected_panner_uri; }
77 std::string panner_gui_uri() const { return _panner_gui_uri; }
81 void distribute_no_automation (BufferSet& src, BufferSet& dest, pframes_t nframes, gain_t gain_coeff);
82 bool set_user_selected_panner_uri (std::string const uri);
84 boost::shared_ptr<Panner> _panner;
85 boost::shared_ptr<Pannable> _pannable;
88 std::string _current_panner_uri;
89 std::string _user_selected_panner_uri;
90 std::string _panner_gui_uri;
96 #endif /* __ardour_panner_shell_h__ */