bring back full mute control (pre/post/control/main) via mute button context click

git-svn-id: svn://localhost/ardour2/branches/3.0@6116 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-11-18 13:25:13 +00:00
parent 9931171b69
commit ef92349187
8 changed files with 108 additions and 90 deletions

View file

@ -38,6 +38,8 @@ class MuteMaster : public AutomationControl
Main = 0x8
};
static const MutePoint AllPoints;
MuteMaster (Session& s, const std::string& name);
~MuteMaster() {}

View file

@ -83,7 +83,7 @@ CONFIG_VARIABLE (bool, solo_control_is_listen_control, "solo-control-is-listen-c
CONFIG_VARIABLE (bool, solo_latched, "solo-latched", true)
CONFIG_VARIABLE (bool, latched_record_enable, "latched-record-enable", false)
CONFIG_VARIABLE (bool, all_safe, "all-safe", false)
CONFIG_VARIABLE (bool, show_solo_mutes, "show-solo-mutes", false)
CONFIG_VARIABLE (bool, show_solo_mutes, "show-solo-mutes", true)
CONFIG_VARIABLE (bool, solo_mute_override, "solo-mute-override", false)
CONFIG_VARIABLE (bool, tape_machine_mode, "tape-machine-mode", false)
CONFIG_VARIABLE (gain_t, solo_mute_gain, "solo-mute-gain", 0.0)

View file

@ -120,10 +120,11 @@ class Route : public SessionObject, public AutomatableControls
void set_gain (gain_t val, void *src);
void inc_gain (gain_t delta, void *src);
void set_mute_points (MuteMaster::MutePoint);
MuteMaster::MutePoint mute_points() const { return _mute_points; }
void set_mute (bool yn, void* src);
bool muted () const;
/* controls use set_solo() to modify this route's solo state
*/
@ -232,10 +233,7 @@ class Route : public SessionObject, public AutomatableControls
sigc::signal<void,void*> solo_isolated_changed;
sigc::signal<void,void*> comment_changed;
sigc::signal<void,void*> mute_changed;
sigc::signal<void,void*> pre_fader_changed;
sigc::signal<void,void*> post_fader_changed;
sigc::signal<void,void*> control_outs_changed;
sigc::signal<void,void*> main_outs_changed;
sigc::signal<void> mute_points_changed;
sigc::signal<void> processors_changed;
sigc::signal<void,void*> record_enable_changed;
sigc::signal<void,void*> route_group_changed;
@ -360,6 +358,7 @@ class Route : public SessionObject, public AutomatableControls
boost::shared_ptr<SoloControllable> _solo_control;
boost::shared_ptr<MuteMaster> _mute_master;
MuteMaster::MutePoint _mute_points;
RouteGroup* _route_group;
std::string _comment;

View file

@ -27,6 +27,11 @@
using namespace ARDOUR;
const MuteMaster::MutePoint MuteMaster::AllPoints = MutePoint (MuteMaster::PreFader|
MuteMaster::PostFader|
MuteMaster::Listen|
MuteMaster::Main);
MuteMaster::MuteMaster (Session& s, const std::string& name)
: AutomationControl (s, Evoral::Parameter (MuteAutomation), boost::shared_ptr<AutomationList>(), name)
, _mute_point (MutePoint (0))

View file

@ -130,6 +130,7 @@ Route::init ()
_pending_declick = true;
_remote_control_id = 0;
_in_configure_processors = false;
_mute_points = MuteMaster::AllPoints;
_route_group = 0;
@ -583,6 +584,18 @@ Route::solo_isolated () const
return _solo_isolated;
}
void
Route::set_mute_points (MuteMaster::MutePoint mp)
{
_mute_points = mp;
mute_points_changed (); /* EMIT SIGNAL */
if (_mute_master->muted()) {
_mute_master->mute_at (_mute_points);
mute_changed (this); /* EMIT SIGNAL */
}
}
void
Route::set_mute (bool yn, void *src)
{
@ -592,8 +605,13 @@ Route::set_mute (bool yn, void *src)
}
if (muted() != yn) {
_mute_master->mute (yn);
mute_changed (src);
if (yn) {
_mute_master->mute_at (_mute_points);
} else {
_mute_master->clear_mute ();
}
mute_changed (src); /* EMIT SIGNAL */
}
}

View file

@ -2439,7 +2439,7 @@ Session::route_solo_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
if (!via_sends_only) {
/* do it */
(*i)->mod_solo_level (delta);
}
}
}
}