Add ListenBus to stripable types

This commit is contained in:
Len Ovens 2018-10-22 12:36:59 -07:00
parent 5b2eb6107c
commit be5a89aa22
5 changed files with 8 additions and 2 deletions

View 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) */

View 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);

View 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);

View 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);

View 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
}