add DEBUG::Solo for conditional debugging of solo stuff, just in case
[ardour.git] / libs / ardour / route.cc
index 28a866bfa2057053f5ce6d05e317de469106308f..e3ef2ea6f006ec28a78c3a46d248fd1fc173d7dd 100644 (file)
@@ -608,8 +608,6 @@ Route::mod_solo_by_others_upstream (int32_t delta)
 
         uint32_t old_sbu = _soloed_by_others_upstream;
 
-        // cerr << name() << " SbU was " << old_sbu << " delta " << delta << " = ";
-
        if (delta < 0) {
                if (_soloed_by_others_upstream >= (uint32_t) abs (delta)) {
                        _soloed_by_others_upstream += delta;
@@ -620,7 +618,9 @@ Route::mod_solo_by_others_upstream (int32_t delta)
                _soloed_by_others_upstream += delta;
        }
 
-        // cerr << _soloed_by_others_upstream << endl;
+        DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 latched %7\n",
+                                                  name(), delta, _soloed_by_others_upstream, old_sbu, 
+                                                  _soloed_by_others_downstream, _self_solo, Config->get_solo_latched()));
 
         /* push the inverse solo change to everything that feeds us. 
            
@@ -635,25 +635,19 @@ Route::mod_solo_by_others_upstream (int32_t delta)
            not in reverse.
          */
 
-        // cerr << name() << " SbU ... sbd = " << _soloed_by_others_downstream 
-        // << " ss = " << _self_solo << " latched solo?  " << Config->get_solo_latched() << " delta = " 
-        // << delta << endl;
-
         if ((_self_solo || _soloed_by_others_downstream) &&
             ((old_sbu == 0 && _soloed_by_others_upstream > 0) || 
              (old_sbu > 0 && _soloed_by_others_upstream == 0))) {
                 
                 if (delta > 0 || Config->get_solo_latched()) {
-                        // cerr << "\t ... INVERT push\n";
+                        DEBUG_TRACE (DEBUG::Solo, "\t ... INVERT push\n");
                         for (FedBy::iterator i = _fed_by.begin(); i != _fed_by.end(); ++i) {
                                 boost::shared_ptr<Route> sr = i->r.lock();
                                 if (sr) {
                                         sr->mod_solo_by_others_downstream (-delta);
                                 }
                         }
-                } else {
-                        // cerr << "\t... skip invert push\n";
-                }
+                } 
         }
 
         set_mute_master_solo ();
@@ -667,8 +661,6 @@ Route::mod_solo_by_others_downstream (int32_t delta)
                 return;
         }
 
-        // cerr << name() << " SbD delta " << delta << " = ";  
-
         if (delta < 0) {
                if (_soloed_by_others_downstream >= (uint32_t) abs (delta)) {
                        _soloed_by_others_downstream += delta;
@@ -679,7 +671,7 @@ Route::mod_solo_by_others_downstream (int32_t delta)
                _soloed_by_others_downstream += delta;
        }
 
-        // cerr << _soloed_by_others_downstream << endl;
+        DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbD delta %2 = %3\n", name(), delta, _soloed_by_others_downstream));
 
         set_mute_master_solo ();
         solo_changed (false, this);