permanently mark Delivery processors on master/monitor/audition as immune to solo...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 19 Apr 2010 14:02:53 +0000 (14:02 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 19 Apr 2010 14:02:53 +0000 (14:02 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@6936 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/delivery.h
libs/ardour/delivery.cc
libs/ardour/route.cc
libs/ardour/session.cc

index 95ef485527ae458756528b25b22657c35c11cda2..1efa5436ee53e3fc7bc857bc626a78079cc573a0 100644 (file)
@@ -77,6 +77,7 @@ public:
 
        void set_solo_level (int32_t sl) { _solo_level = sl; }
        void set_solo_isolated (bool yn) { _solo_isolated = yn; }
+        void set_solo_ignored (bool yn)  { _solo_ignored = yn; }
 
        void cycle_start (nframes_t);
        void increment_output_offset (nframes_t);
@@ -114,6 +115,7 @@ public:
        bool        _no_outs_cuz_we_no_monitor;
        uint32_t    _solo_level;
        bool        _solo_isolated;
+        bool        _solo_ignored;
        boost::shared_ptr<MuteMaster> _mute_master;
        bool         no_panner_reset;
        boost::shared_ptr<Panner> _panner;
index 50ca18cb6dd785651babf4662e414f10d47f20ba..3607836f3c404faabbf13de382267dabb2de2ce9 100644 (file)
@@ -57,6 +57,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Mute
        , _no_outs_cuz_we_no_monitor (false)
        , _solo_level (0)
        , _solo_isolated (false)
+        , _solo_ignored (false)
        , _mute_master (mm)
        , no_panner_reset (false)
 {
@@ -81,6 +82,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const string&
        , _no_outs_cuz_we_no_monitor (false)
        , _solo_level (0)
        , _solo_isolated (false)
+        , _solo_ignored (false)
        , _mute_master (mm)
        , no_panner_reset (false)
 {
@@ -486,7 +488,7 @@ Delivery::target_gain ()
 
        gain_t desired_gain = -1.0f;
 
-        if (_solo_level) {
+        if (_solo_level || _solo_ignored) {
 
                desired_gain = 1.0;
 
index cd48995f6a38213f99406797521113c5e9fd8279..091a669dbcbae33ba6e794863b460071518bb3bc 100644 (file)
@@ -132,7 +132,7 @@ Route::init ()
        add_processor (_meter, PostFader);
 
        _main_outs.reset (new Delivery (_session, _output, _mute_master, _name, Delivery::Main));
-        
+
         add_processor (_main_outs, PostFader);
 
        if (is_monitor()) {
@@ -590,7 +590,7 @@ void
 Route::mod_solo_by_others (int32_t delta)
 {
        if (delta < 0) {
-               if (_soloed_by_others >= (uint32_t) delta) {
+               if (_soloed_by_others >= (uint32_t) abs (delta)) {
                        _soloed_by_others += delta;
                } else {
                        _soloed_by_others = 0;
@@ -645,6 +645,8 @@ Route::set_solo_isolated (bool yn, void *src)
                }
        }
 
+        /* XXX should we back-propagate as well? */
+
        bool changed = false;
 
        if (yn) {
@@ -806,6 +808,14 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorList::ite
 
                }
 
+                /* all delivery processors on master, monitor and auditioner never ever pay attention to solo
+                 */
+                boost::shared_ptr<Delivery> d = boost::dynamic_pointer_cast<Delivery>(processor);
+
+                if (d && (is_master() || is_monitor() || is_hidden())) {
+                        d->set_solo_ignored (true);
+                }
+                
                 /* is this the monitor send ? if so, make sure we keep track of it */
 
                 boost::shared_ptr<InternalSend> isend = boost::dynamic_pointer_cast<InternalSend> (processor);
index 9da481e7ce53ac7fa8110eb4c6363955ef481556..90e58098906c2ee39c326e2d7604b06b51dacd26 100644 (file)
@@ -2247,24 +2247,6 @@ Session::route_solo_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
                } 
        }
 
-       /* make sure master is never muted by solo */
-
-       if (_master_out && route != _master_out && _master_out->soloed_by_others() == 0 && !_master_out->soloed()) {
-               _master_out->mod_solo_by_others (1);
-       }
-       /* ditto for control outs make sure it is never muted by solo */
-
-       if (_monitor_out && route != _monitor_out && _monitor_out && _monitor_out->soloed_by_others() == 0) {
-               _monitor_out->mod_solo_by_others (1);
-       }
-
-       /* ditto for auditioner make sure it is never muted by solo */
-
-       if (auditioner) {
-               auditioner->mod_solo_by_others (1);
-       }
-
        solo_update_disabled = false;
        update_route_solo_state (r);
        SoloChanged (); /* EMIT SIGNAL */