fix missing negation from previous MCP commit
[ardour.git] / libs / surfaces / mackie / strip.cc
index 9e4c72eab40f6f371f7d917351d8608510e635b0..a80306c799fc789b5d6f27f41505d392f81243ec 100644 (file)
@@ -80,7 +80,10 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::
 {
        _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));
@@ -163,7 +166,9 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
 
        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();
@@ -239,7 +244,7 @@ void
 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));
        }
 }
 
@@ -687,7 +692,7 @@ Strip::update_meter ()
 {
        if (_meter) {
                float dB = const_cast<PeakMeter&> (_route->peak_meter()).peak_power (0);
-               _surface->write (_meter->update_message (dB));
+               _meter->send_update (*_surface, dB);
        }
 }