logic rearrangement to avoid unnecessary call to Route::monitoring_state() in instrum...
[ardour.git] / libs / ardour / route.cc
index 2ef1fe1738b44e5ea83cbdbd20208b4a883ed297..29aa5b8a6ab9a5cd6dfbba55b8961e93d0cbc588 100644 (file)
@@ -499,14 +499,13 @@ Route::process_output_buffers (BufferSet& bufs,
 
        /* Tell main outs what to do about monitoring.  We do this so that
           on a transition between monitoring states we get a de-clicking gain
-          change in the _main_outs delivery.
+          change in the _main_outs delivery, if config.get_use_monitor_fades()
+          is true.
+          
+          We override this in the case where we have an internal generator.
        */
-       bool silence = monitoring_state () == MonitoringSilence;
-
-       //but we override this in the case where we have an internal generator
-       if ( _have_internal_generator )
-               silence = false;
-
+       bool silence = _have_internal_generator ? false : (monitoring_state () == MonitoringSilence);
+       
        _main_outs->no_outs_cuz_we_no_monitor (silence);
 
        /* -------------------------------------------------------------------------------------------