remove yesterday's mayhem with MainListen and get afl/pfl sorta-kinda working

git-svn-id: svn://localhost/ardour2/branches/3.0@6742 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-03-08 02:14:23 +00:00
parent 2085cddab3
commit b2bc408cef
6 changed files with 12 additions and 25 deletions

View 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; }

View 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()) {

View 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);

View 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) {

View 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)));
}

View 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;