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);
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; }
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
// 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
}
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) {
}
}
}
-
}
// timer callbacks
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 ();