Use PBD string conversion functions in PBD::ConfigurationVariable
[ardour.git] / libs / ardour / session.cc
index eb8e233993987b02fbf15819c199c6e5c1a67aa5..ded851faae7e3858036523c2131ff0efff244635 100644 (file)
 #include "ardour/tempo.h"
 #include "ardour/ticker.h"
 #include "ardour/track.h"
+#include "ardour/types_convert.h"
 #include "ardour/user_bundle.h"
 #include "ardour/utils.h"
 #include "ardour/vca_manager.h"
@@ -295,6 +296,7 @@ Session::Session (AudioEngine &eng,
        , _bundle_xml_node (0)
        , _current_trans (0)
        , _clicking (false)
+       , _click_rec_only (false)
        , click_data (0)
        , click_emphasis_data (0)
        , click_length (0)
@@ -3716,12 +3718,13 @@ Session::add_internal_send (boost::shared_ptr<Route> dest, boost::shared_ptr<Pro
 void
 Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
 {
+       bool mute_changed = false;
+
        { // RCU Writer scope
                PBD::Unwinder<bool> uw_flag (_route_deletion_in_progress, true);
                RCUWriter<RouteList> writer (routes);
                boost::shared_ptr<RouteList> rs = writer.get_copy ();
 
-
                for (RouteList::iterator iter = routes_to_remove->begin(); iter != routes_to_remove->end(); ++iter) {
 
                        if (*iter == _master_out) {
@@ -3733,6 +3736,10 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
                                (*iter)->solo_control()->set_value (0.0, Controllable::NoGroup);
                        }
 
+                       if ((*iter)->mute_control()->muted ()) {
+                               mute_changed = true;
+                       }
+
                        rs->remove (*iter);
 
                        /* deleting the master out seems like a dumb
@@ -3784,6 +3791,10 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
 
        } // end of RCU Writer scope
 
+       if (mute_changed) {
+               MuteChanged (); /* EMIT SIGNAL */
+       }
+
        update_route_solo_state ();
        update_latency_compensation ();
        set_dirty();
@@ -3847,6 +3858,7 @@ Session::remove_route (boost::shared_ptr<Route> route)
 void
 Session::route_mute_changed ()
 {
+       MuteChanged (); /* EMIT SIGNAL */
        set_dirty ();
 }