summaryrefslogtreecommitdiff
path: root/libs/surfaces/control_protocol
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-04-08 16:49:47 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:40 -0400
commit653ae4acd639fef149314fe6f8c7a0d862afae40 (patch)
treeba32ff0efd9b105c207ad7e3b2e89d73e76b4355 /libs/surfaces/control_protocol
parentc107f1ab56270f4485ca2a787d575c2b5b53cfcf (diff)
universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
Diffstat (limited to 'libs/surfaces/control_protocol')
-rw-r--r--libs/surfaces/control_protocol/control_protocol.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc
index 5470232ad7..f413ad82d6 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, Controllable::NoGroup);
+ at->rec_enable_control()->set_value (1.0, Controllable::UseGroup);
}
}
@@ -215,7 +215,7 @@ ControlProtocol::route_get_rec_enable (uint32_t table_index)
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(r);
if (at) {
- return at->record_enabled ();
+ return at->rec_enable_control()->get_value();
}
return false;
@@ -248,7 +248,7 @@ ControlProtocol::route_set_gain (uint32_t table_index, float gain)
boost::shared_ptr<Route> r = route_table[table_index];
if (r != 0) {
- r->set_gain (gain, Controllable::UseGroup);
+ r->gain_control()->set_value (gain, Controllable::UseGroup);
}
}
@@ -298,7 +298,7 @@ ControlProtocol::route_get_muted (uint32_t table_index)
return false;
}
- return r->muted ();
+ return r->mute_control()->muted ();
}
void
@@ -311,7 +311,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, Controllable::UseGroup);
+ r->mute_control()->set_value (yn ? 1.0 : 0.0, Controllable::UseGroup);
}
}
@@ -342,7 +342,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, Controllable::UseGroup);
+ r->solo_control()->set_value (yn ? 1.0 : 0.0, Controllable::UseGroup);
}
}