OSC: Signal for editor mixer change. (Selected or not)
This commit is contained in:
parent
bc1f571954
commit
fef79d46bb
@ -823,7 +823,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||
boost::shared_ptr<Route> monitor_out() const { return _monitor_out; }
|
||||
boost::shared_ptr<Route> master_out() const { return _master_out; }
|
||||
boost::weak_ptr<Route> get_editor_mixer() const { return _editor_mixer; }
|
||||
void set_editor_mixer (boost::weak_ptr<Route> r) { _editor_mixer = r; }
|
||||
void set_editor_mixer (boost::weak_ptr<Route> r) { _editor_mixer = r; EditorMixerChanged(); }
|
||||
static PBD::Signal0<void> EditorMixerChanged;
|
||||
|
||||
void globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p, bool);
|
||||
void globally_set_send_gains_from_track (boost::shared_ptr<Route> dest);
|
||||
|
@ -148,6 +148,7 @@ PBD::Signal0<void> Session::Quit;
|
||||
PBD::Signal0<void> Session::FeedbackDetected;
|
||||
PBD::Signal0<void> Session::SuccessfulGraphSort;
|
||||
PBD::Signal2<void,std::string,std::string> Session::VersionMismatch;
|
||||
PBD::Signal0<void> Session::EditorMixerChanged;
|
||||
|
||||
const framecnt_t Session::bounce_chunk_size = 8192;
|
||||
static void clean_up_session_event (SessionEvent* ev) { delete ev; }
|
||||
|
@ -249,8 +249,8 @@ OSC::start ()
|
||||
periodic_connection = periodic_timeout->connect (sigc::mem_fun (*this, &OSC::periodic));
|
||||
periodic_timeout->attach (main_loop()->get_context());
|
||||
|
||||
// catch GUI select changes for GUI_select mode
|
||||
StripableSelectionChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::gui_selection_changed, this, _1), this);
|
||||
// catch current editor mixer changes for GUI_select mode
|
||||
session->EditorMixerChanged.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&OSC::gui_selection_changed, this), this);
|
||||
|
||||
// catch track reordering
|
||||
// receive routes added
|
||||
@ -1226,20 +1226,7 @@ OSC::get_surface (lo_address addr)
|
||||
// if we do this when OSC is started we get the wrong stripable
|
||||
// we don't need this until we actually have a surface to deal with
|
||||
if (!_select) {
|
||||
// guess at which stripable is the current editor mixerstrip
|
||||
// right now just choose the first one we find, may be the wrong one
|
||||
// hopefully we will have access to session->current_strip at some point
|
||||
StripableList stripables;
|
||||
|
||||
session->get_stripables (stripables);
|
||||
|
||||
for (StripableList::iterator it = stripables.begin(); it != stripables.end(); ++it) {
|
||||
boost::shared_ptr<Stripable> s = *it;
|
||||
if (s->is_selected()) {
|
||||
_select = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gui_selection_changed();
|
||||
}
|
||||
|
||||
// No surface create one with default values
|
||||
@ -2611,13 +2598,11 @@ OSC::route_plugin_parameter_print (int ssid, int piid, int par, lo_message msg)
|
||||
}
|
||||
|
||||
void
|
||||
OSC::gui_selection_changed (StripableNotificationListPtr stripables)
|
||||
OSC::gui_selection_changed ()
|
||||
{
|
||||
boost::shared_ptr<Stripable> strip;
|
||||
|
||||
if (!stripables->empty()) {
|
||||
strip = boost::dynamic_pointer_cast<Stripable>(session->get_editor_mixer().lock());
|
||||
}
|
||||
strip = boost::dynamic_pointer_cast<Stripable>(session->get_editor_mixer().lock());
|
||||
if (strip) {
|
||||
_select = strip;
|
||||
for (uint32_t it = 0; it < _surface.size(); ++it) {
|
||||
@ -2628,7 +2613,6 @@ OSC::gui_selection_changed (StripableNotificationListPtr stripables)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// timer callbacks
|
||||
|
@ -486,7 +486,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||
void end_listen (boost::shared_ptr<ARDOUR::Stripable>, lo_address);
|
||||
void drop_route (boost::weak_ptr<ARDOUR::Stripable>);
|
||||
void route_lost (boost::weak_ptr<ARDOUR::Stripable>);
|
||||
void gui_selection_changed (ARDOUR::StripableNotificationListPtr stripables);
|
||||
void gui_selection_changed (void);
|
||||
|
||||
void route_name_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> r, lo_address addr);
|
||||
void recalcbanks ();
|
||||
|
Loading…
Reference in New Issue
Block a user