From be5a89aa22df9c0c3a35908d3a3020514f8f504a Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Mon, 22 Oct 2018 12:36:59 -0700 Subject: [PATCH] Add ListenBus to stripable types --- libs/ardour/ardour/presentation_info.h | 4 +++- libs/ardour/ardour/stripable.h | 1 + libs/ardour/enums.cc | 1 + libs/ardour/presentation_info.cc | 2 +- libs/ardour/session.cc | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/presentation_info.h b/libs/ardour/ardour/presentation_info.h index 0bcfff9210..842d18292c 100644 --- a/libs/ardour/ardour/presentation_info.h +++ b/libs/ardour/ardour/presentation_info.h @@ -117,11 +117,13 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful Hidden = 0x100, /* single bit indicates that the group order is set */ OrderSet = 0x400, + /* bus type for monitor mixes */ + ListenBus = 0x2000, /* special mask to delect out "state" bits */ StatusMask = (Hidden), /* special mask to delect select type bits */ - TypeMask = (AudioBus|AudioTrack|MidiTrack|MidiBus|VCA|MasterOut|MonitorOut|Auditioner) + TypeMask = (AudioBus|AudioTrack|MidiTrack|MidiBus|VCA|MasterOut|MonitorOut|Auditioner|ListenBus) }; static const Flag AllStripables; /* mask to use for any route or VCA (but not auditioner) */ diff --git a/libs/ardour/ardour/stripable.h b/libs/ardour/ardour/stripable.h index 08b2a6bd69..4ba7532d9a 100644 --- a/libs/ardour/ardour/stripable.h +++ b/libs/ardour/ardour/stripable.h @@ -74,6 +74,7 @@ class LIBARDOUR_API Stripable : public SessionObject, bool is_private_route() const { return is_auditioner(); } bool is_master() const { return _presentation_info.flags() & PresentationInfo::MasterOut; } bool is_monitor() const { return _presentation_info.flags() & PresentationInfo::MonitorOut; } + bool is_listenbus() const { return _presentation_info.flags() & PresentationInfo::ListenBus; } int set_state (XMLNode const&, int); diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 6e2f1dfc99..5b7bbe457d 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -734,6 +734,7 @@ setup_enum_writer () REGISTER_CLASS_ENUM (PresentationInfo, Auditioner); REGISTER_CLASS_ENUM (PresentationInfo, Hidden); REGISTER_CLASS_ENUM (PresentationInfo, OrderSet); + REGISTER_CLASS_ENUM (PresentationInfo, ListenBus); REGISTER_BITS (_PresentationInfo_Flag); REGISTER_CLASS_ENUM (MusicalMode,Dorian); diff --git a/libs/ardour/presentation_info.cc b/libs/ardour/presentation_info.cc index 23d82f6409..889a94d7dc 100644 --- a/libs/ardour/presentation_info.cc +++ b/libs/ardour/presentation_info.cc @@ -112,7 +112,7 @@ PresentationInfo::send_static_change (const PropertyChange& what_changed) } 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|PresentationInfo::ListenBus); 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::AllRoutes = PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::MasterOut|PresentationInfo::MonitorOut); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index da4421d4a2..50e5825f68 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3257,6 +3257,8 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r StateProtector sp (this); if (Profile->get_trx()) { add_routes (ret, false, false, false, order); + } else if (flags == PresentationInfo::ListenBus) { + add_routes (ret, false, false, true, order); // no autoconnect } else { add_routes (ret, false, true, true, order); // autoconnect // outputs only } -- 2.30.2