Add ListenBus to stripable types
authorLen Ovens <len@ovenwerks.net>
Mon, 22 Oct 2018 19:36:59 +0000 (12:36 -0700)
committerLen Ovens <len@ovenwerks.net>
Tue, 30 Oct 2018 19:15:28 +0000 (12:15 -0700)
libs/ardour/ardour/presentation_info.h
libs/ardour/ardour/stripable.h
libs/ardour/enums.cc
libs/ardour/presentation_info.cc
libs/ardour/session.cc

index 0bcfff9210491f69630ab3ac62306932eb7db535..842d18292c7b07b237b3cbf47214faa72851cdb7 100644 (file)
@@ -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) */
index 08b2a6bd69a83f4e3283718534d19742e89f1354..4ba7532d9afa3ab7287064b676189b43e3fe528d 100644 (file)
@@ -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);
 
index 6e2f1dfc99c8df09975d79ab76bd79c5ab3188d1..5b7bbe457dfa79b43990b61437040fecec776e61 100644 (file)
@@ -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);
index 23d82f6409ed6c5731284baf3be8ef76bbd055ca..889a94d7dc3da59c0dbd3fc9ba7c0585f61f7b83 100644 (file)
@@ -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);
index da4421d4a2d92b9f9a428b8d72d2d3a7f1d24334..50e5825f68c1114929ad166aa969418d868861f8 100644 (file)
@@ -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
                }