summaryrefslogtreecommitdiff
path: root/libs/ardour/delivery.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-03-06 19:47:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-03-06 19:47:34 +0000
commit2085cddab3b1c8155b63c3c48304fffaa72c4e6c (patch)
tree11256bbf645cf6f9034813e660b5e747bc75e89e /libs/ardour/delivery.cc
parentb6b68881b2c59c216d2195b1cea5e667187d83ed (diff)
the last (?) piece of the internal send/listen/monitor/control outs track/bus architecture puzzle: a send from the post-fader master bus to the control/listen/monitor bus inputs that is silent when something is soloed, but the rest of the time delivers the main mix to the control/listen/monitor bus. Tweaks to follow, surely ...
git-svn-id: svn://localhost/ardour2/branches/3.0@6740 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/delivery.cc')
-rw-r--r--libs/ardour/delivery.cc80
1 files changed, 51 insertions, 29 deletions
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 5777269416..5d786597a9 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -163,6 +163,7 @@ Delivery::display_name () const
return _("main outs");
break;
case Listen:
+ case MainListen:
return _("listen");
break;
case Send:
@@ -369,6 +370,8 @@ Delivery::state (bool full_state)
node.add_property("type", "main-outs");
} else if (_role & Listen) {
node.add_property("type", "listen");
+ } else if (_role & MainListen) {
+ node.add_property("type", "main-listen");
} else {
node.add_property("type", "delivery");
}
@@ -538,39 +541,58 @@ Delivery::target_gain ()
return 0.0;
}
- gain_t desired_gain;
+ gain_t desired_gain = -1.0f;
+ if (_role == MainListen) {
+
+ /* silent if anyone else soloing; unity gain otherwise */
+
+ desired_gain = (_session.soloing() ? 0.0 : 1.0);
- if (_solo_level) {
- desired_gain = 1.0;
- } else {
+ } else if (_solo_level) {
- MuteMaster::MutePoint mp;
-
- switch (_role) {
- case Main:
- mp = MuteMaster::Main;
- break;
- case Listen:
- mp = MuteMaster::Listen;
- break;
- case Send:
- case Insert:
- case Aux:
- /* XXX FIX ME this is wrong, we need per-delivery muting */
- mp = MuteMaster::PreFader;
- break;
- }
-
- if (!_solo_isolated && _session.soloing()) {
- desired_gain = min (Config->get_solo_mute_gain(), _mute_master->mute_gain_at (mp));
-
- } else {
-
- desired_gain = _mute_master->mute_gain_at (mp);
- }
+ desired_gain = 1.0;
- }
+ } else {
+
+ if (_role == Listen && _session.control_out() && !_session.soloing()) {
+
+ /* nobody is soloed, so control/monitor/listen bus gets its
+ signal from master out, we should be silent
+ */
+ desired_gain = 0.0;
+
+ } else {
+
+ MuteMaster::MutePoint mp;
+
+ switch (_role) {
+ case Main:
+ mp = MuteMaster::Main;
+ break;
+ case Listen:
+ mp = MuteMaster::Listen;
+ break;
+ case Send:
+ case Insert:
+ case Aux:
+ /* XXX FIX ME this is wrong, we need per-delivery muting */
+ mp = MuteMaster::PreFader;
+ break;
+ case MainListen:
+ /* we can't get here, see if() above */
+ break;
+ }
+
+ if (!_solo_isolated && _session.soloing()) {
+ desired_gain = min (Config->get_solo_mute_gain(), _mute_master->mute_gain_at (mp));
+
+ } else {
+
+ desired_gain = _mute_master->mute_gain_at (mp);
+ }
+ }
+ }
return desired_gain;
}