11namespace tracktion {
inline namespace engine
20bool isCmajorPatchPluginFormat (
const juce::String& formatName)
22 return formatName == getCmajorPatchPluginFormatName();
31#if TRACKTION_ENABLE_CMAJOR
35#include "cmajor/helpers/cmaj_JUCEPluginFormat.h"
36#include "cmajor/helpers/cmaj_FileBasedCacheDatabase.h"
38namespace tracktion {
inline namespace engine
41std::string getCmajorVersion() {
return cmaj::Library::getVersion(); }
47 if (cacheFolder.createDirectory())
48 return choc::com::create<cmaj::FileBasedCacheDatabase> (cacheFolder.getFullPathName().toStdString(), 100u);
55 jassert (getCmajorPatchPluginFormatName() == cmaj::plugin::JUCEPluginFormat::pluginFormatName);
57 auto onPatchChange = [&engine] (cmaj::plugin::SinglePatchJITPlugin& plugin)
59 for (
auto& edit : engine.getActiveEdits().getEdits())
61 if (
auto p = edit->getPluginCache().getPluginFor (plugin))
63 if (! p->isInitialising())
65 if (
auto ex =
dynamic_cast<ExternalPlugin*
> (p.get()))
67 plugin.suspendProcessing (
true);
68 plugin.fillInPluginDescription (ex->desc);
69 ex->forceFullReinitialise();
70 plugin.suspendProcessing (
false);
84 std::move (onPatchChange),
90 if (
auto ex =
dynamic_cast<ExternalPlugin*
> (&p))
91 if (
auto plugin =
dynamic_cast<cmaj::plugin::SinglePatchJITPlugin*
> (ex->getAudioPluginInstance()))
92 if (plugin->isStatusMessageError)
93 return plugin->statusMessage;
102juce::String getCmajorPatchCompileError (Plugin&) {
return {}; }
File getChildFile(StringRef relativeOrAbsolutePath) const
The Engine is the central class for all tracktion sessions.
PropertyStorage & getPropertyStorage() const
Returns the PropertyStorage user settings customisable XML file.
TemporaryFileManager & getTemporaryFileManager() const
Returns the TemporaryFileManager allowing to handle the default app and user temporary folders.