Ardour  8.12
mute_master.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2010 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
4  * Copyright (C) 2009-2016 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2015-2017 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #ifndef __ardour_mute_master_h__
23 #define __ardour_mute_master_h__
24 
25 #include <string>
26 
27 #include "pbd/signals.h"
28 #include "pbd/stateful.h"
29 
30 #include "evoral/Parameter.h"
31 
32 #include "ardour/session_handle.h"
33 #include "ardour/types.h"
34 
35 namespace ARDOUR {
36 
37 class Session;
38 class Muteable;
39 
41 {
42 public:
44  enum MutePoint {
45  PreFader = 0x1,
46  PostFader = 0x2,
47  Listen = 0x4,
48  Main = 0x8,
49  SurroundSend = 0x10
50  };
51 
52  static const MutePoint AllPoints;
53 
54  MuteMaster (Session& s, Muteable&, const std::string& name);
56 
57  bool muted_by_self () const { return _muted_by_self && (_mute_point != MutePoint (0)); }
58  bool muted_by_self_at (MutePoint mp) const { return _muted_by_self && (_mute_point & mp); }
60  bool muted_by_masters () const { return _muted_by_masters && (_mute_point != MutePoint (0)); }
61  bool muted_by_masters_at (MutePoint mp) const { return _muted_by_masters && (_mute_point & mp); }
62 
64 
65  void set_muted_by_self (bool yn) { _muted_by_self = yn; }
66 
69 
70  void set_mute_points (const std::string& mute_point);
72  MutePoint mute_points() const { return _mute_point; }
73 
74  void set_soloed_by_self (bool yn) { _soloed_by_self = yn; }
75  void set_soloed_by_others (bool yn) { _soloed_by_others = yn; }
76 
77  void set_muted_by_masters (bool);
78 
79  PBD::Signal0<void> MutePointChanged;
80 
81  XMLNode& get_state() const;
82  int set_state(const XMLNode&, int version);
83  static const std::string xml_node_name;
84 
85 private:
92 };
93 
94 } // namespace ARDOUR
95 
96 #endif /*__ardour_mute_master_h__ */
Muteable * _muteable
Definition: mute_master.h:86
void unmute_at(MutePoint)
void set_muted_by_masters(bool)
gain_t mute_gain_at(MutePoint) const
void set_muted_by_self(bool yn)
Definition: mute_master.h:65
void set_soloed_by_others(bool yn)
Definition: mute_master.h:75
void set_mute_points(MutePoint)
static const MutePoint AllPoints
Definition: mute_master.h:52
void set_soloed_by_self(bool yn)
Definition: mute_master.h:74
bool muted_by_masters_at(MutePoint mp) const
Definition: mute_master.h:61
void mute_at(MutePoint)
MutePoint mute_points() const
Definition: mute_master.h:72
bool muted_by_self() const
Definition: mute_master.h:57
int set_state(const XMLNode &, int version)
void set_mute_points(const std::string &mute_point)
XMLNode & get_state() const
static const std::string xml_node_name
Definition: mute_master.h:83
bool muted_by_others_soloing_at(MutePoint mp) const
MuteMaster(Session &s, Muteable &, const std::string &name)
MutePoint _mute_point
Definition: mute_master.h:87
bool muted_by_masters() const
Definition: mute_master.h:60
PBD::Signal0< void > MutePointChanged
Definition: mute_master.h:79
bool muted_by_self_at(MutePoint mp) const
Definition: mute_master.h:58
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API