diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-02 23:41:33 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-02 23:41:33 +0200 |
commit | b7f723619d3dfdac02d7c5a0d5de45a9c4341ed1 (patch) | |
tree | 41bff8c2bac482f24f1cefceacad8f6e5ce066db /libs/ardour/lua_api.cc | |
parent | 3164c9a07b3646a60cb9433faf7ee90fdd57985e (diff) |
convenient Lua bindings to use Ardour::DataType
Diffstat (limited to 'libs/ardour/lua_api.cc')
-rw-r--r-- | libs/ardour/lua_api.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index a21dbfb3ea..3bd4fc43f6 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -36,6 +36,31 @@ using namespace ARDOUR; using namespace PBD; using namespace std; +int +ARDOUR::LuaAPI::datatype_ctor_nil (lua_State *L) +{ + DataType dt (DataType::NIL); + luabridge::Stack <DataType>::push (L, dt); + return 1; +} + +int +ARDOUR::LuaAPI::datatype_ctor_audio (lua_State *L) +{ + DataType dt (DataType::AUDIO); + // NB luabridge will copy construct the object and manage lifetime. + luabridge::Stack <DataType>::push (L, dt); + return 1; +} + +int +ARDOUR::LuaAPI::datatype_ctor_midi (lua_State *L) +{ + DataType dt (DataType::MIDI); + luabridge::Stack <DataType>::push (L, dt); + return 1; +} + boost::shared_ptr<Processor> ARDOUR::LuaAPI::new_luaproc (Session *s, const string& name) { |