Make foldback bus match foldback sends namewise

to avoid confusion with listener sends or monitor bus
This commit is contained in:
Len Ovens 2018-11-12 22:29:27 -08:00
parent f27ca29d6c
commit 9b2612f686
11 changed files with 51 additions and 51 deletions

View File

@ -172,14 +172,14 @@ You may select:\n \
") ")
)); ));
builtin_types.push_back ( builtin_types.push_back (
std::pair<string,string>(_("Listen Busses"), _(" \ std::pair<string,string>(_("Foldback Busses"), _(" \
Use the settings, below, to create new Listen Busses.\n \ Use the settings, below, to create new Foldback Busses.\n \
Listen Busses are used as master outputs for monitor channels which are fed by\n \ Foldback Busses are used as master outputs for monitor channels which are fed by\n \
hidden monitor sends.\n \ hidden monitor sends.\n \
\n\n \ \n\n \
You may select:\n \ You may select:\n \
* The number of Listen Busses to add.\n \ * The number of Foldback Busses to add.\n \
* A name for the new Listen Busses.\n \ * A name for the new Foldback Busses.\n \
") ")
)); ));
} }
@ -580,8 +580,8 @@ AddRouteDialog::type_wanted()
return AudioTrack; return AudioTrack;
} else if (str == _("VCA Masters")) { } else if (str == _("VCA Masters")) {
return VCAMaster; return VCAMaster;
} else if (str == _("Listen Busses")) { } else if (str == _("Foldback Busses")) {
return ListenBus; return FoldbackBus;
} else { } else {
assert (0); assert (0);
return AudioTrack; return AudioTrack;
@ -609,8 +609,8 @@ AddRouteDialog::maybe_update_name_template_entry ()
case MidiBus: case MidiBus:
name_template_entry.set_text (_("Bus")); name_template_entry.set_text (_("Bus"));
break; break;
case ListenBus: case FoldbackBus:
name_template_entry.set_text (_("Listener")); name_template_entry.set_text (_("Foldback"));
break; break;
case VCAMaster: case VCAMaster:
name_template_entry.set_text (VCA::default_name_template()); name_template_entry.set_text (VCA::default_name_template());
@ -757,7 +757,7 @@ AddRouteDialog::track_type_chosen ()
insert_at_combo.set_sensitive (true); insert_at_combo.set_sensitive (true);
break; break;
case ListenBus: case FoldbackBus:
configuration_label.set_sensitive (false); configuration_label.set_sensitive (false);
channel_combo.set_sensitive (false); channel_combo.set_sensitive (false);
@ -878,7 +878,7 @@ AddRouteDialog::channels ()
ret.set (DataType::MIDI, 1); ret.set (DataType::MIDI, 1);
break; break;
case ListenBus: case FoldbackBus:
ret.set (DataType::AUDIO, 2); ret.set (DataType::AUDIO, 2);
ret.set (DataType::MIDI, 0); ret.set (DataType::MIDI, 0);
break; break;

View File

@ -67,7 +67,7 @@ public:
AudioBus, AudioBus,
MidiBus, MidiBus,
VCAMaster, VCAMaster,
ListenBus, FoldbackBus,
}; };
TypeWanted type_wanted(); TypeWanted type_wanted();

View File

