summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-01-21 11:03:14 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-01-22 11:58:31 -0500
commit9e5b7db89f381c70232fab35dc21fd885863f998 (patch)
tree2300e2211267c9e09f06e4948965d86b5a7bf3fa /libs/surfaces
parenteee07ac351cbdc5ade3d8ceed5de2df7f19a6217 (diff)
first compiling, mostly working version of group controls changes
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/control_protocol/control_protocol.cc6
-rw-r--r--libs/surfaces/faderport/faderport.cc17
-rw-r--r--libs/surfaces/faderport/faderport.h6
-rw-r--r--libs/surfaces/mackie/strip.cc22
-rw-r--r--libs/surfaces/osc/osc.cc8
5 files changed, 29 insertions, 30 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc
index 1ce51bcd75..6d016359bb 100644
--- a/libs/surfaces/control_protocol/control_protocol.cc
+++ b/libs/surfaces/control_protocol/control_protocol.cc
@@ -199,7 +199,7 @@ ControlProtocol::route_set_rec_enable (uint32_t table_index, bool yn)
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(r);
if (at) {
- at->set_record_enabled (yn, this);
+ at->set_record_enabled (yn, Controllable::NoGroup);
}
}
@@ -312,7 +312,7 @@ ControlProtocol::route_set_muted (uint32_t table_index, bool yn)
boost::shared_ptr<Route> r = route_table[table_index];
if (r != 0) {
- r->set_mute (yn, this);
+ r->set_mute (yn, Controllable::UseGroup);
}
}
@@ -343,7 +343,7 @@ ControlProtocol::route_set_soloed (uint32_t table_index, bool yn)
boost::shared_ptr<Route> r = route_table[table_index];
if (r != 0) {
- r->set_solo (yn, this);
+ r->set_solo (yn, Controllable::UseGroup);
}
}
diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc
index 50250a5f13..a1ca393d73 100644
--- a/libs/surfaces/faderport/faderport.cc
+++ b/libs/surfaces/faderport/faderport.cc
@@ -1107,9 +1107,9 @@ FaderPort::set_current_route (boost::shared_ptr<Route> r)
if (_current_route) {
_current_route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::drop_current_route, this), this);
- _current_route->mute_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_mute, this, _1), this);
- _current_route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_solo, this, _1, _2, _3), this);
- _current_route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_listen, this, _1, _2), this);
+ _current_route->mute_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_mute, this), this);
+ _current_route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_solo, this), this);
+ _current_route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::map_listen, this), this);
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track> (_current_route);
if (t) {
@@ -1187,7 +1187,7 @@ FaderPort::map_cut ()
}
void
-FaderPort::map_mute (void*)
+FaderPort::map_mute ()
{
if (_current_route) {
if (_current_route->muted()) {
@@ -1204,7 +1204,7 @@ FaderPort::map_mute (void*)
}
void
-FaderPort::map_solo (bool, void*, bool)
+FaderPort::map_solo ()
{
if (_current_route) {
get_button (Solo).set_led_state (_output_port, _current_route->soloed() || _current_route->listening_via_monitor());
@@ -1214,7 +1214,7 @@ FaderPort::map_solo (bool, void*, bool)
}
void
-FaderPort::map_listen (void*, bool)
+FaderPort::map_listen ()
{
if (_current_route) {
get_button (Solo).set_led_state (_output_port, _current_route->listening_via_monitor());
@@ -1292,8 +1292,7 @@ FaderPort::map_route_state ()
stop_blinking (Solo);
get_button (Rec).set_led_state (_output_port, false);
} else {
- /* arguments to these map_*() methods are all ignored */
- map_solo (false, 0, false);
+ map_solo ();
map_recenable ();
map_gain ();
map_auto ();
@@ -1301,7 +1300,7 @@ FaderPort::map_route_state ()
if (_current_route == session->monitor_out()) {
map_cut ();
} else {
- map_mute (0);
+ map_mute ();
}
}
}
diff --git a/libs/surfaces/faderport/faderport.h b/libs/surfaces/faderport/faderport.h
index 025cf09e00..d0a4d915f0 100644
--- a/libs/surfaces/faderport/faderport.h
+++ b/libs/surfaces/faderport/faderport.h
@@ -302,9 +302,9 @@ class FaderPort : public ARDOUR::ControlProtocol, public AbstractUI<FaderPortReq
PBD::ScopedConnectionList route_connections;
void map_route_state ();
- void map_solo (bool,void*,bool);
- void map_listen (void*,bool);
- void map_mute (void*);
+ void map_solo ();
+ void map_listen ();
+ void map_mute ();
void map_recenable ();
void map_gain ();
void map_cut ();
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc
index af938b8990..582f7e34bf 100644
--- a/libs/surfaces/mackie/strip.cc
+++ b/libs/surfaces/mackie/strip.cc
@@ -876,15 +876,7 @@ Strip::handle_button (Button& button, ButtonState bs)
DEBUG_TRACE (DEBUG::MackieControl, "add button on press\n");
_surface->mcp().add_down_button ((AutomationType) control->parameter().type(), _surface->number(), _index);
- float new_value;
- int ms = _surface->mcp().main_modifier_state();
-
- if (ms & MackieControlProtocol::MODIFIER_SHIFT) {
- /* reset to default/normal value */
- new_value = control->normal();
- } else {
- new_value = control->get_value() ? 0.0 : 1.0;
- }
+ float new_value = control->get_value() ? 0.0 : 1.0;
/* get all controls that either have their
* button down or are within a range of
@@ -897,10 +889,18 @@ Strip::handle_button (Button& button, ButtonState bs)
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("there are %1 buttons down for control type %2, new value = %3\n",
controls.size(), control->parameter().type(), new_value));
- /* apply change */
+ /* apply change, with potential modifier semantics */
+
+ Controllable::GroupControlDisposition gcd;
+
+ if (_surface->mcp().main_modifier_state() & MackieControlProtocol::MODIFIER_SHIFT) {
+ gcd = Controllable::NoGroup;
+ } else {
+ gcd = Controllable::UseGroup;
+ }
for (MackieControlProtocol::ControlList::iterator c = controls.begin(); c != controls.end(); ++c) {
- (*c)->set_value (new_value, Controllable::NoGroup);
+ (*c)->set_value (new_value, gcd);
}
} else {
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index 7504cf0cdb..7308941ac7 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -1047,7 +1047,7 @@ OSC::route_mute (int rid, int yn)
boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
if (r) {
- r->set_mute (yn, this);
+ r->set_mute (yn, PBD::Controllable::NoGroup);
}
return 0;
@@ -1063,7 +1063,7 @@ OSC::route_solo (int rid, int yn)
if (r) {
boost::shared_ptr<RouteList> rl (new RouteList);
rl->push_back (r);
- session->set_solo (rl, yn);
+ session->set_solo (rl, yn, Session::rt_cleanup, PBD::Controllable::NoGroup);
}
return 0;
@@ -1077,7 +1077,7 @@ OSC::route_recenable (int rid, int yn)
boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
if (r) {
- r->set_record_enabled (yn, this);
+ r->set_record_enabled (yn, PBD::Controllable::NoGroup);
}
return 0;
@@ -1112,7 +1112,7 @@ OSC::route_set_trim_abs (int rid, float level)
boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
if (r) {
- r->set_trim (level, this);
+ r->set_trim (level, PBD::Controllable::NoGroup);
}
return 0;