mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 21:26:26 +01:00
honor Vamp Plugin preferred step+block sizes.
This commit is contained in:
parent
485e31f082
commit
d4229da4cf
2 changed files with 12 additions and 2 deletions
|
|
@ -551,7 +551,7 @@ LuaAPI::Vamp::Vamp (const std::string& key, float sample_rate)
|
|||
: _plugin (0)
|
||||
, _sample_rate (sample_rate)
|
||||
, _bufsize (1024)
|
||||
, _stepsize (512)
|
||||
, _stepsize (1024)
|
||||
, _initialized (false)
|
||||
{
|
||||
using namespace ::Vamp::HostExt;
|
||||
|
|
@ -563,6 +563,14 @@ LuaAPI::Vamp::Vamp (const std::string& key, float sample_rate)
|
|||
PBD::error << string_compose (_("VAMP Plugin \"%1\" could not be loaded"), key) << endmsg;
|
||||
throw failed_constructor ();
|
||||
}
|
||||
|
||||
size_t bs = _plugin->getPreferredBlockSize ();
|
||||
size_t ss = _plugin->getPreferredStepSize ();
|
||||
|
||||
if (bs > 0 && ss > 0 && bs <= 8192 && ss <= 8192) {
|
||||
_bufsize = bs;
|
||||
_stepsize = bs;
|
||||
}
|
||||
}
|
||||
|
||||
LuaAPI::Vamp::~Vamp ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue