More LV2 buf-size features (#6254)
Implement `LV2_BUF_SIZE__boundedBlockLength` and `LV2_BUF_SIZE__fixedBlockLength`.
This commit is contained in:
@@ -69,7 +69,15 @@ void Lv2Features::createFeatureVectors()
|
||||
// create vector of features
|
||||
for(std::pair<const char* const, void*>& pr : m_featureByUri)
|
||||
{
|
||||
Q_ASSERT(pr.second != nullptr);
|
||||
/*
|
||||
If pr.second is nullptr here, this means that the LV2_feature
|
||||
has no "data". If this happens here, this means
|
||||
* either that this feature is static
|
||||
(e.g. LV2_BUF_SIZE__boundedBlockLength)
|
||||
* or that the programmer forgot to use operator[] before feature
|
||||
vector creation (This can be done in
|
||||
Lv2Proc::initPluginSpecificFeatures or in Lv2Features::initCommon)
|
||||
*/
|
||||
m_features.push_back(LV2_Feature { pr.first, pr.second });
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <cstring>
|
||||
#include <lilv/lilv.h>
|
||||
#include <lv2.h>
|
||||
#include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
|
||||
#include <lv2/lv2plug.in/ns/ext/options/options.h>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
@@ -78,6 +79,10 @@ Lv2Manager::Lv2Manager() :
|
||||
m_supportedFeatureURIs.insert(LV2_URID__map);
|
||||
m_supportedFeatureURIs.insert(LV2_URID__unmap);
|
||||
m_supportedFeatureURIs.insert(LV2_OPTIONS__options);
|
||||
// min/max is always passed in the options
|
||||
m_supportedFeatureURIs.insert(LV2_BUF_SIZE__boundedBlockLength);
|
||||
// block length is only changed initially in AudioEngine CTOR
|
||||
m_supportedFeatureURIs.insert(LV2_BUF_SIZE__fixedBlockLength);
|
||||
|
||||
auto supportOpt = [this](Lv2UridCache::Id id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user