ad92137cea437eb5b8514f4dffa0ce2767b631ed
[ardour.git] / libs / ardour / ardour / sidechain.h
1 /*
2  * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
3  * Copyright (C) 2006 Paul Davis
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
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.
14  *
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #ifndef __ardour_sidechain_h__
21 #define __ardour_sidechain_h__
22
23 #include <string>
24
25 #include "pbd/stateful.h"
26 #include "ardour/ardour.h"
27 #include "ardour/io_processor.h"
28
29 namespace ARDOUR {
30
31 class LIBARDOUR_API SideChain : public IOProcessor
32 {
33 public:
34         SideChain (Session&, const std::string&);
35         virtual ~SideChain ();
36
37         void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
38
39         bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
40         bool configure_io (ChanCount in, ChanCount out);
41
42         XMLNode& state(bool full);
43         int      set_state(const XMLNode&, int version);
44
45 private:
46         /* disallow copy construction */
47         SideChain (const SideChain&);
48 };
49
50 } // namespace ARDOUR
51
52 #endif // __ardour_sidechain_h__