2 Copyright (C) 2009 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_mute_master_h__
21 #define __ardour_mute_master_h__
23 #include "evoral/Parameter.hpp"
24 #include "pbd/signals.h"
25 #include "pbd/stateful.h"
32 class MuteMaster : public PBD::Stateful
42 static const MutePoint AllPoints;
44 MuteMaster (Session& s, const std::string& name);
47 bool muted_pre_fader() const { return _mute_point & PreFader; }
48 bool muted_post_fader() const { return _mute_point & PostFader; }
49 bool muted_listen() const { return _mute_point & Listen; }
50 bool muted_main () const { return _mute_point & Main; }
52 bool muted_at (MutePoint mp) const { return _mute_point & mp; }
53 bool muted() const { return _mute_point != MutePoint (0); }
55 gain_t mute_gain_at (MutePoint) const;
58 void mute_at (MutePoint);
59 void unmute_at (MutePoint);
61 PBD::Signal0<void> MutePointChanged;
64 int set_state(const XMLNode&, int version);
65 int set_state(std::string mute_point);
68 MutePoint _mute_point;
73 #endif /*__ardour_mute_master_h__ */