fix bitslot already in use warning
in e45151b89c
route.cc was changed to create internal sends
directly with role = Delivery::Aux; and not Delivery::Role (0).
This change was motivated to initialize the panner for Aux-sends
in the Delivery.
Role(0) was used to override bitslot numbering during initial
construction of the object when the state is loaded from XML after
construction.
This patch adds an explicit flag for that.
(The previous Role(0) approach only worked for Aux-Sends
but not Sends, anyway.)
This commit is contained in:
parent
ecc1599474
commit
06cc5e5240
@ -28,7 +28,7 @@ namespace ARDOUR {
|
||||
class InternalSend : public Send
|
||||
{
|
||||
public:
|
||||
InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role);
|
||||
InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false);
|
||||
virtual ~InternalSend ();
|
||||
|
||||
std::string display_name() const;
|
||||
|
@ -35,7 +35,7 @@ class Amp;
|
||||
class Send : public Delivery
|
||||
{
|
||||
public:
|
||||
Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send);
|
||||
Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send, bool ignore_bitslot = false);
|
||||
virtual ~Send ();
|
||||
|
||||
uint32_t bit_slot() const { return _bitslot; }
|
||||
@ -67,7 +67,7 @@ class Send : public Delivery
|
||||
std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
|
||||
|
||||
static uint32_t how_many_sends();
|
||||
static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&);
|
||||
static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&, bool);
|
||||
|
||||
protected:
|
||||
bool _metering;
|
||||
|
@ -40,8 +40,8 @@ using namespace std;
|
||||
|
||||
PBD::Signal1<void, pframes_t> InternalSend::CycleStart;
|
||||
|
||||
InternalSend::InternalSend (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role)
|
||||
: Send (s, p, mm, role)
|
||||
InternalSend::InternalSend (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role, bool ignore_bitslot)
|
||||
: Send (s, p, mm, role, ignore_bitslot)
|
||||
{
|
||||
if (sendto) {
|
||||
if (use_target (sendto)) {
|
||||
|
@ -2496,7 +2496,7 @@ Route::set_processor_state (const XMLNode& node)
|
||||
|
||||
if (prop->value() == "intsend") {
|
||||
|
||||
processor.reset (new InternalSend (_session, _pannable, _mute_master, boost::shared_ptr<Route>(), Delivery::Aux));
|
||||
processor.reset (new InternalSend (_session, _pannable, _mute_master, boost::shared_ptr<Route>(), Delivery::Aux, true));
|
||||
|
||||
} else if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
|
||||
prop->value() == "lv2" ||
|
||||
@ -2512,7 +2512,7 @@ Route::set_processor_state (const XMLNode& node)
|
||||
|
||||
} else if (prop->value() == "send") {
|
||||
|
||||
processor.reset (new Send (_session, _pannable, _mute_master));
|
||||
processor.reset (new Send (_session, _pannable, _mute_master, Delivery::Send, true));
|
||||
|
||||
} else {
|
||||
error << string_compose(_("unknown Processor type \"%1\"; ignored"), prop->value()) << endmsg;
|
||||
|
@ -44,9 +44,9 @@ using namespace PBD;
|
||||
using namespace std;
|
||||
|
||||
string
|
||||
Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot)
|
||||
Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot, bool ignore_bitslot)
|
||||
{
|
||||
if (r == Role (0)) {
|
||||
if (ignore_bitslot) {
|
||||
/* this happens during initial construction of sends from XML,
|
||||
before they get ::set_state() called. lets not worry about
|
||||
it.
|
||||
@ -70,8 +70,8 @@ Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot)
|
||||
|
||||
}
|
||||
|
||||
Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, Role r)
|
||||
: Delivery (s, p, mm, name_and_id_new_send (s, r, _bitslot), r)
|
||||
Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, Role r, bool ignore_bitslot)
|
||||
: Delivery (s, p, mm, name_and_id_new_send (s, r, _bitslot, ignore_bitslot), r)
|
||||
, _metering (false)
|
||||
{
|
||||
if (_role == Listen) {
|
||||
|
Loading…
Reference in New Issue
Block a user