diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-10 15:03:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-10 15:03:30 +0000 |
commit | 68e943265edf04e63a8e8b8f62bab20f99d9c637 (patch) | |
tree | ff8941a59662fc0c4622944b65f7b2d5e3bdd0c3 /libs/ardour/osc.cc | |
parent | e4372df05b7d74a6b80dbbf4b6c00cc2b31c4723 (diff) |
merge from 2.0-ongoing @ 3581
git-svn-id: svn://localhost/ardour2/branches/3.0@3711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/osc.cc')
-rw-r--r-- | libs/ardour/osc.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/ardour/osc.cc b/libs/ardour/osc.cc index b0bd35b8c6..0c58040ad6 100644 --- a/libs/ardour/osc.cc +++ b/libs/ardour/osc.cc @@ -28,6 +28,8 @@ #include <unistd.h> #include <fcntl.h> +#include <glibmm/miscutils.h> + #include <pbd/pthread_utils.h> #include <pbd/file_utils.h> @@ -183,6 +185,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); @@ -409,6 +412,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 @@ -417,6 +424,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 |