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
This commit is contained in:
Paul Davis 2011-02-22 17:04:06 +00:00
parent 3bed0850ba
commit 14277ff831
10 changed files with 145 additions and 59 deletions

View file

@ -475,6 +475,10 @@ next_meter_point (MeterPoint mp)
break; break;
case MeterPostFader: case MeterPostFader:
return MeterOutput;
break;
case MeterOutput:
return MeterCustom; return MeterCustom;
break; break;

View file

@ -427,23 +427,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
} }
} }
switch (_route->meter_point()) { meter_point_label.set_text (meter_point_string (_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;
}
delete route_ops_menu; delete route_ops_menu;
route_ops_menu = 0; route_ops_menu = 0;
@ -1588,30 +1572,38 @@ MixerStrip::engine_running ()
{ {
} }
string
MixerStrip::meter_point_string (MeterPoint mp)
{
switch (mp) {
case MeterInput:
return _("in");
break;
case MeterPreFader:
return _("pre");
break;
case MeterPostFader:
return _("post");
break;
case MeterOutput:
return _("out");
break;
case MeterCustom:
default:
return _("custom");
break;
}
}
/** Called when the metering point has changed */ /** Called when the metering point has changed */
void void
MixerStrip::meter_changed () MixerStrip::meter_changed ()
{ {
ENSURE_GUI_THREAD (*this, &MixerStrip::meter_changed) meter_point_label.set_text (meter_point_string (_route->meter_point()));
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;
}
gpm.setup_meters (); gpm.setup_meters ();
// reset peak when meter point changes // reset peak when meter point changes
gpm.reset_peak_display(); gpm.reset_peak_display();

View file

@ -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 update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);
void port_connected_or_disconnected (ARDOUR::Port *, ARDOUR::Port *); void port_connected_or_disconnected (ARDOUR::Port *, ARDOUR::Port *);
static std::string meter_point_string (ARDOUR::MeterPoint);
}; };
#endif /* __ardour_mixer_strip__ */ #endif /* __ardour_mixer_strip__ */

View file

