hack AudioAnalyzer for VAMP Onsetdetect
This works around a bug in OnsetDetector. It requests a buffer of 1114 samples but later FFT bails out if the buffer size is not a power-of-two. Also large buffersizes fail. Work-around: use ADAPT_ALL_SAFE (no buffersize adapter), use a reasonably small buffersize. The current settings work, even though it produces the following warnings (vamp-plugins/OnsetDetect.cpp) WARNING: OnsetDetector::initialise: Possibly sub-optimal step size for this sample rate: 512 (wanted 557) WARNING: OnsetDetector::initialise: Possibly sub-optimal block size for this sample rate: 1024 (wanted 1114) This commit should be reverted once VAMP/QM/aubio is updated/fixed.
This commit is contained in:
parent
d1d266696b
commit
6888436416
@ -64,7 +64,7 @@ AudioAnalyser::initialize_plugin (AnalysisPluginKey key, float sr)
|
|||||||
|
|
||||||
PluginLoader* loader (PluginLoader::getInstance());
|
PluginLoader* loader (PluginLoader::getInstance());
|
||||||
|
|
||||||
plugin = loader->loadPlugin (key, sr, PluginLoader::ADAPT_ALL);
|
plugin = loader->loadPlugin (key, sr, PluginLoader::ADAPT_ALL_SAFE);
|
||||||
|
|
||||||
if (!plugin) {
|
if (!plugin) {
|
||||||
error << string_compose (_("VAMP Plugin \"%1\" could not be loaded"), key) << endmsg;
|
error << string_compose (_("VAMP Plugin \"%1\" could not be loaded"), key) << endmsg;
|
||||||
@ -75,8 +75,8 @@ AudioAnalyser::initialize_plugin (AnalysisPluginKey key, float sr)
|
|||||||
something that makes for efficient disk i/o
|
something that makes for efficient disk i/o
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bufsize = 65536;
|
bufsize = 1024;
|
||||||
stepsize = bufsize;
|
stepsize = 512;
|
||||||
|
|
||||||
if (plugin->getMinChannelCount() > 1) {
|
if (plugin->getMinChannelCount() > 1) {
|
||||||
delete plugin;
|
delete plugin;
|
||||||
|
Loading…
Reference in New Issue
Block a user