diff options
-rw-r--r-- | gtk2_ardour/add_route_dialog.cc | 63 | ||||
-rw-r--r-- | gtk2_ardour/add_route_dialog.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 29 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 5 |
4 files changed, 87 insertions, 11 deletions
diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index 1c57867601..57c9cc2719 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -134,15 +134,15 @@ The track will be added in the location specified by \"Position\".\n \ )); builtin_types.push_back ( std::pair<string,string>(_("Audio Busses"), _(" \ -Use the settings, below, to create new Audio Tracks.\n \ +Use the settings, below, to create new Audio Busses.\n \ \n\n \ You may select:\n \ -* The number of buses to add.\n \ -* A Name for the track(s).\n \ -* A Group which will be assigned to the track(s).\n \ +* The number of busses to add.\n \ +* A Name for the busses.\n \ +* A Group which will be assigned to the Busses.\n \ * Pin Connections mode. (see tooltip for details).\n \ \n \ -The track will be added in the location specified by \"Position\".\n \ +The Busses will be added in the location specified by \"Position\".\n \ ") )); builtin_types.push_back ( @@ -150,16 +150,16 @@ The track will be added in the location specified by \"Position\".\n \ Use the settings, below, to create new MIDI Busses.\n \ \n \ MIDI Busses can combine the output of multiple tracks. \n \ -MIDI Buses are sometimes used to host a single \"heavy\" instrument plugin which is fed from multiple MIDI tracks. \ +MIDI Busses are sometimes used to host a single \"heavy\" instrument plugin which is fed from multiple MIDI tracks. \ \n\n \ You may select:\n \ -* The number of buses to add.\n \ -* A Name for the track(s).\n \ +* The number of busses to add.\n \ +* A Name for the busses.\n \ * An Instrument plugin (or select \"None\" to drive an external device)\n \ -* A Group which will be assigned to the track(s).\n \ +* A Group which will be assigned to the busses.\n \ * Pin Connections mode. (see tooltip for details).\n \ \n \ -The track will be added in the location specified by \"Position\".\n \ +The busses will be added in the location specified by \"Position\".\n \ ") )); builtin_types.push_back ( @@ -171,6 +171,17 @@ You may select:\n \ * A name for the new VCAs. \"%n\" will be replaced by an index number for each VCA.\n \ ") )); + builtin_types.push_back ( + std::pair<string,string>(_("Listen Busses"), _(" \ +Use the settings, below, to create new Listen Busses.\n \ +Listen Busses are used as master outputs for monitor channels which are fed by\n \ +hidden monitor sends.\n \ +\n\n \ +You may select:\n \ +* The number of Listen Busses to add.\n \ +* A name for the new Listen Busses.\n \ +") + )); } insert_at_combo.append_text (_("First")); @@ -569,6 +580,8 @@ AddRouteDialog::type_wanted() return AudioTrack; } else if (str == _("VCA Masters")) { return VCAMaster; + } else if (str == _("Listen Busses")) { + return ListenBus; } else { assert (0); return AudioTrack; @@ -596,6 +609,9 @@ AddRouteDialog::maybe_update_name_template_entry () case MidiBus: name_template_entry.set_text (_("Bus")); break; + case ListenBus: + name_template_entry.set_text (_("Listener")); + break; case VCAMaster: name_template_entry.set_text (VCA::default_name_template()); break; @@ -741,6 +757,27 @@ AddRouteDialog::track_type_chosen () insert_at_combo.set_sensitive (true); break; + case ListenBus: + + configuration_label.set_sensitive (false); + channel_combo.set_sensitive (false); + + mode_label.set_sensitive (false); + mode_combo.set_sensitive (false); + + instrument_label.set_sensitive (false); + instrument_combo.set_sensitive (false); + + group_label.set_sensitive (false); + route_group_combo.set_sensitive (false); + + strict_io_label.set_sensitive (false); + strict_io_combo.set_sensitive (false); + + insert_label.set_sensitive (false); + insert_at_combo.set_sensitive (false); + + break; } maybe_update_name_template_entry (); @@ -840,6 +877,12 @@ AddRouteDialog::channels () ret.set (DataType::AUDIO, channel_count ()); ret.set (DataType::MIDI, 1); break; + + case ListenBus: + ret.set (DataType::AUDIO, 2); + ret.set (DataType::MIDI, 0); + break; + default: break; } diff --git a/gtk2_ardour/add_route_dialog.h b/gtk2_ardour/add_route_dialog.h index e5622db3ba..381bebee44 100644 --- a/gtk2_ardour/add_route_dialog.h +++ b/gtk2_ardour/add_route_dialog.h @@ -67,6 +67,7 @@ public: AudioBus, MidiBus, VCAMaster, + ListenBus, }; TypeWanted type_wanted(); diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 52bccd44d4..32e4e4f473 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2120,6 +2120,32 @@ ARDOUR_UI::session_add_audio_route ( } void +ARDOUR_UI::session_add_listen_bus (uint32_t how_many, string const & name_template) +{ + RouteList routes; + + assert (_session); + + try { + routes = _session->new_audio_route (2, 2, 0, how_many, name_template, PresentationInfo::ListenBus, -1); + + 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) + << endmsg; + } + } + + catch (...) { + display_insufficient_ports_message (); + return; + } + + for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) { + (*i)->set_strict_io (true); + } +} + +void ARDOUR_UI::display_insufficient_ports_message () { MessageDialog msg (_main_window, @@ -4398,6 +4424,9 @@ ARDOUR_UI::add_route_dialog_response (int r) case AddRouteDialog::VCAMaster: _session->vca_manager().create_vca (count, name_template); break; + case AddRouteDialog::ListenBus: + session_add_listen_bus (count, name_template); + break; } } diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 6c5f09cc0f..1f0e1145e9 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -300,7 +300,8 @@ public: void flush_videotimeline_cache (bool localcacheonly=false); void export_video (bool range = false); - void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order); + void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, + uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order); void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*, uint32_t, std::string const &, bool strict_io, @@ -315,6 +316,8 @@ public: ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*, ARDOUR::PresentationInfo::order_t order); + void session_add_listen_bus (uint32_t, std::string const &); + void display_insufficient_ports_message (); void attach_to_engine (); |