Add plugin blacklist for buffersize<=32
This commit is contained in:
committed by
Johannes Lorenz
parent
9c46370234
commit
61b612634d
@@ -48,7 +48,7 @@ Lv2Features::Lv2Features()
|
||||
{
|
||||
const Lv2Manager* man = Engine::getLv2Manager();
|
||||
// create (yet empty) map feature URI -> feature
|
||||
for(const char* uri : man->supportedFeatureURIs())
|
||||
for(auto uri : man->supportedFeatureURIs())
|
||||
{
|
||||
m_featureByUri.emplace(uri, nullptr);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ void Lv2Features::initCommon()
|
||||
void Lv2Features::createFeatureVectors()
|
||||
{
|
||||
// create vector of features
|
||||
for(std::pair<const char* const, void*>& pr : m_featureByUri)
|
||||
for(const auto& [uri, feature] : m_featureByUri)
|
||||
{
|
||||
/*
|
||||
If pr.second is nullptr here, this means that the LV2_feature
|
||||
@@ -82,7 +82,7 @@ void Lv2Features::createFeatureVectors()
|
||||
vector creation (This can be done in
|
||||
Lv2Proc::initPluginSpecificFeatures or in Lv2Features::initCommon)
|
||||
*/
|
||||
m_features.push_back(LV2_Feature { pr.first, pr.second });
|
||||
m_features.push_back(LV2_Feature{(const char*)uri.data(), (void*)feature});
|
||||
}
|
||||
|
||||
// create pointer vector (for lilv_plugin_instantiate)
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <lilv/lilv.h>
|
||||
#include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
|
||||
#include <lv2/lv2plug.in/ns/ext/options/options.h>
|
||||
@@ -47,7 +46,7 @@ namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const std::set<const char*, Lv2Manager::CmpStr> Lv2Manager::pluginBlacklist =
|
||||
const std::set<std::string_view> Lv2Manager::pluginBlacklist =
|
||||
{
|
||||
// github.com/calf-studio-gear/calf, #278
|
||||
"http://calf.sourceforge.net/plugins/Analyzer",
|
||||
@@ -138,6 +137,26 @@ const std::set<const char*, Lv2Manager::CmpStr> Lv2Manager::pluginBlacklist =
|
||||
"urn:juced:DrumSynth"
|
||||
};
|
||||
|
||||
const std::set<std::string_view> Lv2Manager::pluginBlacklistBuffersizeLessThan32 =
|
||||
{
|
||||
"http://moddevices.com/plugins/mod-devel/2Voices",
|
||||
"http://moddevices.com/plugins/mod-devel/Capo",
|
||||
"http://moddevices.com/plugins/mod-devel/Drop",
|
||||
"http://moddevices.com/plugins/mod-devel/Harmonizer",
|
||||
"http://moddevices.com/plugins/mod-devel/Harmonizer2",
|
||||
"http://moddevices.com/plugins/mod-devel/HarmonizerCS",
|
||||
"http://moddevices.com/plugins/mod-devel/SuperCapo",
|
||||
"http://moddevices.com/plugins/mod-devel/SuperWhammy",
|
||||
"http://moddevices.com/plugins/mod-devel/Gx2Voices",
|
||||
"http://moddevices.com/plugins/mod-devel/GxCapo",
|
||||
"http://moddevices.com/plugins/mod-devel/GxDrop",
|
||||
"http://moddevices.com/plugins/mod-devel/GxHarmonizer",
|
||||
"http://moddevices.com/plugins/mod-devel/GxHarmonizer2",
|
||||
"http://moddevices.com/plugins/mod-devel/GxHarmonizerCS",
|
||||
"http://moddevices.com/plugins/mod-devel/GxSuperCapo",
|
||||
"http://moddevices.com/plugins/mod-devel/GxSuperWhammy"
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -293,14 +312,6 @@ void Lv2Manager::initPlugins()
|
||||
|
||||
|
||||
|
||||
bool Lv2Manager::CmpStr::operator()(const char *a, const char *b) const
|
||||
{
|
||||
return std::strcmp(a, b) < 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool Lv2Manager::isFeatureSupported(const char *featName) const
|
||||
{
|
||||
return m_supportedFeatureURIs.find(featName) != m_supportedFeatureURIs.end();
|
||||
|
||||
@@ -75,11 +75,19 @@ Plugin::Type Lv2Proc::check(const LilvPlugin *plugin,
|
||||
// TODO: manage a global blacklist outside of the code
|
||||
// for now, this will help
|
||||
// this is only a fix for the meantime
|
||||
const auto& pluginBlacklist = Lv2Manager::getPluginBlacklist();
|
||||
if (!Engine::ignorePluginBlacklist() &&
|
||||
pluginBlacklist.find(pluginUri) != pluginBlacklist.end())
|
||||
if (!Engine::ignorePluginBlacklist())
|
||||
{
|
||||
issues.emplace_back(PluginIssueType::Blacklisted);
|
||||
const auto& pluginBlacklist = Lv2Manager::getPluginBlacklist();
|
||||
const auto& pluginBlacklist32 = Lv2Manager::getPluginBlacklistBuffersizeLessThan32();
|
||||
if(pluginBlacklist.find(pluginUri) != pluginBlacklist.end())
|
||||
{
|
||||
issues.emplace_back(PluginIssueType::Blacklisted);
|
||||
}
|
||||
else if(Engine::audioEngine()->framesPerPeriod() <= 32 &&
|
||||
pluginBlacklist32.find(pluginUri) != pluginBlacklist32.end())
|
||||
{
|
||||
issues.emplace_back(PluginIssueType::Blacklisted); // currently no special blacklist category
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned portNum = 0; portNum < maxPorts; ++portNum)
|
||||
|
||||
Reference in New Issue
Block a user