Ardour  9.0-pre0-582-g084a23a80d
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 <glibmm/threads.h>
28 
29 #include "pbd/signals.h"
31 
32 #include "ardour/session_handle.h"
33 #include "ardour/types.h"
35 
36 namespace ARDOUR {
37 
38 class VCA;
39 
41 {
42 public:
45 
46  VCAList create_vca (uint32_t how_many, std::string const & name = std::string());
47  void remove_vca (std::shared_ptr<VCA>);
48 
49  std::shared_ptr<VCA> vca_by_number(int32_t) const;
50  std::shared_ptr<VCA> vca_by_name (std::string const&) const;
51 
52  VCAList vcas() const;
53  VCAList::size_type n_vcas() const { return _vcas.size(); }
54 
56  PBD::Signal<void()> VCACreated; /*<< is not emitted during set_state */
57 
58  XMLNode& get_state() const;
59  int set_state (XMLNode const&, int version);
60 
61  bool vcas_loaded() const { return _vcas_loaded; }
63 
64  static std::string xml_node_name;
65 
66 private:
67  mutable Glib::Threads::Mutex lock;
70 
71  void clear ();
72 };
73 
74 } // namespace
75 
void clear_all_solo_state()
std::shared_ptr< VCA > vca_by_number(int32_t) const
Glib::Threads::Mutex lock
Definition: vca_manager.h:67
bool vcas_loaded() const
Definition: vca_manager.h:61
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:55
VCAManager(ARDOUR::Session &)
PBD::Signal< void()> VCACreated
Definition: vca_manager.h:56
std::shared_ptr< VCA > vca_by_name(std::string const &) const
VCAList::size_type n_vcas() const
Definition: vca_manager.h:53
static std::string xml_node_name
Definition: vca_manager.h:64
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