remove yesterday's mayhem with MainListen and get afl/pfl sorta-kinda working
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 8 Mar 2010 02:14:23 +0000 (02:14 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 8 Mar 2010 02:14:23 +0000 (02:14 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@6742 d708f5d6-7413-0410-9779-e7cbd77b26cf

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

index 9bcf050eb47b40b93bb0c2a5476cccabefdf5346..b2bd283ef8cb132e17136af0fd8c53220c313271 100644 (file)
@@ -45,9 +45,7 @@ public:
                /* listen - internal send used only to deliver to control/monitor bus */
                Listen = 0x8,
                /* aux - internal send used to deliver to any bus, by user request */
-               Aux    = 0x10,
-                /* main listen - internal send used only to deliver from master to control/monitor bus */
-                MainListen = 0x20
+               Aux    = 0x10
        };
 
        static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert; }
index 5d786597a96d507b99c2bcf7938def8974ad0643..238b7c3fa914317555c14915d8e4dda4ec3bc8e9 100644 (file)
@@ -163,7 +163,6 @@ Delivery::display_name () const
                return _("main outs");
                break;
        case Listen:
-        case MainListen:
                return _("listen");
                break;
        case Send:
@@ -370,8 +369,6 @@ 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");
        }
@@ -543,13 +540,7 @@ Delivery::target_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);
-
-        } else if (_solo_level) {
+        if (_solo_level) {
 
                desired_gain = 1.0;
 
@@ -579,9 +570,6 @@ Delivery::target_gain ()
                                 /* 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()) {
index 8a2ccfe79c63835a570149db3444b7b4681dee8e..baf8f7326d914456ddfdf0282b2282403cea7fd6 100644 (file)
@@ -514,7 +514,6 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (Delivery, Listen);
        REGISTER_CLASS_ENUM (Delivery, Main);
        REGISTER_CLASS_ENUM (Delivery, Aux);
-       REGISTER_CLASS_ENUM (Delivery, MainListen);
        REGISTER_BITS (_Delivery_Role);
 
        REGISTER_CLASS_ENUM (MuteMaster, PreFader);
index 59446779343b221bd1689873fb7d2f2bfb4981ef..9cfc8d9702e2097d9d169ccc375511fd486ba691 100644 (file)
@@ -17,8 +17,6 @@
 
 */
 
-#include <iostream>
-
 #include "pbd/error.h"
 #include "pbd/failed_constructor.h"
 
@@ -32,6 +30,7 @@
 
 using namespace PBD;
 using namespace ARDOUR;
+using namespace std;
 
 InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role)
        : Send (s, mm, role)
@@ -96,7 +95,7 @@ InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
 
                Amp::apply_gain (mixbufs, nframes, _current_gain, tgain);
                _current_gain = tgain;
-
+                
        } else if (tgain == 0.0) {
 
                /* we were quiet last time, and we're still supposed to be quiet.
@@ -242,13 +241,13 @@ InternalSend::configure_io (ChanCount in, ChanCount out)
 }
 
 bool
-InternalSend::set_name (const std::string& str)
+InternalSend::set_name (const string& str)
 {
        /* rules for external sends don't apply to us */
        return IOProcessor::set_name (str);
 }
 
-std::string
+string
 InternalSend::display_name () const
 {
        if (_role == Aux) {
index 4a80197dc669ba808579b2e4d0d51ecc241a6e91..ccf95c5bf9b266d38d2b51f0f0057e79bae61669 100644 (file)
@@ -520,8 +520,10 @@ Route::set_listen (bool yn, void* src)
        if (_control_outs) {
                if (yn != _control_outs->active()) {
                        if (yn) {
+                                _control_outs->set_solo_level (1);
                                _control_outs->activate ();
                        } else {
+                                _control_outs->set_solo_level (0);
                                _control_outs->deactivate ();
                        }
 
@@ -2363,9 +2365,10 @@ Route::listen_via (boost::shared_ptr<Route> route, Placement placement, bool /*a
        try {
 
                 if (is_master()) {
-
+                        
                         if (route == _session.control_out()) {
-                                listener.reset (new InternalSend (_session, _mute_master, route, (aux ? Delivery::Aux : Delivery::MainListen)));
+                                /* master never sends to control outs */
+                                return 0;
                         } else {
                                 listener.reset (new InternalSend (_session, _mute_master, route, (aux ? Delivery::Aux : Delivery::Listen)));
                         }
index 9b65fcf2081187276e3e6de2fd777d44c414a1e2..e077e8b570a500a6dabee62aa9ad80af8b36ae3b 100644 (file)
@@ -720,7 +720,7 @@ Session::when_engine_running ()
                                        for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
                                                uint32_t shift = _master_out->n_outputs().get(*t);
                                                uint32_t mod = _engine.n_physical_outputs (*t);
-                                               limit = _control_out->n_outputs().get(*t);
+                                               uint32_t limit = _control_out->n_outputs().get(*t);
 
                                                cerr << "Connecting " << limit << " control out ports, shift is " << shift
                                                        << " mod is " << mod << endl;