summaryrefslogtreecommitdiff
path: root/libs/ardour/luaproc.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-09-18 01:10:53 +0200
committerRobin Gareus <robin@gareus.org>2016-09-18 01:17:05 +0200
commiteaa1dacf5fc9537cfff36e2339bd07aab348aa2e (patch)
tree7be1001f7b83c7fe393f32d18d854bef9924f75e /libs/ardour/luaproc.cc
parenta5169907e537da0f6686d750a4f59e221e77792c (diff)
ensure that Lua DSP scripts are configured (even with 0 channels)
This fixes an issue with dsp_configure not being when there are only MIDI signals at the given insertion point.
Diffstat (limited to 'libs/ardour/luaproc.cc')
-rw-r--r--libs/ardour/luaproc.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc
index 7b676167de..752aa8108f 100644
--- a/libs/ardour/luaproc.cc
+++ b/libs/ardour/luaproc.cc
@@ -61,6 +61,7 @@ LuaProc::LuaProc (AudioEngine& engine,
, _designated_bypass_port (UINT32_MAX)
, _control_data (0)
, _shadow_data (0)
+ , _configured (false)
, _has_midi_input (false)
, _has_midi_output (false)
{
@@ -91,6 +92,7 @@ LuaProc::LuaProc (const LuaProc &other)
, _designated_bypass_port (UINT32_MAX)
, _control_data (0)
, _shadow_data (0)
+ , _configured (false)
, _has_midi_input (false)
, _has_midi_output (false)
{
@@ -526,7 +528,7 @@ LuaProc::configure_io (ChanCount in, ChanCount out)
_info->n_outputs = _selected_out;
// configure the DSP if needed
- if (in != _configured_in || out != _configured_out) {
+ if (in != _configured_in || out != _configured_out || !_configured) {
lua_State* L = lua.getState ();
luabridge::LuaRef lua_dsp_configure = luabridge::getGlobal (L, "dsp_configure");
if (lua_dsp_configure.type () == LUA_TFUNCTION) {
@@ -563,6 +565,7 @@ LuaProc::configure_io (ChanCount in, ChanCount out)
_info->n_inputs = lin;
_info->n_outputs = lout;
}
+ _configured = true;
} catch (luabridge::LuaException const& e) {
PBD::error << "LuaException: " << e.what () << "\n";
#ifndef NDEBUG