13
0

Load LiveTrax sessions w/DirectOuts sends

We simply ignore the direct out sends from trax.

Note `DEFINE_ENUM_CONVERT` for Role is defined in delivery.cc
so we need a static method to directly read the send's role.
This commit is contained in:
Robin Gareus 2024-05-20 23:16:07 +02:00
parent d3c2faa23b
commit 8ad53bc96c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 19 additions and 2 deletions

View File

@ -56,10 +56,14 @@ public:
/* aux - internal send used to deliver to any bus, by user request */
Aux = 0x10,
/* foldback - internal send used only to deliver to a personal monitor bus */
Foldback = 0x20
Foldback = 0x20,
/* direct outs - used only with LiveTrax, delivers to master bus */
DirectOuts = 0x40
};
static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert; }
static bool role_from_xml (const XMLNode&, Role&);
static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert || r == DirectOuts; }
bool does_routing() const { return true; }

View File

@ -411,6 +411,12 @@ Delivery::state () const
return node;
}
bool
Delivery::role_from_xml (const XMLNode& node, Role& role)
{
return node.get_property ("role", role);
}
int
Delivery::set_state (const XMLNode& node, int version)
{

View File

@ -732,6 +732,7 @@ setup_enum_writer ()
REGISTER_CLASS_ENUM (Delivery, Main);
REGISTER_CLASS_ENUM (Delivery, Aux);
REGISTER_CLASS_ENUM (Delivery, Foldback);
REGISTER_CLASS_ENUM (Delivery, DirectOuts);
REGISTER_BITS (_Delivery_Role);
REGISTER_CLASS_ENUM (MuteMaster, PreFader);

View File

@ -3328,6 +3328,12 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const*
processor->set_owner (this);
} else if (prop->value() == "send") {
#ifndef LIVETRAX
Delivery::Role role;
if (Delivery::role_from_xml (node, role) && role == Delivery::DirectOuts) {
return true;
}
#endif
processor.reset (new Send (_session, _pannable, _mute_master, Delivery::Send, true));
std::shared_ptr<Send> send = std::dynamic_pointer_cast<Send> (processor);