OSC: Allow expand to be global
This commit is contained in:
parent
293326cd94
commit
fee23d8778
@ -2938,7 +2938,7 @@ OSC::get_sid (boost::shared_ptr<ARDOUR::Stripable> strip, lo_address addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// failsafe... should never get here.
|
// strip not in current bank
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4399,6 +4399,8 @@ OSC::strip_expand (int ssid, int yn, lo_message msg)
|
|||||||
val = 1;
|
val = 1;
|
||||||
}
|
}
|
||||||
return float_message_with_id (X_("/strip/expand"), ssid, val, sur->feedback[2], get_address (msg));
|
return float_message_with_id (X_("/strip/expand"), ssid, val, sur->feedback[2], get_address (msg));
|
||||||
|
} else {
|
||||||
|
sur->expand_strip = s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sur->expand_enable = (bool) yn;
|
sur->expand_enable = (bool) yn;
|
||||||
@ -4439,22 +4441,30 @@ OSC::_strip_select (boost::shared_ptr<Stripable> s, lo_address addr)
|
|||||||
OSCSurface *sur = get_surface(addr, true);
|
OSCSurface *sur = get_surface(addr, true);
|
||||||
boost::weak_ptr<Stripable> o_sel = sur->select;
|
boost::weak_ptr<Stripable> o_sel = sur->select;
|
||||||
boost::shared_ptr<Stripable> old_sel= o_sel.lock ();
|
boost::shared_ptr<Stripable> old_sel= o_sel.lock ();
|
||||||
|
boost::weak_ptr<Stripable> o_expand = sur->expand_strip;
|
||||||
|
boost::shared_ptr<Stripable> old_expand= o_expand.lock ();
|
||||||
|
|
||||||
if (!s) {
|
if (!s) {
|
||||||
// we got a null strip check that old strip is valid
|
// we got a null strip check that old strips are valid
|
||||||
if (old_sel && sur->expand_enable) {
|
if (old_expand && sur->expand_enable) {
|
||||||
s = old_sel;
|
sur->expand = get_sid (old_expand, addr);
|
||||||
} else {
|
if (sur->strip_types[11] || sur->expand) {
|
||||||
sur->expand = 0;
|
s = old_expand;
|
||||||
sur->expand_enable = false;
|
|
||||||
if (ControlProtocol::first_selected_stripable()) {
|
|
||||||
s = ControlProtocol::first_selected_stripable();
|
|
||||||
} else {
|
} else {
|
||||||
s = session->master_out ();
|
sur->expand_strip = boost::shared_ptr<Stripable> ();
|
||||||
}
|
}
|
||||||
_select = s;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!s) {
|
||||||
|
sur->expand = 0;
|
||||||
|
sur->expand_enable = false;
|
||||||
|
if (ControlProtocol::first_selected_stripable()) {
|
||||||
|
s = ControlProtocol::first_selected_stripable();
|
||||||
|
} else {
|
||||||
|
s = session->master_out ();
|
||||||
|
}
|
||||||
|
_select = s;
|
||||||
|
}
|
||||||
if (s != old_sel) {
|
if (s != old_sel) {
|
||||||
sur->select = s;
|
sur->select = s;
|
||||||
if (sur->custom_mode >= GroupOnly) {
|
if (sur->custom_mode >= GroupOnly) {
|
||||||
@ -4552,9 +4562,9 @@ OSC::sel_expand (uint32_t state, lo_message msg)
|
|||||||
{
|
{
|
||||||
OSCSurface *sur = get_surface(get_address (msg));
|
OSCSurface *sur = get_surface(get_address (msg));
|
||||||
boost::shared_ptr<Stripable> s;
|
boost::shared_ptr<Stripable> s;
|
||||||
if (state && sur->expand) {
|
if (state) {
|
||||||
sur->expand_enable = (bool) state;
|
sur->expand_enable = (bool) state;
|
||||||
s = get_strip (sur->expand, get_address (msg));
|
s = sur->expand_strip;
|
||||||
} else {
|
} else {
|
||||||
sur->expand_enable = false;
|
sur->expand_enable = false;
|
||||||
s = _select;
|
s = _select;
|
||||||
|
@ -150,7 +150,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||||||
OSCSelectObserver* sel_obs; // So we can sync select feedback with selected channel
|
OSCSelectObserver* sel_obs; // So we can sync select feedback with selected channel
|
||||||
uint32_t expand; // Used by /select/select
|
uint32_t expand; // Used by /select/select
|
||||||
bool expand_enable; // use expand instead of select
|
bool expand_enable; // use expand instead of select
|
||||||
boost::shared_ptr<ARDOUR::Stripable> select; // stripable this surface uses (maybe expand strip)
|
boost::shared_ptr<ARDOUR::Stripable> expand_strip; // stripable this surface uses for expand
|
||||||
|
boost::shared_ptr<ARDOUR::Stripable> select; // stripable this surface uses as selected
|
||||||
int plug_page; // current plugin page
|
int plug_page; // current plugin page
|
||||||
uint32_t plug_page_size; // plugin page size (number of controls)
|
uint32_t plug_page_size; // plugin page size (number of controls)
|
||||||
int plugin_id; // id of current plugin
|
int plugin_id; // id of current plugin
|
||||||
@ -185,9 +186,22 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||||||
* [12] - Send Playhead position like primary/secondary GUI clocks
|
* [12] - Send Playhead position like primary/secondary GUI clocks
|
||||||
* [13] - Send well known feedback (for /select/command
|
* [13] - Send well known feedback (for /select/command
|
||||||
* [14] - use OSC 1.0 only (#reply -> /reply)
|
* [14] - use OSC 1.0 only (#reply -> /reply)
|
||||||
|
*
|
||||||
|
* Strip_type bits:
|
||||||
|
* [0] - Audio Tracks
|
||||||
|
* [1] - Midi Tracks
|
||||||
|
* [2] - Audio Bus
|
||||||
|
* [3] - Midi Bus
|
||||||
|
* [4] - VCAs
|
||||||
|
* [5] - master
|
||||||
|
* [6] - Monitor
|
||||||
|
* [7] - Aux Bus
|
||||||
|
* [8] - Selected
|
||||||
|
* [9] - Hidden
|
||||||
|
* [10] - Use Groups
|
||||||
|
* [11] - Global Expand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// storage for each surface's settings
|
// storage for each surface's settings
|
||||||
mutable Glib::Threads::Mutex surfaces_lock;
|
mutable Glib::Threads::Mutex surfaces_lock;
|
||||||
typedef std::vector<OSCSurface> Surface;
|
typedef std::vector<OSCSurface> Surface;
|
||||||
|
Loading…
Reference in New Issue
Block a user