@ -2123,17 +2123,17 @@ ARDOUR_UI::session_add_audio_route (
} }
void void
ARDOUR_UI::session_add_listen_bus (uint32_t how_many, string const & name_template) ARDOUR_UI::session_add_foldback_bus (uint32_t how_many, string const & name_template)
{ {
RouteList routes; RouteList routes;
assert (_session); assert (_session);
try { try {
routes = _session->new_audio_route (2, 2, 0, how_many, name_template, PresentationInfo::ListenBus, -1); routes = _session->new_audio_route (2, 2, 0, how_many, name_template, PresentationInfo::FoldbackBus, -1);
if (routes.size() != how_many) { if (routes.size() != how_many) {
error << string_compose (P_("could not create %1 new listen bus", "could not create %1 new listen busses", how_many), how_many) error << string_compose (P_("could not create %1 new foldback bus", "could not create %1 new foldback busses", how_many), how_many)
<< endmsg; << endmsg;
} }
} }
@ -4427,8 +4427,8 @@ ARDOUR_UI::add_route_dialog_response (int r)
case AddRouteDialog::VCAMaster: case AddRouteDialog::VCAMaster:
_session->vca_manager().create_vca (count, name_template); _session->vca_manager().create_vca (count, name_template);
break; break;
case AddRouteDialog::ListenBus: case AddRouteDialog::FoldbackBus:
session_add_listen_bus (count, name_template); session_add_foldback_bus (count, name_template);
break; break;
} }
} }

View File

@ -316,7 +316,7 @@ public:
ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*, ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*,
ARDOUR::PresentationInfo::order_t order); ARDOUR::PresentationInfo::order_t order);
void session_add_listen_bus (uint32_t, std::string const &); void session_add_foldback_bus (uint32_t, std::string const &);
void display_insufficient_ports_message (); void display_insufficient_ports_message ();

View File

@ -2034,7 +2034,7 @@ ProcessorBox::build_possible_aux_menu ()
return 0; return 0;
} }
if (_route->is_monitor () || _route->is_listenbus ()) { if (_route->is_monitor () || _route->is_foldbackbus ()) {
return 0; return 0;
} }
@ -2047,7 +2047,7 @@ ProcessorBox::build_possible_aux_menu ()
/* don't allow sending to master or monitor or to self */ /* don't allow sending to master or monitor or to self */
continue; continue;
} }
if ((*r)->is_listenbus ()) { if ((*r)->is_foldbackbus ()) {
continue; continue;
} }
if (_route->internal_send_for (*r)) { if (_route->internal_send_for (*r)) {
@ -2070,7 +2070,7 @@ ProcessorBox::build_possible_listener_menu ()
return 0; return 0;
} }
if (_route->is_monitor () || _route->is_listenbus ()) { if (_route->is_monitor () || _route->is_foldbackbus ()) {
return 0; return 0;
} }
@ -2083,7 +2083,7 @@ ProcessorBox::build_possible_listener_menu ()
/* don't allow sending to master or monitor or to self */ /* don't allow sending to master or monitor or to self */
continue; continue;
} }
if (!(*r)->is_listenbus ()) { if (!(*r)->is_foldbackbus ()) {
continue; continue;
} }
if (_route->internal_send_for (*r)) { if (_route->internal_send_for (*r)) {
@ -2106,7 +2106,7 @@ ProcessorBox::build_possible_remove_listener_menu ()
return 0; return 0;
} }
if (_route->is_monitor () || _route->is_listenbus ()) { if (_route->is_monitor () || _route->is_foldbackbus ()) {
return 0; return 0;
} }
@ -2119,7 +2119,7 @@ ProcessorBox::build_possible_remove_listener_menu ()
/* don't allow sending to master or monitor or to self */ /* don't allow sending to master or monitor or to self */
continue; continue;
} }
if (!(*r)->is_listenbus ()) { if (!(*r)->is_foldbackbus ()) {
continue; continue;
} }
if (!_route->internal_send_for (*r)) { if (!_route->internal_send_for (*r)) {
@ -2192,8 +2192,8 @@ ProcessorBox::show_processor_menu (int arg)
} }
} }
ActionManager::get_action (X_("ProcessorMenu"), "newinsert")->set_sensitive (!_route->is_monitor () && !_route->is_listenbus ()); ActionManager::get_action (X_("ProcessorMenu"), "newinsert")->set_sensitive (!_route->is_monitor () && !_route->is_foldbackbus ());
ActionManager::get_action (X_("ProcessorMenu"), "newsend")->set_sensitive (!_route->is_monitor () && !_route->is_listenbus ()); ActionManager::get_action (X_("ProcessorMenu"), "newsend")->set_sensitive (!_route->is_monitor () && !_route->is_foldbackbus ());
ProcessorEntry* single_selection = 0; ProcessorEntry* single_selection = 0;
if (processor_display.selection().size() == 1) { if (processor_display.selection().size() == 1) {
@ -2718,7 +2718,7 @@ ProcessorBox::choose_aux (boost::weak_ptr<Route> wr)
return; return;
} }
if (target->is_listenbus ()) { if (target->is_foldbackbus ()) {
_route->add_foldback_send (target); _route->add_foldback_send (target);
} else { } else {
_session->add_internal_send (target, _placement, _route); _session->add_internal_send (target, _placement, _route);

View File

@ -118,18 +118,18 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
/* single bit indicates that the group order is set */ /* single bit indicates that the group order is set */
OrderSet = 0x400, OrderSet = 0x400,
/* bus type for monitor mixes */ /* bus type for monitor mixes */
ListenBus = 0x2000, FoldbackBus = 0x2000,
/* special mask to delect out "state" bits */ /* special mask to delect out "state" bits */
StatusMask = (Hidden), StatusMask = (Hidden),
/* special mask to delect select type bits */ /* special mask to delect select type bits */
TypeMask = (AudioBus|AudioTrack|MidiTrack|MidiBus|VCA|MasterOut|MonitorOut|Auditioner|ListenBus) TypeMask = (AudioBus|AudioTrack|MidiTrack|MidiBus|VCA|MasterOut|MonitorOut|Auditioner|FoldbackBus)
}; };
static const Flag AllStripables; /* mask to use for any route or VCA (but not auditioner) */ static const Flag AllStripables; /* mask to use for any route or VCA (but not auditioner) */
static const Flag MixerStripables; /* mask to use for any route or VCA (but not auditioner or Listenbus) */ static const Flag MixerStripables; /* mask to use for any route or VCA (but not auditioner or foldbackbus) */
static const Flag AllRoutes; /* mask to use for any route include master+monitor, but not auditioner */ static const Flag AllRoutes; /* mask to use for any route include master+monitor, but not auditioner */
static const Flag MixerRoutes; /* mask to use for any route include master+monitor, but not auditioner or ListenBus*/ static const Flag MixerRoutes; /* mask to use for any route include master+monitor, but not auditioner or foldbackbus*/
static const Flag Route; /* mask for any route (bus or track */ static const Flag Route; /* mask for any route (bus or track */
static const Flag Track; /* mask to use for any track */ static const Flag Track; /* mask to use for any track */
static const Flag Bus; /* mask to use for any bus */ static const Flag Bus; /* mask to use for any bus */

