diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-17 05:58:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-17 05:58:43 +0000 |
commit | 803b502bf176c417a70498a98173fb09691a80b7 (patch) | |
tree | 0678e953e5739758b86988c4340cbc3406927a7c /libs/ardour/osc.cc | |
parent | 9aeccd52c83bf020df490f64e8716ff8ddd2ee76 (diff) |
AccessAction() OSC patch from Ryan Scott
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3258 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/osc.cc')
-rw-r--r-- | libs/ardour/osc.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/osc.cc b/libs/ardour/osc.cc index e2ad9a2951..ea3c2f4d4c 100644 --- a/libs/ardour/osc.cc +++ b/libs/ardour/osc.cc @@ -176,6 +176,7 @@ OSC::register_callbacks() #define REGISTER_CALLBACK(serv,path,types, function) lo_server_add_method (serv, path, types, OSC::_ ## function, this) REGISTER_CALLBACK (serv, "/ardour/add_marker", "", add_marker); + REGISTER_CALLBACK (serv, "/ardour/access_action", "s", access_action); REGISTER_CALLBACK (serv, "/ardour/loop_toggle", "", loop_toggle); REGISTER_CALLBACK (serv, "/ardour/goto_start", "", goto_start); REGISTER_CALLBACK (serv, "/ardour/goto_end", "", goto_end); @@ -401,6 +402,10 @@ OSC::set_session (Session& s) { session = &s; session->GoingAway.connect (mem_fun (*this, &OSC::session_going_away)); + + // "Application Hooks" + session_loaded( s ); + session->Exported.connect( mem_fun( *this, &OSC::session_exported ) ); } void @@ -409,6 +414,21 @@ OSC::session_going_away () session = 0; } +// "Application Hook" Handlers // +void +OSC::session_loaded( Session& s ) { + lo_address listener = lo_address_new( NULL, "7770" ); + lo_send( listener, "/session/loaded", "ss", s.path().c_str(), s.name().c_str() ); +} + +void +OSC::session_exported( std::string path, std::string name ) { + lo_address listener = lo_address_new( NULL, "7770" ); + lo_send( listener, "/session/exported", "ss", path.c_str(), name.c_str() ); +} + +// end "Application Hook" Handlers // + /* path callbacks */ int |