Allow to cancel LuaAPI::Vamp::analyze
This commit is contained in:
parent
9e11542828
commit
6edb649b53
@ -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));
|
features = _plugin->process (bufs, ::Vamp::RealTime::fromSeconds ((double) pos / _sample_rate));
|
||||||
|
|
||||||
if (cb.type () == LUA_TFUNCTION) {
|
if (cb.type () == LUA_TFUNCTION) {
|
||||||
cb (&features, pos);
|
if (cb (&features, pos)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pos += std::min (_stepsize, to_read);
|
pos += std::min (_stepsize, to_read);
|
||||||
|
Loading…
Reference in New Issue
Block a user