View File

@ -74,7 +74,7 @@ class LIBARDOUR_API Stripable : public SessionObject,
bool is_private_route() const { return is_auditioner(); } bool is_private_route() const { return is_auditioner(); }
bool is_master() const { return _presentation_info.flags() & PresentationInfo::MasterOut; } bool is_master() const { return _presentation_info.flags() & PresentationInfo::MasterOut; }
bool is_monitor() const { return _presentation_info.flags() & PresentationInfo::MonitorOut; } bool is_monitor() const { return _presentation_info.flags() & PresentationInfo::MonitorOut; }
bool is_listenbus() const { return _presentation_info.flags() & PresentationInfo::ListenBus; } bool is_foldbackbus() const { return _presentation_info.flags() & PresentationInfo::FoldbackBus; }
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);

View File

@ -735,7 +735,7 @@ setup_enum_writer ()
REGISTER_CLASS_ENUM (PresentationInfo, Auditioner); REGISTER_CLASS_ENUM (PresentationInfo, Auditioner);
REGISTER_CLASS_ENUM (PresentationInfo, Hidden); REGISTER_CLASS_ENUM (PresentationInfo, Hidden);
REGISTER_CLASS_ENUM (PresentationInfo, OrderSet); REGISTER_CLASS_ENUM (PresentationInfo, OrderSet);
REGISTER_CLASS_ENUM (PresentationInfo, ListenBus); REGISTER_CLASS_ENUM (PresentationInfo, FoldbackBus);
REGISTER_BITS (_PresentationInfo_Flag); REGISTER_BITS (_PresentationInfo_Flag);
REGISTER_CLASS_ENUM (MusicalMode,Dorian); REGISTER_CLASS_ENUM (MusicalMode,Dorian);

