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:
parent
3bed0850ba
commit
14277ff831
@ -475,6 +475,10 @@ next_meter_point (MeterPoint mp)
|
||||
break;
|
||||
|
||||
case MeterPostFader:
|
||||
return MeterOutput;
|
||||
break;
|
||||
|
||||
case MeterOutput:
|
||||
return MeterCustom;
|
||||
break;
|
||||
|
||||
|
@ -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 ()
|
||||
{
|
||||
}
|
||||
|
||||
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 */
|
||||
void
|
||||
MixerStrip::meter_changed ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &MixerStrip::meter_changed)
|
||||
|
||||
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()));
|
||||
gpm.setup_meters ();
|
||||
// reset peak when meter point changes
|
||||
gpm.reset_peak_display();
|
||||
|
@ -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__ */
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user