@ -1103,6 +1103,18 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("Audio"), pp); 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"), add_option (_("Audio"),
new BoolOption ( new BoolOption (
"tape-machine-mode", "tape-machine-mode",

View file

@ -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 (MonitorModel, monitoring_model, "monitoring-model", ExternalMonitoring)
CONFIG_VARIABLE (ListenPosition, listen_position, "listen-position", AfterFaderListen) CONFIG_VARIABLE (ListenPosition, listen_position, "listen-position", AfterFaderListen)
CONFIG_VARIABLE (PFLPosition, pfl_position, "pfl-position", PFLFromAfterProcessors) 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, use_monitor_bus, "use-monitor-bus", false)
CONFIG_VARIABLE (bool, solo_control_is_listen_control, "solo-control-is-listen-control", false) CONFIG_VARIABLE (bool, solo_control_is_listen_control, "solo-control-is-listen-control", false)

View file

@ -172,6 +172,7 @@ namespace ARDOUR {
MeterInput, MeterInput,
MeterPreFader, MeterPreFader,
MeterPostFader, MeterPostFader,
MeterOutput,
MeterCustom MeterCustom
}; };
@ -353,6 +354,13 @@ namespace ARDOUR {
PFLFromAfterProcessors 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 { enum DenormalModel {
DenormalNone, DenormalNone,
DenormalFTZ, 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::EditMode& sf);
std::istream& operator>>(std::istream& o, ARDOUR::MonitorModel& 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::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::RemoteModel& sf);
std::istream& operator>>(std::istream& o, ARDOUR::ListenPosition& sf); std::istream& operator>>(std::istream& o, ARDOUR::ListenPosition& sf);
std::istream& operator>>(std::istream& o, ARDOUR::LayerModel& 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::EditMode& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::MonitorModel& 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::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::RemoteModel& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::ListenPosition& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::ListenPosition& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::LayerModel& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::LayerModel& sf);

View file

@ -66,6 +66,7 @@ setup_enum_writer ()
Placement _Placement; Placement _Placement;
MonitorModel _MonitorModel; MonitorModel _MonitorModel;
PFLPosition _PFLPosition; PFLPosition _PFLPosition;
AFLPosition _AFLPosition;
RemoteModel _RemoteModel; RemoteModel _RemoteModel;
DenormalModel _DenormalModel; DenormalModel _DenormalModel;
CrossfadeModel _CrossfadeModel; CrossfadeModel _CrossfadeModel;
@ -164,6 +165,7 @@ setup_enum_writer ()
REGISTER_ENUM (MeterInput); REGISTER_ENUM (MeterInput);
REGISTER_ENUM (MeterPreFader); REGISTER_ENUM (MeterPreFader);
REGISTER_ENUM (MeterPostFader); REGISTER_ENUM (MeterPostFader);
REGISTER_ENUM (MeterOutput);
REGISTER_ENUM (MeterCustom); REGISTER_ENUM (MeterCustom);
REGISTER (_MeterPoint); REGISTER (_MeterPoint);
@ -224,6 +226,10 @@ setup_enum_writer ()
REGISTER_ENUM (PFLFromAfterProcessors); REGISTER_ENUM (PFLFromAfterProcessors);
REGISTER (_PFLPosition); REGISTER (_PFLPosition);
REGISTER_ENUM (AFLFromBeforeProcessors);
REGISTER_ENUM (AFLFromAfterProcessors);
REGISTER (_AFLPosition);
REGISTER_ENUM (DenormalNone); REGISTER_ENUM (DenormalNone);
REGISTER_ENUM (DenormalFTZ); REGISTER_ENUM (DenormalFTZ);
REGISTER_ENUM (DenormalDAZ); REGISTER_ENUM (DenormalDAZ);
@ -637,6 +643,20 @@ std::ostream& operator<<(std::ostream& o, const PFLPosition& var)
return o << s; 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::istream& operator>>(std::istream& o, RemoteModel& var)
{ {
std::string s; std::string s;

View file

@ -45,6 +45,8 @@ PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_fr
return; 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_audio = min (current_meters.n_audio(), bufs.count().n_audio());
const uint32_t n_midi = min (current_meters.n_midi(), bufs.count().n_midi()); const uint32_t n_midi = min (current_meters.n_midi(), bufs.count().n_midi());

View file

@ -85,6 +85,12 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
the config hasn't changed, we're done. 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) { if (_panner && _panner->in().n_audio() == nins && _panner->out().n_audio() == nouts) {
return; return;
} }
@ -115,6 +121,7 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
speakers.reset (s); speakers.reset (s);
} }
cerr << "Creating a new panner\n";
Panner* p = pi->descriptor.factory (_pannable, speakers); Panner* p = pi->descriptor.factory (_pannable, speakers);
boost_debug_shared_ptr_mark_interesting (p, "Panner"); boost_debug_shared_ptr_mark_interesting (p, "Panner");
_panner.reset (p); _panner.reset (p);

View file

@ -3639,6 +3639,11 @@ Route::setup_invisible_processors ()
assert (!lm.locked ()); assert (!lm.locked ());
#endif #endif
if (!_main_outs) {
/* too early to be doing this stuff */
return;
}
/* we'll build this new list here and then use it */ /* we'll build this new list here and then use it */
ProcessorList new_processors; ProcessorList new_processors;
@ -3678,8 +3683,10 @@ Route::setup_invisible_processors ()
new_processors.insert (amp, _meter); new_processors.insert (amp, _meter);
break; break;
case MeterPostFader: case MeterPostFader:
assert (!_meter->display_to_user ()); /* do nothing here */
new_processors.insert (after_amp, _meter); break;
case MeterOutput:
/* do nothing here */
break; break;
case MeterCustom: case MeterCustom:
/* the meter is visible, so we don't touch it here */ /* the meter is visible, so we don't touch it here */
@ -3687,33 +3694,62 @@ Route::setup_invisible_processors ()
} }
} }
/* MAIN OUTS */ /* MAIN OUTS */
if (_main_outs) { assert (_main_outs);
assert (!_main_outs->display_to_user ()); assert (!_main_outs->display_to_user ());
new_processors.push_back (_main_outs); 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 */ /* MONITOR SEND */
if (_monitor_send && !is_monitor ()) { if (_monitor_send && !is_monitor ()) {
assert (!_monitor_send->display_to_user ()); assert (!_monitor_send->display_to_user ());
switch (Config->get_listen_position ()) { if (Config->get_solo_control_is_listen_control()) {
case PreFaderListen: switch (Config->get_listen_position ()) {
switch (Config->get_pfl_position ()) { case PreFaderListen:
case PFLFromBeforeProcessors: switch (Config->get_pfl_position ()) {
new_processors.push_front (_monitor_send); case PFLFromBeforeProcessors:
break; new_processors.push_front (_monitor_send);
case PFLFromAfterProcessors: break;
new_processors.insert (amp, _monitor_send); case PFLFromAfterProcessors:
break; new_processors.insert (amp, _monitor_send);
} break;
break; }
case AfterFaderListen: break;
new_processors.insert (after_amp, _monitor_send); case AfterFaderListen:
break; 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 */ /* MONITOR CONTROL */