diff options
author | Robin Gareus <robin@gareus.org> | 2016-03-19 12:47:37 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-03-19 12:47:37 +0100 |
commit | 5b347e92587513bfb7d6321e6bd67195db9c0ad5 (patch) | |
tree | 1107a2a8c403edf6e279971706fdf1baa4b7015d /libs/ardour/ardour/lua_api.h | |
parent | 83bcaa1882894232c400043ce0be0b9405e7824d (diff) |
add OSC Lua bindings
Diffstat (limited to 'libs/ardour/ardour/lua_api.h')
-rw-r--r-- | libs/ardour/ardour/lua_api.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/ardour/ardour/lua_api.h b/libs/ardour/ardour/lua_api.h index c69469f184..3aab2f937d 100644 --- a/libs/ardour/ardour/lua_api.h +++ b/libs/ardour/ardour/lua_api.h @@ -20,6 +20,7 @@ #define _ardour_lua_api_h_ #include <string> +#include <lo/lo.h> #include <boost/shared_ptr.hpp> #include "ardour/libardour_visibility.h" @@ -31,6 +32,20 @@ namespace ARDOUR { namespace LuaAPI { boost::shared_ptr<ARDOUR::Processor> new_luaproc (ARDOUR::Session *s, const std::string&); + /** + * OSC is kinda special, lo_address is a void* and lo_send() has varags + * and typed arguments which makes it hard to bind, even lo_cpp. + */ + class LuaOSCAddress { + public: + LuaOSCAddress (std::string uri) { + _addr = lo_address_new_from_url (uri.c_str()); + } + ~LuaOSCAddress () { if (_addr) { lo_address_free (_addr); } } + int send (lua_State *L); + lo_address _addr; + }; + } } /* namespace */ #endif // _ardour_lua_api_h_ |