summaryrefslogtreecommitdiff
path: root/libs/ardour/lua_api.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-02 05:18:17 +0200
committerRobin Gareus <robin@gareus.org>2019-09-02 05:18:17 +0200
commit6edb649b533bcb5be173d600429e932daf00f743 (patch)
tree1e66b43fe17612891aa13547ef972954036e9ec6 /libs/ardour/lua_api.cc
parent9e1154282864577148e39328fb2242ea957cc34f (diff)
Allow to cancel LuaAPI::Vamp::analyze
Diffstat (limited to 'libs/ardour/lua_api.cc')
-rw-r--r--libs/ardour/lua_api.cc4
1 files changed, 3 insertions, 1 deletions
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<ARDOUR::Readable> 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);