diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-29 21:31:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-29 21:31:14 +0000 |
commit | 77cc0f7cc84df5e242898cef0abb7d633de64d8c (patch) | |
tree | 71ec1c03dec23ac52949138cf8b5f7a1afb8e5ba /libs/ardour/session_state.cc | |
parent | e10d0339ccd3659e0de58db29131e528571bc8c4 (diff) |
editors for control protocols (generalized); editor for Generic MIDI that allows choosing a MIDI binding map (or none); support banking in binding URLs, and other miscellany related to generic MIDI; save+restore JACK_MidiPort connection state (but cause a crash at shutdown time)
git-svn-id: svn://localhost/ardour2/branches/3.0@6411 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 8ff076f759..6a72777c7c 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2679,25 +2679,9 @@ Session::controllable_by_id (const PBD::ID& id) } boost::shared_ptr<Controllable> -Session::controllable_by_uri (const std::string& uri) +Session::controllable_by_rid_and_name (uint32_t rid, const char* const what) { boost::shared_ptr<Controllable> c; - string::size_type last_slash; - string useful_part; - - if ((last_slash = uri.find_last_of ('/')) == string::npos) { - return c; - } - - useful_part = uri.substr (last_slash+1); - - uint32_t rid; - char what[64]; - - if (sscanf (useful_part.c_str(), "rid=%" PRIu32 "?%63s", &rid, what) != 2) { - return c; - } - boost::shared_ptr<Route> r = route_by_remote_id (rid); if (!r) { @@ -2706,8 +2690,17 @@ Session::controllable_by_uri (const std::string& uri) if (strncmp (what, "gain", 4) == 0) { c = r->gain_control (); + } else if (strncmp (what, "solo", 4) == 0) { + c = r->solo_control(); + } else if (strncmp (what, "mute", 4) == 0) { + c = r->mute_control(); } else if (strncmp (what, "pan", 3) == 0) { } else if (strncmp (what, "plugin", 6) == 0) { + } else if (strncmp (what, "recenable", 9) == 0) { + boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(r); + if (t) { + c = t->rec_enable_control (); + } } return c; |