OSC link: make whole link set follow strip_types
strip should not run periodic when blank - crash fix
This commit is contained in:
parent
634c620b07
commit
69603bb76e
@ -1469,6 +1469,42 @@ OSC::set_link (uint32_t set, uint32_t id, lo_address addr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
OSC::link_strip_types (uint32_t linkset, uint32_t striptypes)
|
||||||
|
{
|
||||||
|
LinkSet *ls = 0;
|
||||||
|
|
||||||
|
if (!linkset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::map<uint32_t, LinkSet>::iterator it;
|
||||||
|
it = link_sets.find(linkset);
|
||||||
|
if (it == link_sets.end()) {
|
||||||
|
// this should never happen... but
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ls = &link_sets[linkset];
|
||||||
|
ls->strip_types = striptypes;
|
||||||
|
for (uint32_t dv = 1; dv < ls->urls.size(); dv++) {
|
||||||
|
OSCSurface *su;
|
||||||
|
|
||||||
|
if (ls->urls[dv] != "") {
|
||||||
|
string url = ls->urls[dv];
|
||||||
|
su = get_surface (lo_address_new_from_url (url.c_str()), true);
|
||||||
|
if (su->linkset == linkset) {
|
||||||
|
su->strip_types = striptypes;
|
||||||
|
if (su->strip_types[10]) {
|
||||||
|
su->usegroup = PBD::Controllable::UseGroup;
|
||||||
|
} else {
|
||||||
|
su->usegroup = PBD::Controllable::NoGroup;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ls->urls[dv] = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OSC::surface_link_state (LinkSet * set)
|
OSC::surface_link_state (LinkSet * set)
|
||||||
{
|
{
|
||||||
@ -1763,6 +1799,7 @@ OSC::set_surface (uint32_t b_size, uint32_t strips, uint32_t fb, uint32_t gm, ui
|
|||||||
s->plug_page_size = pi_size;
|
s->plug_page_size = pi_size;
|
||||||
if (s->linkset) {
|
if (s->linkset) {
|
||||||
set_link (s->linkset, s->linkid, get_address (msg));
|
set_link (s->linkset, s->linkid, get_address (msg));
|
||||||
|
link_strip_types (s->linkset, s->strip_types.to_ulong());
|
||||||
} else {
|
} else {
|
||||||
// set bank and strip feedback
|
// set bank and strip feedback
|
||||||
strip_feedback(s, true);
|
strip_feedback(s, true);
|
||||||
@ -1805,6 +1842,9 @@ OSC::set_surface_strip_types (uint32_t st, lo_message msg)
|
|||||||
} else {
|
} else {
|
||||||
s->usegroup = PBD::Controllable::NoGroup;
|
s->usegroup = PBD::Controllable::NoGroup;
|
||||||
}
|
}
|
||||||
|
if (s->linkset) {
|
||||||
|
link_strip_types (s->linkset, st);
|
||||||
|
}
|
||||||
|
|
||||||
// set bank and strip feedback
|
// set bank and strip feedback
|
||||||
_set_bank (1, get_address (msg));
|
_set_bank (1, get_address (msg));
|
||||||
|
@ -322,6 +322,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||||||
int link_check (uint32_t linkset);
|
int link_check (uint32_t linkset);
|
||||||
int set_link (uint32_t set, uint32_t id, lo_address addr);
|
int set_link (uint32_t set, uint32_t id, lo_address addr);
|
||||||
void surface_link_state (LinkSet * set);
|
void surface_link_state (LinkSet * set);
|
||||||
|
void link_strip_types (uint32_t linkset, uint32_t striptypes);
|
||||||
|
|
||||||
#define OSC_DEBUG \
|
#define OSC_DEBUG \
|
||||||
if (_debugmode == All) { \
|
if (_debugmode == All) { \
|
||||||
|
@ -120,7 +120,6 @@ OSCRouteObserver::refresh_strip (boost::shared_ptr<ARDOUR::Stripable> new_strip,
|
|||||||
if (!_strip) {
|
if (!_strip) {
|
||||||
// this strip is blank and should be cleared
|
// this strip is blank and should be cleared
|
||||||
clear_strip ();
|
clear_strip ();
|
||||||
_init = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::no_strip, this), OSC::instance());
|
_strip->DropReferences.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::no_strip, this), OSC::instance());
|
||||||
|
Loading…
Reference in New Issue
Block a user