summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-02-22 17:04:06 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-02-22 17:04:06 +0000
commit14277ff831c90dbdd1131a44eac86da919bb0544 (patch)
tree2c33ee003e20649dccda5cdf242933962fa9feec /libs
parent3bed0850babcdb68ecc61b5957349ba353605270 (diff)
Add AFLFrom... enums as counterpart to PFLFrom ; add Output metering as a new fixed meter point; clean up logic in Route::setup_invisible_processors() to correctly place meters and monitor sends in various modes
git-svn-id: svn://localhost/ardour2/branches/3.0@8923 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h1
-rw-r--r--libs/ardour/ardour/types.h10
-rw-r--r--libs/ardour/enums.cc20
-rw-r--r--libs/ardour/meter.cc2
-rw-r--r--libs/ardour/panner_shell.cc7
-rw-r--r--libs/ardour/route.cc80
6 files changed, 98 insertions, 22 deletions
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index e1030bafa0..fd087c0c1d 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -85,6 +85,7 @@ CONFIG_VARIABLE (bool, mute_affects_main_outs, "mute-affects-main-outs", true)
CONFIG_VARIABLE (MonitorModel, monitoring_model, "monitoring-model", ExternalMonitoring)
CONFIG_VARIABLE (ListenPosition, listen_position, "listen-position", AfterFaderListen)
CONFIG_VARIABLE (PFLPosition, pfl_position, "pfl-position", PFLFromAfterProcessors)
+CONFIG_VARIABLE (AFLPosition, afl_position, "afl-position", AFLFromAfterProcessors)
CONFIG_VARIABLE (bool, use_monitor_bus, "use-monitor-bus", false)
CONFIG_VARIABLE (bool, solo_control_is_listen_control, "solo-control-is-listen-control", false)
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index b03ba6b232..fd3f6d9557 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -172,6 +172,7 @@ namespace ARDOUR {
MeterInput,
MeterPreFader,
MeterPostFader,
+ MeterOutput,
MeterCustom
};
@@ -353,6 +354,13 @@ namespace ARDOUR {
PFLFromAfterProcessors
};
+ enum AFLPosition {
+ /** AFL signals come post-fader and before post-fader processors */
+ AFLFromBeforeProcessors,
+ /** AFL signals come post-fader but after post-fader processors */
+ AFLFromAfterProcessors
+ };
+
enum DenormalModel {
DenormalNone,
DenormalFTZ,
@@ -565,6 +573,7 @@ std::istream& operator>>(std::istream& o, ARDOUR::AutoConnectOption& sf);
std::istream& operator>>(std::istream& o, ARDOUR::EditMode& sf);
std::istream& operator>>(std::istream& o, ARDOUR::MonitorModel& sf);
std::istream& operator>>(std::istream& o, ARDOUR::PFLPosition& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::AFLPosition& sf);
std::istream& operator>>(std::istream& o, ARDOUR::RemoteModel& sf);
std::istream& operator>>(std::istream& o, ARDOUR::ListenPosition& sf);
std::istream& operator>>(std::istream& o, ARDOUR::LayerModel& sf);
@@ -585,6 +594,7 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::AutoConnectOption& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::EditMode& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::MonitorModel& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::PFLPosition& sf);
+std::ostream& operator<<(std::ostream& o, const ARDOUR::AFLPosition& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::RemoteModel& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::ListenPosition& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::LayerModel& sf);
diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc
index 5219b51458..a524db3d23 100644
--- a/libs/ardour/enums.cc
+++ b/libs/ardour/enums.cc
@@ -66,6 +66,7 @@ setup_enum_writer ()
Placement _Placement;
MonitorModel _MonitorModel;
PFLPosition _PFLPosition;
+ AFLPosition _AFLPosition;
RemoteModel _RemoteModel;
DenormalModel _DenormalModel;
CrossfadeModel _CrossfadeModel;
@@ -164,6 +165,7 @@ setup_enum_writer ()
REGISTER_ENUM (MeterInput);
REGISTER_ENUM (MeterPreFader);
REGISTER_ENUM (MeterPostFader);
+ REGISTER_ENUM (MeterOutput);
REGISTER_ENUM (MeterCustom);
REGISTER (_MeterPoint);
@@ -224,6 +226,10 @@ setup_enum_writer ()
REGISTER_ENUM (PFLFromAfterProcessors);
REGISTER (_PFLPosition);
+ REGISTER_ENUM (AFLFromBeforeProcessors);
+ REGISTER_ENUM (AFLFromAfterProcessors);
+ REGISTER (_AFLPosition);
+
REGISTER_ENUM (DenormalNone);
REGISTER_ENUM (DenormalFTZ);
REGISTER_ENUM (DenormalDAZ);
@@ -637,6 +643,20 @@ std::ostream& operator<<(std::ostream& o, const PFLPosition& var)
return o << s;
}
+std::istream& operator>>(std::istream& o, AFLPosition& var)
+{
+ std::string s;
+ o >> s;
+ var = (AFLPosition) string_2_enum (s, var);
+ return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const AFLPosition& var)
+{
+ std::string s = enum_2_string (var);
+ return o << s;
+}
+
std::istream& operator>>(std::istream& o, RemoteModel& var)
{
std::string s;
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc
index 1ea3a090dd..8da2bfa026 100644
--- a/libs/ardour/meter.cc
+++ b/libs/ardour/meter.cc
@@ -45,6 +45,8 @@ PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_fr
return;
}
+ // cerr << "meter " << name() << " runs with " << bufs.available() << " inputs\n";
+
const uint32_t n_audio = min (current_meters.n_audio(), bufs.count().n_audio());
const uint32_t n_midi = min (current_meters.n_midi(), bufs.count().n_midi());
diff --git a/libs/ardour/panner_shell.cc b/libs/ardour/panner_shell.cc
index d67925ed5c..88b0fd8cb6 100644
--- a/libs/ardour/panner_shell.cc
+++ b/libs/ardour/panner_shell.cc
@@ -85,6 +85,12 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
the config hasn't changed, we're done.
*/
+ cerr << "PShell: reconfigure for in = " << in << " out = " << out;
+ if (_panner) {
+ cerr << " current panner = " << _panner->in() << " and " << _panner->out();
+ }
+ cerr << endl;
+
if (_panner && _panner->in().n_audio() == nins && _panner->out().n_audio() == nouts) {
return;
}
@@ -115,6 +121,7 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
speakers.reset (s);
}
+ cerr << "Creating a new panner\n";
Panner* p = pi->descriptor.factory (_pannable, speakers);
boost_debug_shared_ptr_mark_interesting (p, "Panner");
_panner.reset (p);
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index c73ea0e66d..30df60ed7b 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3639,6 +3639,11 @@ Route::setup_invisible_processors ()
assert (!lm.locked ());
#endif
+ if (!_main_outs) {
+ /* too early to be doing this stuff */
+ return;
+ }
+
/* we'll build this new list here and then use it */
ProcessorList new_processors;
@@ -3678,8 +3683,10 @@ Route::setup_invisible_processors ()
new_processors.insert (amp, _meter);
break;
case MeterPostFader:
- assert (!_meter->display_to_user ());
- new_processors.insert (after_amp, _meter);
+ /* do nothing here */
+ break;
+ case MeterOutput:
+ /* do nothing here */
break;
case MeterCustom:
/* the meter is visible, so we don't touch it here */
@@ -3687,33 +3694,62 @@ Route::setup_invisible_processors ()
}
}
-
/* MAIN OUTS */
- if (_main_outs) {
- assert (!_main_outs->display_to_user ());
- new_processors.push_back (_main_outs);
- }
+ assert (_main_outs);
+ assert (!_main_outs->display_to_user ());
+ new_processors.push_back (_main_outs);
+
+ /* iterator for the main outs */
+
+ ProcessorList::iterator main = new_processors.end();
+ --main;
+
+ /* OUTPUT METERING */
+
+ if (_meter && (_meter_point == MeterOutput || _meter_point == MeterPostFader)) {
+ assert (!_meter->display_to_user ());
+
+ /* add the processor just before or just after the main outs */
+
+ ProcessorList::iterator meter_point = main;
+
+ if (_meter_point == MeterOutput) {
+ ++meter_point;
+ }
+ new_processors.insert (meter_point, _meter);
+ }
/* MONITOR SEND */
if (_monitor_send && !is_monitor ()) {
assert (!_monitor_send->display_to_user ());
- switch (Config->get_listen_position ()) {
- case PreFaderListen:
- switch (Config->get_pfl_position ()) {
- case PFLFromBeforeProcessors:
- new_processors.push_front (_monitor_send);
- break;
- case PFLFromAfterProcessors:
- new_processors.insert (amp, _monitor_send);
- break;
- }
- break;
- case AfterFaderListen:
- new_processors.insert (after_amp, _monitor_send);
- break;
- }
+ if (Config->get_solo_control_is_listen_control()) {
+ switch (Config->get_listen_position ()) {
+ case PreFaderListen:
+ switch (Config->get_pfl_position ()) {
+ case PFLFromBeforeProcessors:
+ new_processors.push_front (_monitor_send);
+ break;
+ case PFLFromAfterProcessors:
+ new_processors.insert (amp, _monitor_send);
+ break;
+ }
+ break;
+ case AfterFaderListen:
+ switch (Config->get_afl_position ()) {
+ case AFLFromBeforeProcessors:
+ new_processors.insert (after_amp, _monitor_send);
+ break;
+ case AFLFromAfterProcessors:
+ new_processors.insert (new_processors.end(), _monitor_send);
+ break;
+ }
+ break;
+ }
+ } else {
+ new_processors.insert (new_processors.end(), _monitor_send);
+ }
}
/* MONITOR CONTROL */