convenient Lua bindings to use Ardour::DataType

This commit is contained in:
Robin Gareus 2016-04-02 23:41:33 +02:00
parent 3164c9a07b
commit b7f723619d
3 changed files with 32 additions and 0 deletions

View file

@ -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)
{