Introduce blacklisted plugins to core

This commit is contained in:
Johannes Lorenz
2020-11-08 01:45:27 +01:00
committed by Johannes Lorenz
parent 4fb66542a0
commit 7dd6a39366
4 changed files with 18 additions and 0 deletions

View File

@@ -88,6 +88,8 @@ public:
return s_projectJournal;
}
static bool ignorePluginBlacklist();
#ifdef LMMS_HAVE_LV2
static class Lv2Manager * getLv2Manager()
{

View File

@@ -44,6 +44,7 @@ enum PluginIssueType
portHasNoMax,
featureNotSupported, //!< plugin requires functionality LMMS can't offer
badPortType, //!< port type not supported
blacklisted,
noIssue
};
@@ -60,6 +61,7 @@ public:
: m_issueType(it), m_info(msg)
{
}
PluginIssueType type() const { return m_issueType; }
friend QDebug operator<<(QDebug stream, const PluginIssue& iss);
};

View File

@@ -116,6 +116,18 @@ void LmmsCore::destroy()
delete ConfigManager::inst();
}
bool LmmsCore::ignorePluginBlacklist()
{
const char* envVar = getenv("LMMS_IGNORE_BLACKLIST");
return (envVar && *envVar);
}
float LmmsCore::framesPerTick(sample_rate_t sampleRate)
{
return sampleRate * 60.0f * 4 /

View File

@@ -54,6 +54,8 @@ const char *PluginIssue::msgFor(const PluginIssueType &it)
return "required feature not supported";
case badPortType:
return "unsupported port type";
case blacklisted:
return "blacklisted plugin";
case noIssue:
return nullptr;
}