From 1ceee92bb57744259afca833abbd07a2013567ee Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 19 Apr 2010 14:02:53 +0000 Subject: permanently mark Delivery processors on master/monitor/audition as immune to solo effects, rather than having to reset them every time something else is soloed git-svn-id: svn://localhost/ardour2/branches/3.0@6936 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/delivery.h | 2 ++ libs/ardour/delivery.cc | 4 +++- libs/ardour/route.cc | 14 ++++++++++++-- libs/ardour/session.cc | 18 ------------------ 4 files changed, 17 insertions(+), 21 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 95ef485527..1efa5436ee 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -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 _mute_master; bool no_panner_reset; boost::shared_ptr _panner; diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index 50ca18cb6d..3607836f3c 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -57,6 +57,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr io, boost::shared_ptr 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; diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index cd48995f6a..091a669dbc 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -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, ProcessorList::ite } + /* all delivery processors on master, monitor and auditioner never ever pay attention to solo + */ + boost::shared_ptr d = boost::dynamic_pointer_cast(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 isend = boost::dynamic_pointer_cast (processor); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 9da481e7ce..90e5809890 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2247,24 +2247,6 @@ Session::route_solo_changed (void* /*src*/, boost::weak_ptr 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 */ -- cgit v1.2.3