{
_fader = dynamic_cast<Fader*> (Fader::factory (*_surface, index, "fader", *this));
_vpot = dynamic_cast<Pot*> (Pot::factory (*_surface, Pot::ID + index, "vpot", *this));
- _meter = dynamic_cast<Meter*> (Meter::factory (*_surface, index, "meter", *this));
+
+ if (s.mcp().device_info().has_meters()) {
+ _meter = dynamic_cast<Meter*> (Meter::factory (*_surface, index, "meter", *this));
+ }
for (map<Button::ID,StripButtonInfo>::const_iterator b = strip_buttons.begin(); b != strip_buttons.end(); ++b) {
Button* bb = dynamic_cast<Button*> (Button::factory (*_surface, b->first, b->second.base_id + index, b->second.name, *this));
}
void
-Strip::set_route (boost::shared_ptr<Route> r, bool with_messages)
+Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
{
if (_controls_locked) {
return;
set_vpot_parameter (PanAzimuthAutomation);
- _route->solo_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
+ _route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
+ _route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
+
_route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context());
boost::shared_ptr<Pannable> pannable = _route->pannable();
Strip::notify_solo_changed ()
{
if (_route && _solo) {
- _surface->write (_solo->set_state (_route->soloed() ? on : off));
+ _surface->write (_solo->set_state ((_route->soloed() || _route->listening_via_monitor()) ? on : off));
}
}
}
void
-Strip::select_event (Button& button, ButtonState bs)
+Strip::select_event (Button&, ButtonState bs)
{
DEBUG_TRACE (DEBUG::MackieControl, "select button\n");
}
void
-Strip::vselect_event (Button& button, ButtonState bs)
+Strip::vselect_event (Button&, ButtonState bs)
{
if (bs == press) {
int ms = _surface->mcp().modifier_state();
if (ms & MackieControlProtocol::MODIFIER_SHIFT) {
- boost::shared_ptr<AutomationControl> ac = button.control ();
+ boost::shared_ptr<AutomationControl> ac = _vpot->control ();
+
if (ac) {
/* reset to default/normal value */
}
} else {
+
DEBUG_TRACE (DEBUG::MackieControl, "switching to next pot mode\n");
next_pot_mode ();
}
}
void
-Strip::fader_touch_event (Button& button, ButtonState bs)
+Strip::fader_touch_event (Button&, ButtonState bs)
{
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("fader touch, press ? %1\n", (bs == press)));
{
if (_meter) {
float dB = const_cast<PeakMeter&> (_route->peak_meter()).peak_power (0);
- _surface->write (_meter->update_message (dB));
+ _meter->send_update (*_surface, dB);
}
}
}
void
-Strip::gui_selection_changed (ARDOUR::RouteNotificationListPtr rl)
+Strip::gui_selection_changed (const ARDOUR::StrongRouteNotificationList& rl)
{
- for (ARDOUR::RouteNotificationList::iterator i = rl->begin(); i != rl->end(); ++i) {
+ for (ARDOUR::StrongRouteNotificationList::const_iterator i = rl.begin(); i != rl.end(); ++i) {
if ((*i) == _route) {
_surface->write (_select->set_state (on));
return;