From 6edb649b533bcb5be173d600429e932daf00f743 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 2 Sep 2019 05:18:17 +0200 Subject: [PATCH] Allow to cancel LuaAPI::Vamp::analyze --- libs/ardour/lua_api.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index c6e5a1c228..6f85656fc4 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -830,7 +830,9 @@ LuaAPI::Vamp::analyze (boost::shared_ptr r, uint32_t channel, features = _plugin->process (bufs, ::Vamp::RealTime::fromSeconds ((double) pos / _sample_rate)); if (cb.type () == LUA_TFUNCTION) { - cb (&features, pos); + if (cb (&features, pos)) { + break; + } } pos += std::min (_stepsize, to_read);