summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/gain_meter.cc4
-rw-r--r--gtk2_ardour/mixer_strip.cc46
-rw-r--r--gtk2_ardour/mixer_strip.h2
-rw-r--r--gtk2_ardour/rc_option_editor.cc12
-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
10 files changed, 135 insertions, 49 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 5c64396b1c..8ef83cfad5 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -475,6 +475,10 @@ next_meter_point (MeterPoint mp)
break;
case MeterPostFader:
+ return MeterOutput;
+ break;
+
+ case MeterOutput:
return MeterCustom;
break;
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 8794381229..f754ef2863 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -427,23 +427,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
}
}
- switch (_route->meter_point()) {
- case MeterInput:
- meter_point_label.set_text (_("input"));
- break;
-
- case MeterPreFader:
- meter_point_label.set_text (_("pre"));
- break;
-
- case MeterPostFader:
- meter_point_label.set_text (_("post"));
- break;
-
- case MeterCustom:
- meter_point_label.set_text (_("custom"));
- break;
- }
+ meter_point_label.set_text (meter_point_string (_route->meter_point()));
delete route_ops_menu;
route_ops_menu = 0;
@@ -1588,30 +1572,38 @@ MixerStrip::engine_running ()
{
}
-/** Called when the metering point has changed */
-void
-MixerStrip::meter_changed ()
+string
+MixerStrip::meter_point_string (MeterPoint mp)
{
- ENSURE_GUI_THREAD (*this, &MixerStrip::meter_changed)
-
- switch (_route->meter_point()) {
+ switch (mp) {
case MeterInput:
- meter_point_label.set_text (_("input"));
+ return _("in");
break;
case MeterPreFader:
- meter_point_label.set_text (_("pre"));
+ return _("pre");
break;
case MeterPostFader:
- meter_point_label.set_text (_("post"));
+ return _("post");
+ break;
+
+ case MeterOutput:
+ return _("out");
break;
case MeterCustom:
- meter_point_label.set_text (_("custom"));
+ default:
+ return _("custom");
break;
}
+}
+/** Called when the metering point has changed */
+void
+MixerStrip::meter_changed ()
+{
+ meter_point_label.set_text (meter_point_string (_route->meter_point()));
gpm.setup_meters ();
// reset peak when meter point changes
gpm.reset_peak_display();
diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h
index 58eb2a0e19..6ffb1ad907 100644
--- a/gtk2_ardour/mixer_strip.h
+++ b/gtk2_ardour/mixer_strip.h
@@ -288,6 +288,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);
void port_connected_or_disconnected (ARDOUR::Port *, ARDOUR::Port *);
+
+ static std::string meter_point_string (ARDOUR::MeterPoint);
};
#endif /* __ardour_mixer_strip__ */
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index fdd51a3441..722612d21c 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -1103,6 +1103,18 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("Audio"), pp);
+ ComboOption<AFLPosition>* pa = new ComboOption<AFLPosition> (
+ "afl-position",
+ _("AFL signals come from"),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::get_afl_position),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::set_afl_position)
+ );
+
+ pa->add (AFLFromBeforeProcessors, _("post-fader but before post-fader processors"));
+ pa->add (AFLFromAfterProcessors, _("after post-fader processors"));
+
+ add_option (_("Audio"), pa);
+
add_option (_("Audio"),
new BoolOption (
"tape-machine-mode",
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 */