From 38a029c0698eb23fb7ed9323ccad021c0330d2dd Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 17 Aug 2017 23:50:34 +0200 Subject: [PATCH] Expose Lua bindings to create/delete VCAs --- libs/ardour/ardour/session.h | 1 + libs/ardour/luabindings.cc | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index aec229e11d..6fe760c2b8 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1203,6 +1203,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop void reconnect_ltc_output (); VCAManager& vca_manager() { return *_vca_manager; } + VCAManager* vca_manager_ptr() { return _vca_manager; } void auto_connect_thread_wakeup (); diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 5ff36d6f69..04275991b7 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -2025,12 +2025,11 @@ LuaBindings::common (lua_State* L) .endClass() .deriveClass ("VCAManager") -#if 0 // needs non-const VCAManager reference .addFunction ("create_vca", &VCAManager::create_vca) .addFunction ("remove_vca", &VCAManager::remove_vca) -#endif .addFunction ("vca_by_number", &VCAManager::vca_by_number) .addFunction ("vcas", &VCAManager::vcas) + .addFunction ("n_vcas", &VCAManager::n_vcas) .endClass() .deriveClass ("RCConfiguration") @@ -2159,7 +2158,7 @@ LuaBindings::common (lua_State* L) .addFunction ("end_is_free", &Session::end_is_free) .addFunction ("set_end_is_free", &Session::set_end_is_free) .addFunction ("remove_route_group", (void (Session::*)(RouteGroup*))&Session::remove_route_group) - .addFunction ("vca_manager", &Session::vca_manager) + .addFunction ("vca_manager", &Session::vca_manager_ptr) .addExtCFunction ("timecode_to_sample_lua", ARDOUR::LuaAPI::timecode_to_sample_lua) .addExtCFunction ("sample_to_timecode_lua", ARDOUR::LuaAPI::sample_to_timecode_lua) .endClass ()