View File

@ -115,7 +115,7 @@ const PresentationInfo::order_t PresentationInfo::max_order = UINT32_MAX;
const PresentationInfo::Flag PresentationInfo::Bus = PresentationInfo::Flag (PresentationInfo::AudioBus|PresentationInfo::MidiBus); const PresentationInfo::Flag PresentationInfo::Bus = PresentationInfo::Flag (PresentationInfo::AudioBus|PresentationInfo::MidiBus);
const PresentationInfo::Flag PresentationInfo::Track = PresentationInfo::Flag (PresentationInfo::AudioTrack|PresentationInfo::MidiTrack); const PresentationInfo::Flag PresentationInfo::Track = PresentationInfo::Flag (PresentationInfo::AudioTrack|PresentationInfo::MidiTrack);
const PresentationInfo::Flag PresentationInfo::Route = PresentationInfo::Flag (PresentationInfo::Bus|PresentationInfo::Track); const PresentationInfo::Flag PresentationInfo::Route = PresentationInfo::Flag (PresentationInfo::Bus|PresentationInfo::Track);
const PresentationInfo::Flag PresentationInfo::AllRoutes = PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::MasterOut|PresentationInfo::MonitorOut|PresentationInfo::ListenBus); const PresentationInfo::Flag PresentationInfo::AllRoutes = PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::MasterOut|PresentationInfo::MonitorOut|PresentationInfo::FoldbackBus);
const PresentationInfo::Flag PresentationInfo::MixerRoutes = PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::MasterOut|PresentationInfo::MonitorOut); const PresentationInfo::Flag PresentationInfo::MixerRoutes = PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::MasterOut|PresentationInfo::MonitorOut);
const PresentationInfo::Flag PresentationInfo::AllStripables = PresentationInfo::Flag (PresentationInfo::AllRoutes|PresentationInfo::VCA); const PresentationInfo::Flag PresentationInfo::AllStripables = PresentationInfo::Flag (PresentationInfo::AllRoutes|PresentationInfo::VCA);
const PresentationInfo::Flag PresentationInfo::MixerStripables = PresentationInfo::Flag (PresentationInfo::MixerRoutes|PresentationInfo::VCA); const PresentationInfo::Flag PresentationInfo::MixerStripables = PresentationInfo::Flag (PresentationInfo::MixerRoutes|PresentationInfo::VCA);

View File

