Ardour  8.12
vca_manager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
4  *
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.
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 along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __libardour_vca_manager_h__
21 #define __libardour_vca_manager_h__
22 
23 #include <string>
24 #include <list>
25 
26 #include <memory>
27 
28 #include <glibmm/threads.h>
29 
30 #include "pbd/signals.h"
32 
33 #include "ardour/session_handle.h"
34 #include "ardour/types.h"
36 
37 namespace ARDOUR {
38 
39 class VCA;
40 
42 {
43 public:
46 
47  VCAList create_vca (uint32_t how_many, std::string const & name = std::string());
48  void remove_vca (std::shared_ptr<VCA>);
49 
50  std::shared_ptr<VCA> vca_by_number(int32_t) const;
51  std::shared_ptr<VCA> vca_by_name (std::string const&) const;
52 
53  VCAList vcas() const;
54  VCAList::size_type n_vcas() const { return _vcas.size(); }
55 
56  PBD::Signal1<void,VCAList&> VCAAdded;
57  PBD::Signal0<void> VCACreated; /*<< is not emitted during set_state */
58 
59  XMLNode& get_state() const;
60  int set_state (XMLNode const&, int version);
61 
62  bool vcas_loaded() const { return _vcas_loaded; }
64 
65  static std::string xml_node_name;
66 
67 private:
68  mutable Glib::Threads::Mutex lock;
71 
72  void clear ();
73 };
74 
75 } // namespace
76 
77 #endif /* __libardour_vca_manager_h__ */
void clear_all_solo_state()
PBD::Signal1< void, VCAList & > VCAAdded
Definition: vca_manager.h:56
std::shared_ptr< VCA > vca_by_number(int32_t) const
Glib::Threads::Mutex lock
Definition: vca_manager.h:68
bool vcas_loaded() const
Definition: vca_manager.h:62
VCAList create_vca(uint32_t how_many, std::string const &name=std::string())
PBD::Signal0< void > VCACreated
Definition: vca_manager.h:57
VCAList vcas() const
VCAManager(ARDOUR::Session &)
std::shared_ptr< VCA > vca_by_name(std::string const &) const
VCAList::size_type n_vcas() const
Definition: vca_manager.h:54
static std::string xml_node_name
Definition: vca_manager.h:65
int set_state(XMLNode const &, int version)
XMLNode & get_state() const
void remove_vca(std::shared_ptr< VCA >)
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
std::list< std::shared_ptr< VCA > > VCAList
DebugBits VCA