本文整理汇总了C++中AudioPluginFormat类的典型用法代码示例。如果您正苦于以下问题:C++ AudioPluginFormat类的具体用法?C++ AudioPluginFormat怎么用?C++ AudioPluginFormat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AudioPluginFormat类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scanAndAddFile
bool KnownPluginList::scanAndAddFile (const String& fileOrIdentifier,
const bool dontRescanIfAlreadyInList,
OwnedArray <PluginDescription>& typesFound,
AudioPluginFormat& format)
{
const ScopedLock sl (scanLock);
if (dontRescanIfAlreadyInList
&& getTypeForFile (fileOrIdentifier) != nullptr)
{
bool needsRescanning = false;
for (int i = types.size(); --i >= 0;)
{
const PluginDescription* const d = types.getUnchecked(i);
if (d->fileOrIdentifier == fileOrIdentifier && d->pluginFormatName == format.getName())
{
if (format.pluginNeedsRescanning (*d))
needsRescanning = true;
else
typesFound.add (new PluginDescription (*d));
}
}
if (! needsRescanning)
return false;
}
if (blacklist.contains (fileOrIdentifier))
return false;
OwnedArray <PluginDescription> found;
{
const ScopedUnlock sl2 (scanLock);
if (scanner != nullptr)
{
if (! scanner->findPluginTypesFor (format, found, fileOrIdentifier))
addToBlacklist (fileOrIdentifier);
}
else
{
format.findAllTypesForFile (found, fileOrIdentifier);
}
}
for (int i = 0; i < found.size(); ++i)
{
PluginDescription* const desc = found.getUnchecked(i);
jassert (desc != nullptr);
addType (*desc);
typesFound.add (new PluginDescription (*desc));
}
return found.size() > 0;
}
示例2: scanAndAddFile
bool KnownPluginList::scanAndAddFile (const String& fileOrIdentifier,
const bool dontRescanIfAlreadyInList,
OwnedArray<PluginDescription>& typesFound,
AudioPluginFormat& format)
{
const ScopedLock sl (scanLock);
if (dontRescanIfAlreadyInList
&& getTypeForFile (fileOrIdentifier) != nullptr)
{
bool needsRescanning = false;
ScopedLock lock (typesArrayLock);
for (auto* d : types)
{
if (d->fileOrIdentifier == fileOrIdentifier && d->pluginFormatName == format.getName())
{
if (format.pluginNeedsRescanning (*d))
needsRescanning = true;
else
typesFound.add (new PluginDescription (*d));
}
}
if (! needsRescanning)
return false;
}
if (blacklist.contains (fileOrIdentifier))
return false;
OwnedArray<PluginDescription> found;
{
const ScopedUnlock sl2 (scanLock);
if (scanner != nullptr)
{
if (! scanner->findPluginTypesFor (format, found, fileOrIdentifier))
addToBlacklist (fileOrIdentifier);
}
else
{
format.findAllTypesForFile (found, fileOrIdentifier);
}
}
for (auto* desc : found)
{
jassert (desc != nullptr);
addType (*desc);
typesFound.add (new PluginDescription (*desc));
}
return ! found.isEmpty();
}
示例3: String
AudioPluginFormat* AudioPluginFormatManager::findFormatForDescription (const PluginDescription& description, String& errorMessage) const
{
errorMessage = String();
for (int i = 0; i < formats.size(); ++i)
{
AudioPluginFormat* format;
if ((format = formats.getUnchecked (i))->getName() == description.pluginFormatName
&& format->fileMightContainThisPluginType (description.fileOrIdentifier))
return format;
}
errorMessage = NEEDS_TRANS ("No compatible plug-in format exists for this plug-in");
return nullptr;
}
示例4: isListingUpToDate
bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier,
AudioPluginFormat& formatToUse) const
{
if (getTypeForFile (fileOrIdentifier) == nullptr)
return false;
ScopedLock lock (typesArrayLock);
for (auto* d : types)
if (d->fileOrIdentifier == fileOrIdentifier && formatToUse.pluginNeedsRescanning (*d))
return false;
return true;
}
示例5: isListingUpToDate
bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier,
AudioPluginFormat& formatToUse) const
{
if (getTypeForFile (fileOrIdentifier) == nullptr)
return false;
for (int i = types.size(); --i >= 0;)
{
const PluginDescription* const d = types.getUnchecked(i);
if (d->fileOrIdentifier == fileOrIdentifier
&& formatToUse.pluginNeedsRescanning (*d))
return false;
}
return true;
}
示例6: setLastSearchPath
void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format,
const FileSearchPath& newPath)
{
properties.setValue ("lastPluginScanPath_" + format.getName(), newPath.toString());
}
示例7: getLastSearchPath
FileSearchPath PluginListComponent::getLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format)
{
return FileSearchPath (properties.getValue ("lastPluginScanPath_" + format.getName(),
format.getDefaultLocationsToSearch().toString()));
}