@ -3257,7 +3257,7 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
StateProtector sp (this); StateProtector sp (this);
if (Profile->get_trx()) { if (Profile->get_trx()) {
add_routes (ret, false, false, false, order); add_routes (ret, false, false, false, order);
} else if (flags == PresentationInfo::ListenBus) { } else if (flags == PresentationInfo::FoldbackBus) {
add_routes (ret, false, false, true, order); // no autoconnect add_routes (ret, false, false, true, order); // no autoconnect
} else { } else {
add_routes (ret, false, true, true, order); // autoconnect // outputs only add_routes (ret, false, true, true, order); // autoconnect // outputs only

View File

@ -4275,7 +4275,7 @@ OSC::sel_comment (char *newcomment, lo_message msg) {
} }
int int
OSC::sel_new_personal_send (char *listener, lo_message msg) OSC::sel_new_personal_send (char *foldback, lo_message msg)
{ {
OSCSurface *sur = get_surface(get_address (msg)); OSCSurface *sur = get_surface(get_address (msg));
boost::shared_ptr<Stripable> s; boost::shared_ptr<Stripable> s;
@ -4288,24 +4288,24 @@ OSC::sel_new_personal_send (char *listener, lo_message msg)
return -1; return -1;
} }
} }
/* if a listenbus called listener exists use it /* if a foldbackbus called foldback exists use it
* other wise create create it. Then create a personal send from * other wise create create it. Then create a foldback send from
* this route to that bus. * this route to that bus.
*/ */
string listenbus = listener; string foldbackbus = foldback;
string listen_name = listenbus; string foldback_name = foldbackbus;
if (listenbus.find ("- monitor") == string::npos) { if (foldbackbus.find ("- monitor") == string::npos) {
listen_name = string_compose ("%1 - monitor", listenbus); foldback_name = string_compose ("%1 - monitor", foldbackbus);
} }
boost::shared_ptr<Route> lsn_rt = session->route_by_name (listen_name); boost::shared_ptr<Route> lsn_rt = session->route_by_name (foldback_name);
if (!lsn_rt) { if (!lsn_rt) {
// doesn't exist but check if raw name does and is listenbus // doesn't exist but check if raw name does and is foldbackbus
boost::shared_ptr<Route> raw_rt = session->route_by_name (listenbus); boost::shared_ptr<Route> raw_rt = session->route_by_name (foldbackbus);
if (raw_rt && raw_rt->is_listenbus()) { if (raw_rt && raw_rt->is_foldbackbus()) {
lsn_rt = raw_rt; lsn_rt = raw_rt;
} else { } else {
// create the listenbus // create the foldbackbus
RouteList list = session->new_audio_route (2, 2, 0, 1, listen_name, PresentationInfo::ListenBus, (uint32_t) -1); RouteList list = session->new_audio_route (2, 2, 0, 1, foldback_name, PresentationInfo::FoldbackBus, (uint32_t) -1);
lsn_rt = *(list.begin()); lsn_rt = *(list.begin());
lsn_rt->presentation_info().set_hidden (true); lsn_rt->presentation_info().set_hidden (true);
session->set_dirty(); session->set_dirty();
@ -4329,7 +4329,7 @@ OSC::sel_new_personal_send (char *listener, lo_message msg)
PBD::warning << "OSC: new_send - can't send to self." << endmsg; PBD::warning << "OSC: new_send - can't send to self." << endmsg;
} }
} else { } else {
PBD::warning << "OSC: new_send - no ListenBus to send to." << endmsg; PBD::warning << "OSC: new_send - no FoldbackBus to send to." << endmsg;
} }
return -1; return -1;
@ -6349,7 +6349,7 @@ OSC::get_sorted_stripables(std::bitset<32> types, bool cue, uint32_t custom, Sor
sorted.push_back (s); sorted.push_back (s);
} else if (types[4] && boost::dynamic_pointer_cast<VCA>(s)) { } else if (types[4] && boost::dynamic_pointer_cast<VCA>(s)) {
sorted.push_back (s); sorted.push_back (s);
} else if (s->is_listenbus()) { } else if (s->is_foldbackbus()) {
if (types[7]) { if (types[7]) {
sorted.push_back (s); sorted.push_back (s);
} }
@ -6570,7 +6570,7 @@ OSC::cue_new_aux (string name, string dest_1, string dest_2, lo_message msg)
RouteList list; RouteList list;
boost::shared_ptr<Stripable> aux; boost::shared_ptr<Stripable> aux;
name = string_compose ("%1 - monitor", name); name = string_compose ("%1 - monitor", name);
list = session->new_audio_route (2, 2, 0, 1, name, PresentationInfo::ListenBus, (uint32_t) -1); list = session->new_audio_route (2, 2, 0, 1, name, PresentationInfo::FoldbackBus, (uint32_t) -1);
aux = *(list.begin()); aux = *(list.begin());
if (aux) { if (aux) {
boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(aux); boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(aux);