diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-11 16:14:54 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-11 16:14:54 +0000 |
commit | 2484291254a949e42ab2cd1ce3595da3629cba05 (patch) | |
tree | 5a1675bc53391788dcff01d6732b2940e4c8c2e2 /libs/ardour/session_state.cc | |
parent | c1be28e7b0dde96fef3e9251e682eafbe2dcf5e9 (diff) |
provide solo mute gain Config parameter as a controllable and use it in the monitor section GUI to allow MIDI binding
git-svn-id: svn://localhost/ardour2/branches/3.0@8825 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 31c1c439a8..17fedfb8a4 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -95,6 +95,7 @@ #include "ardour/pannable.h" #include "ardour/processor.h" #include "ardour/port.h" +#include "ardour/proxy_controllable.h" #include "ardour/region_factory.h" #include "ardour/route_group.h" #include "ardour/send.h" @@ -270,6 +271,10 @@ Session::first_stage_init (string fullpath, string snapshot_name) delta_accumulator_cnt = 0; _slave_state = Stopped; + _solo_cut_control.reset (new ProxyControllable (_("solo cut control (dB)"), PBD::Controllable::GainLike, + boost::bind (&RCConfiguration::set_solo_mute_gain, Config, _1), + boost::bind (&RCConfiguration::get_solo_mute_gain, Config))); + _engine.GraphReordered.connect_same_thread (*this, boost::bind (&Session::graph_reordered, this)); /* These are all static "per-class" signals */ @@ -3521,3 +3526,18 @@ Session::setup_midi_machine_control () mmc->SPPContinue.connect_same_thread (*this, boost::bind (&Session::spp_continue, this, _1, _2)); mmc->SPPStop.connect_same_thread (*this, boost::bind (&Session::spp_stop, this, _1, _2)); } + +boost::shared_ptr<Controllable> +Session::solo_cut_control() const +{ + /* the solo cut control is a bit of an anomaly, at least as of Febrary 2011. There are no other + controls in Ardour that currently get presented to the user in the GUI that require + access as a Controllable and are also NOT owned by some SessionObject (e.g. Route, or MonitorProcessor). + + its actually an RCConfiguration parameter, so we use a ProxyControllable to wrap + it up as a Controllable. Changes to the Controllable will just map back to the RCConfiguration + parameter. + */ + + return _solo_cut_control; +} |