Ardour  9.2-79-gba93f2fe52
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 #pragma once
21 
22 #include <string>
23 #include <list>
24 
25 #include <memory>
26 
27 #include "pbd/mutex.h"
28 #include "pbd/signals.h"
30 
31 #include "ardour/session_handle.h"
32 #include "ardour/types.h"
34 
35 namespace ARDOUR {
36 
37 class VCA;
38 
40 {
41 public:
44 
45  VCAList create_vca (uint32_t how_many, std::string const & name = std::string());
46  void remove_vca (std::shared_ptr<VCA>);
47 
48  std::shared_ptr<VCA> vca_by_number(int32_t) const;
49  std::shared_ptr<VCA> vca_by_name (std::string const&) const;
50 
51  VCAList vcas() const;
52  VCAList::size_type n_vcas() const { return _vcas.size(); }
53 
55  PBD::Signal<void()> VCACreated; /*<< is not emitted during set_state */
56 
57  XMLNode& get_state() const;
58  int set_state (XMLNode const&, int version);
59 
60  bool vcas_loaded() const { return _vcas_loaded; }
62 
63  static std::string xml_node_name;
64 
65 private:
66  mutable PBD::Mutex lock;
69 
70  void clear ();
71 };
72 
73 } // namespace
74 
void clear_all_solo_state()
PBD::Mutex lock
Definition: vca_manager.h:66
std::shared_ptr< VCA > vca_by_number(int32_t) const
bool vcas_loaded() const
Definition: vca_manager.h:60
VCAList create_vca(uint32_t how_many, std::string const &name=std::string())
VCAList vcas() const
PBD::Signal< void(VCAList &)> VCAAdded
Definition: vca_manager.h:54
VCAManager(ARDOUR::Session &)
PBD::Signal< void()> VCACreated
Definition: vca_manager.h:55
std::shared_ptr< VCA > vca_by_name(std::string const &) const
VCAList::size_type n_vcas() const
Definition: vca_manager.h:52
static std::string xml_node_name
Definition: vca_manager.h:63
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