mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed some compiler warnings
This commit is contained in:
parent
f2db4bfba8
commit
cbdf5e6d21
20 changed files with 132 additions and 120 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
companyCopyright="ROLI Ltd.">
|
companyCopyright="ROLI Ltd.">
|
||||||
<EXPORTFORMATS>
|
<EXPORTFORMATS>
|
||||||
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="" rtasFolder="~/SDKs/PT_80_SDK"
|
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="" rtasFolder="~/SDKs/PT_80_SDK"
|
||||||
objCExtraSuffix="M73TRi" extraCompilerFlags="-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi"
|
objCExtraSuffix="M73TRi" extraCompilerFlags="-Wall -Wno-missing-field-initializers -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wundefined-func-template -Wnullable-to-nonnull-conversion"
|
||||||
smallIcon="c97aUr" bigIcon="c97aUr" microphonePermissionNeeded="1">
|
smallIcon="c97aUr" bigIcon="c97aUr" microphonePermissionNeeded="1">
|
||||||
<CONFIGURATIONS>
|
<CONFIGURATIONS>
|
||||||
<CONFIGURATION name="Debug" isDebug="1" targetName="AudioPluginHost"/>
|
<CONFIGURATION name="Debug" isDebug="1" targetName="AudioPluginHost"/>
|
||||||
|
|
|
||||||
|
|
@ -801,7 +801,7 @@
|
||||||
INFOPLIST_PREPROCESS = NO;
|
INFOPLIST_PREPROCESS = NO;
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi";
|
OTHER_CPLUSPLUSFLAGS = "-Wall -Wno-missing-field-initializers -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wundefined-func-template -Wnullable-to-nonnull-conversion";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost;
|
PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost;
|
||||||
PRODUCT_NAME = "AudioPluginHost";
|
PRODUCT_NAME = "AudioPluginHost";
|
||||||
USE_HEADERMAP = NO;
|
USE_HEADERMAP = NO;
|
||||||
|
|
@ -847,7 +847,7 @@
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
LLVM_LTO = YES;
|
LLVM_LTO = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
OTHER_CPLUSPLUSFLAGS = "-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi";
|
OTHER_CPLUSPLUSFLAGS = "-Wall -Wno-missing-field-initializers -Wshadow-all -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Winconsistent-missing-destructor-override -Wshift-sign-overflow -Wundefined-func-template -Wnullable-to-nonnull-conversion";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost;
|
PRODUCT_BUNDLE_IDENTIFIER = com.roli.juce.pluginhost;
|
||||||
PRODUCT_NAME = "AudioPluginHost";
|
PRODUCT_NAME = "AudioPluginHost";
|
||||||
USE_HEADERMAP = NO;
|
USE_HEADERMAP = NO;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class FilterGraph : public FileBasedDocument,
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
FilterGraph (AudioPluginFormatManager&);
|
FilterGraph (AudioPluginFormatManager&);
|
||||||
~FilterGraph();
|
~FilterGraph() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
using NodeID = AudioProcessorGraph::NodeID;
|
using NodeID = AudioProcessorGraph::NodeID;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class FilterIOConfigurationWindow : public AudioProcessorEditor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FilterIOConfigurationWindow (AudioProcessor&);
|
FilterIOConfigurationWindow (AudioProcessor&);
|
||||||
~FilterIOConfigurationWindow();
|
~FilterIOConfigurationWindow() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void paint (Graphics& g) override;
|
void paint (Graphics& g) override;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class InternalPluginFormat : public AudioPluginFormat
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
InternalPluginFormat();
|
InternalPluginFormat();
|
||||||
~InternalPluginFormat() {}
|
~InternalPluginFormat() override {}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
PluginDescription audioInDesc, audioOutDesc, midiInDesc;
|
PluginDescription audioInDesc, audioOutDesc, midiInDesc;
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ struct GraphEditorPanel::FilterComponent : public Component,
|
||||||
FilterComponent (const FilterComponent&) = delete;
|
FilterComponent (const FilterComponent&) = delete;
|
||||||
FilterComponent& operator= (const FilterComponent&) = delete;
|
FilterComponent& operator= (const FilterComponent&) = delete;
|
||||||
|
|
||||||
~FilterComponent()
|
~FilterComponent() override
|
||||||
{
|
{
|
||||||
if (auto f = graph.graph.getNodeForId (pluginID))
|
if (auto f = graph.graph.getNodeForId (pluginID))
|
||||||
{
|
{
|
||||||
|
|
@ -812,7 +812,7 @@ void GraphEditorPanel::updateComponents()
|
||||||
|
|
||||||
for (auto* f : graph.graph.getNodes())
|
for (auto* f : graph.graph.getNodes())
|
||||||
{
|
{
|
||||||
if (getComponentForFilter (f->nodeID) == 0)
|
if (getComponentForFilter (f->nodeID) == nullptr)
|
||||||
{
|
{
|
||||||
auto* comp = nodes.add (new FilterComponent (*this, f->nodeID));
|
auto* comp = nodes.add (new FilterComponent (*this, f->nodeID));
|
||||||
addAndMakeVisible (comp);
|
addAndMakeVisible (comp);
|
||||||
|
|
@ -822,7 +822,7 @@ void GraphEditorPanel::updateComponents()
|
||||||
|
|
||||||
for (auto& c : graph.graph.getConnections())
|
for (auto& c : graph.graph.getConnections())
|
||||||
{
|
{
|
||||||
if (getComponentForConnection (c) == 0)
|
if (getComponentForConnection (c) == nullptr)
|
||||||
{
|
{
|
||||||
auto* comp = connectors.add (new ConnectorComponent (*this));
|
auto* comp = connectors.add (new ConnectorComponent (*this));
|
||||||
addAndMakeVisible (comp);
|
addAndMakeVisible (comp);
|
||||||
|
|
@ -844,8 +844,8 @@ void GraphEditorPanel::showPopupMenu (Point<int> mousePos)
|
||||||
menu->showMenuAsync ({},
|
menu->showMenuAsync ({},
|
||||||
ModalCallbackFunction::create ([this, mousePos] (int r)
|
ModalCallbackFunction::create ([this, mousePos] (int r)
|
||||||
{
|
{
|
||||||
if (auto* mainWindow = findParentComponentOfClass<MainHostWindow>())
|
if (auto* mainWin = findParentComponentOfClass<MainHostWindow>())
|
||||||
if (auto* desc = mainWindow->getChosenType (r))
|
if (auto* desc = mainWin->getChosenType (r))
|
||||||
createNewPlugin (*desc, mousePos);
|
createNewPlugin (*desc, mousePos);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class GraphEditorPanel : public Component,
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GraphEditorPanel (FilterGraph& graph);
|
GraphEditorPanel (FilterGraph& graph);
|
||||||
~GraphEditorPanel();
|
~GraphEditorPanel() override;
|
||||||
|
|
||||||
void createNewPlugin (const PluginDescription&, Point<int> position);
|
void createNewPlugin (const PluginDescription&, Point<int> position);
|
||||||
|
|
||||||
|
|
@ -107,7 +107,7 @@ public:
|
||||||
AudioDeviceManager& deviceManager,
|
AudioDeviceManager& deviceManager,
|
||||||
KnownPluginList& pluginList);
|
KnownPluginList& pluginList);
|
||||||
|
|
||||||
~GraphDocumentComponent();
|
~GraphDocumentComponent() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void createNewPlugin (const PluginDescription&, Point<int> position);
|
void createNewPlugin (const PluginDescription&, Point<int> position);
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public:
|
||||||
setVisible (true);
|
setVisible (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
~PluginListWindow()
|
~PluginListWindow() override
|
||||||
{
|
{
|
||||||
getAppProperties().getUserSettings()->setValue ("listWindowPos", getWindowStateAsString());
|
getAppProperties().getUserSettings()->setValue ("listWindowPos", getWindowStateAsString());
|
||||||
clearContentComponent();
|
clearContentComponent();
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class MainHostWindow : public DocumentWindow,
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
MainHostWindow();
|
MainHostWindow();
|
||||||
~MainHostWindow();
|
~MainHostWindow() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void closeButtonPressed() override;
|
void closeButtonPressed() override;
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,12 @@ class FilterDebugWindow : public AudioProcessorEditor,
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FilterDebugWindow (AudioProcessor& proc)
|
FilterDebugWindow (AudioProcessor& proc)
|
||||||
: AudioProcessorEditor (proc), processor (proc)
|
: AudioProcessorEditor (proc), audioProc (proc)
|
||||||
{
|
{
|
||||||
setSize (500, 200);
|
setSize (500, 200);
|
||||||
addAndMakeVisible (list);
|
addAndMakeVisible (list);
|
||||||
|
|
||||||
for (auto* p : processor.getParameters())
|
for (auto* p : audioProc.getParameters())
|
||||||
p->addListener (this);
|
p->addListener (this);
|
||||||
|
|
||||||
log.add ("Parameter debug log started");
|
log.add ("Parameter debug log started");
|
||||||
|
|
@ -53,7 +53,7 @@ public:
|
||||||
|
|
||||||
void parameterValueChanged (int parameterIndex, float newValue) override
|
void parameterValueChanged (int parameterIndex, float newValue) override
|
||||||
{
|
{
|
||||||
auto* param = processor.getParameters()[parameterIndex];
|
auto* param = audioProc.getParameters()[parameterIndex];
|
||||||
auto value = param->getCurrentValueAsText().quoted() + " (" + String (newValue, 4) + ")";
|
auto value = param->getCurrentValueAsText().quoted() + " (" + String (newValue, 4) + ")";
|
||||||
|
|
||||||
appendToLog ("parameter change", *param, value);
|
appendToLog ("parameter change", *param, value);
|
||||||
|
|
@ -61,7 +61,7 @@ public:
|
||||||
|
|
||||||
void parameterGestureChanged (int parameterIndex, bool gestureIsStarting) override
|
void parameterGestureChanged (int parameterIndex, bool gestureIsStarting) override
|
||||||
{
|
{
|
||||||
auto* param = processor.getParameters()[parameterIndex];
|
auto* param = audioProc.getParameters()[parameterIndex];
|
||||||
appendToLog ("gesture", *param, gestureIsStarting ? "start" : "end");
|
appendToLog ("gesture", *param, gestureIsStarting ? "start" : "end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ private:
|
||||||
StringArray pendingLogEntries;
|
StringArray pendingLogEntries;
|
||||||
CriticalSection pendingLogLock;
|
CriticalSection pendingLogLock;
|
||||||
|
|
||||||
AudioProcessor& processor;
|
AudioProcessor& audioProc;
|
||||||
};
|
};
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
@ -170,7 +170,7 @@ public:
|
||||||
setVisible (true);
|
setVisible (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
~PluginWindow()
|
~PluginWindow() override
|
||||||
{
|
{
|
||||||
clearContentComponent();
|
clearContentComponent();
|
||||||
}
|
}
|
||||||
|
|
@ -287,7 +287,7 @@ private:
|
||||||
owner.addListener (this);
|
owner.addListener (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~PropertyComp()
|
~PropertyComp() override
|
||||||
{
|
{
|
||||||
owner.removeListener (this);
|
owner.removeListener (this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class JUCE_API AudioUnitPluginFormat : public AudioPluginFormat
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
AudioUnitPluginFormat();
|
AudioUnitPluginFormat();
|
||||||
~AudioUnitPluginFormat();
|
~AudioUnitPluginFormat() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
String getName() const override { return "AudioUnit"; }
|
String getName() const override { return "AudioUnit"; }
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ namespace AudioUnitFormatHelpers
|
||||||
desc.componentSubType = stringToOSType (tokens[1]);
|
desc.componentSubType = stringToOSType (tokens[1]);
|
||||||
desc.componentManufacturer = stringToOSType (tokens[2]);
|
desc.componentManufacturer = stringToOSType (tokens[2]);
|
||||||
|
|
||||||
if (AudioComponent comp = AudioComponentFindNext (0, &desc))
|
if (AudioComponent comp = AudioComponentFindNext (nullptr, &desc))
|
||||||
{
|
{
|
||||||
getNameAndManufacturer (comp, name, manufacturer);
|
getNameAndManufacturer (comp, name, manufacturer);
|
||||||
|
|
||||||
|
|
@ -206,17 +206,17 @@ namespace AudioUnitFormatHelpers
|
||||||
|
|
||||||
const char* const utf8 = fileOrIdentifier.toUTF8();
|
const char* const utf8 = fileOrIdentifier.toUTF8();
|
||||||
|
|
||||||
if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (0, (const UInt8*) utf8,
|
if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (nullptr, (const UInt8*) utf8,
|
||||||
(CFIndex) strlen (utf8), file.isDirectory()))
|
(CFIndex) strlen (utf8), file.isDirectory()))
|
||||||
{
|
{
|
||||||
CFBundleRef bundleRef = CFBundleCreate (kCFAllocatorDefault, url);
|
CFBundleRef bundleRef = CFBundleCreate (kCFAllocatorDefault, url);
|
||||||
CFRelease (url);
|
CFRelease (url);
|
||||||
|
|
||||||
if (bundleRef != 0)
|
if (bundleRef != nullptr)
|
||||||
{
|
{
|
||||||
CFTypeRef bundleName = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleName"));
|
CFTypeRef bundleName = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleName"));
|
||||||
|
|
||||||
if (bundleName != 0 && CFGetTypeID (bundleName) == CFStringGetTypeID())
|
if (bundleName != nullptr && CFGetTypeID (bundleName) == CFStringGetTypeID())
|
||||||
name = String::fromCFString ((CFStringRef) bundleName);
|
name = String::fromCFString ((CFStringRef) bundleName);
|
||||||
|
|
||||||
if (name.isEmpty())
|
if (name.isEmpty())
|
||||||
|
|
@ -224,12 +224,12 @@ namespace AudioUnitFormatHelpers
|
||||||
|
|
||||||
CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleVersion"));
|
CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleVersion"));
|
||||||
|
|
||||||
if (versionString != 0 && CFGetTypeID (versionString) == CFStringGetTypeID())
|
if (versionString != nullptr && CFGetTypeID (versionString) == CFStringGetTypeID())
|
||||||
version = String::fromCFString ((CFStringRef) versionString);
|
version = String::fromCFString ((CFStringRef) versionString);
|
||||||
|
|
||||||
CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleGetInfoString"));
|
CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleGetInfoString"));
|
||||||
|
|
||||||
if (manuString != 0 && CFGetTypeID (manuString) == CFStringGetTypeID())
|
if (manuString != nullptr && CFGetTypeID (manuString) == CFStringGetTypeID())
|
||||||
manufacturer = String::fromCFString ((CFStringRef) manuString);
|
manufacturer = String::fromCFString ((CFStringRef) manuString);
|
||||||
|
|
||||||
const ResFileRefNum resFileId = CFBundleOpenBundleResourceMap (bundleRef);
|
const ResFileRefNum resFileId = CFBundleOpenBundleResourceMap (bundleRef);
|
||||||
|
|
@ -256,7 +256,7 @@ namespace AudioUnitFormatHelpers
|
||||||
desc.componentSubType = types[1];
|
desc.componentSubType = types[1];
|
||||||
desc.componentManufacturer = types[2];
|
desc.componentManufacturer = types[2];
|
||||||
|
|
||||||
if (AudioComponent comp = AudioComponentFindNext (0, &desc))
|
if (AudioComponent comp = AudioComponentFindNext (nullptr, &desc))
|
||||||
getNameAndManufacturer (comp, name, manufacturer);
|
getNameAndManufacturer (comp, name, manufacturer);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -506,7 +506,7 @@ public:
|
||||||
auComponent (AudioComponentInstanceGetComponent (au)),
|
auComponent (AudioComponentInstanceGetComponent (au)),
|
||||||
audioUnit (au),
|
audioUnit (au),
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
eventListenerRef (0),
|
eventListenerRef (nullptr),
|
||||||
#endif
|
#endif
|
||||||
midiConcatenator (2048)
|
midiConcatenator (2048)
|
||||||
{
|
{
|
||||||
|
|
@ -529,7 +529,7 @@ public:
|
||||||
updateSupportedLayouts();
|
updateSupportedLayouts();
|
||||||
}
|
}
|
||||||
|
|
||||||
~AudioUnitPluginInstance()
|
~AudioUnitPluginInstance() override
|
||||||
{
|
{
|
||||||
const ScopedLock sl (lock);
|
const ScopedLock sl (lock);
|
||||||
|
|
||||||
|
|
@ -574,10 +574,10 @@ public:
|
||||||
void cleanup()
|
void cleanup()
|
||||||
{
|
{
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
if (eventListenerRef != 0)
|
if (eventListenerRef != nullptr)
|
||||||
{
|
{
|
||||||
AUListenerDispose (eventListenerRef);
|
AUListenerDispose (eventListenerRef);
|
||||||
eventListenerRef = 0;
|
eventListenerRef = nullptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1292,7 +1292,7 @@ public:
|
||||||
|
|
||||||
void getCurrentProgramStateInformation (MemoryBlock& destData) override
|
void getCurrentProgramStateInformation (MemoryBlock& destData) override
|
||||||
{
|
{
|
||||||
CFPropertyListRef propertyList = 0;
|
CFPropertyListRef propertyList = nullptr;
|
||||||
UInt32 sz = sizeof (CFPropertyListRef);
|
UInt32 sz = sizeof (CFPropertyListRef);
|
||||||
|
|
||||||
if (AudioUnitGetProperty (audioUnit,
|
if (AudioUnitGetProperty (audioUnit,
|
||||||
|
|
@ -1303,7 +1303,7 @@ public:
|
||||||
CFWriteStreamRef stream = CFWriteStreamCreateWithAllocatedBuffers (kCFAllocatorDefault, kCFAllocatorDefault);
|
CFWriteStreamRef stream = CFWriteStreamCreateWithAllocatedBuffers (kCFAllocatorDefault, kCFAllocatorDefault);
|
||||||
CFWriteStreamOpen (stream);
|
CFWriteStreamOpen (stream);
|
||||||
|
|
||||||
CFIndex bytesWritten = CFPropertyListWriteToStream (propertyList, stream, kCFPropertyListBinaryFormat_v1_0, 0);
|
CFIndex bytesWritten = CFPropertyListWriteToStream (propertyList, stream, kCFPropertyListBinaryFormat_v1_0, nullptr);
|
||||||
CFWriteStreamClose (stream);
|
CFWriteStreamClose (stream);
|
||||||
|
|
||||||
CFDataRef data = (CFDataRef) CFWriteStreamCopyProperty (stream, kCFStreamPropertyDataWritten);
|
CFDataRef data = (CFDataRef) CFWriteStreamCopyProperty (stream, kCFStreamPropertyDataWritten);
|
||||||
|
|
@ -1330,10 +1330,10 @@ public:
|
||||||
|
|
||||||
CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0;
|
CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0;
|
||||||
CFPropertyListRef propertyList = CFPropertyListCreateFromStream (kCFAllocatorDefault, stream, 0,
|
CFPropertyListRef propertyList = CFPropertyListCreateFromStream (kCFAllocatorDefault, stream, 0,
|
||||||
kCFPropertyListImmutable, &format, 0);
|
kCFPropertyListImmutable, &format, nullptr);
|
||||||
CFRelease (stream);
|
CFRelease (stream);
|
||||||
|
|
||||||
if (propertyList != 0)
|
if (propertyList != nullptr)
|
||||||
{
|
{
|
||||||
AudioUnitSetProperty (audioUnit, kAudioUnitProperty_ClassInfo, kAudioUnitScope_Global,
|
AudioUnitSetProperty (audioUnit, kAudioUnitProperty_ClassInfo, kAudioUnitScope_Global,
|
||||||
0, &propertyList, sizeof (propertyList));
|
0, &propertyList, sizeof (propertyList));
|
||||||
|
|
@ -1443,7 +1443,7 @@ public:
|
||||||
auto getClumpName = [this, info]
|
auto getClumpName = [this, info]
|
||||||
{
|
{
|
||||||
AudioUnitParameterNameInfo clumpNameInfo;
|
AudioUnitParameterNameInfo clumpNameInfo;
|
||||||
UInt32 sz = sizeof (clumpNameInfo);
|
UInt32 clumpSz = sizeof (clumpNameInfo);
|
||||||
zerostruct (clumpNameInfo);
|
zerostruct (clumpNameInfo);
|
||||||
clumpNameInfo.inID = info.clumpID;
|
clumpNameInfo.inID = info.clumpID;
|
||||||
clumpNameInfo.inDesiredLength = (SInt32) 256;
|
clumpNameInfo.inDesiredLength = (SInt32) 256;
|
||||||
|
|
@ -1453,7 +1453,7 @@ public:
|
||||||
kAudioUnitScope_Global,
|
kAudioUnitScope_Global,
|
||||||
0,
|
0,
|
||||||
&clumpNameInfo,
|
&clumpNameInfo,
|
||||||
&sz) == noErr)
|
&clumpSz) == noErr)
|
||||||
return String::fromCFString (clumpNameInfo.outName);
|
return String::fromCFString (clumpNameInfo.outName);
|
||||||
|
|
||||||
return String (info.clumpID);
|
return String (info.clumpID);
|
||||||
|
|
@ -1606,11 +1606,11 @@ private:
|
||||||
{
|
{
|
||||||
String lowercaseText (text.toLowerCase());
|
String lowercaseText (text.toLowerCase());
|
||||||
|
|
||||||
for (auto& testText : onStrings)
|
for (auto& testText : auOnStrings)
|
||||||
if (lowercaseText == testText)
|
if (lowercaseText == testText)
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
|
|
||||||
for (auto& testText : offStrings)
|
for (auto& testText : auOffStrings)
|
||||||
if (lowercaseText == testText)
|
if (lowercaseText == testText)
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
||||||
|
|
@ -1628,8 +1628,8 @@ private:
|
||||||
String getLabel() const override { return {}; }
|
String getLabel() const override { return {}; }
|
||||||
|
|
||||||
AudioUnitPluginInstance& parent;
|
AudioUnitPluginInstance& parent;
|
||||||
const StringArray onStrings { TRANS("on"), TRANS("yes"), TRANS("true") };
|
const StringArray auOnStrings { TRANS("on"), TRANS("yes"), TRANS("true") };
|
||||||
const StringArray offStrings { TRANS("off"), TRANS("no"), TRANS("false") };
|
const StringArray auOffStrings { TRANS("off"), TRANS("no"), TRANS("false") };
|
||||||
const StringArray values { TRANS("Off"), TRANS("On") };
|
const StringArray values { TRANS("Off"), TRANS("On") };
|
||||||
|
|
||||||
bool currentValue = false;
|
bool currentValue = false;
|
||||||
|
|
@ -2262,7 +2262,7 @@ public:
|
||||||
createView (createGenericViewIfNeeded);
|
createView (createGenericViewIfNeeded);
|
||||||
}
|
}
|
||||||
|
|
||||||
~AudioUnitPluginWindowCocoa()
|
~AudioUnitPluginWindowCocoa() override
|
||||||
{
|
{
|
||||||
if (wrapper.getView() != nil)
|
if (wrapper.getView() != nil)
|
||||||
{
|
{
|
||||||
|
|
@ -2340,7 +2340,7 @@ private:
|
||||||
{
|
{
|
||||||
NSString* viewClassName = (NSString*) (info->mCocoaAUViewClass[0]);
|
NSString* viewClassName = (NSString*) (info->mCocoaAUViewClass[0]);
|
||||||
CFStringRef path = CFURLCopyPath (info->mCocoaAUViewBundleLocation);
|
CFStringRef path = CFURLCopyPath (info->mCocoaAUViewBundleLocation);
|
||||||
NSString* unescapedPath = (NSString*) CFURLCreateStringByReplacingPercentEscapes (0, path, CFSTR (""));
|
NSString* unescapedPath = (NSString*) CFURLCreateStringByReplacingPercentEscapes (nullptr, path, CFSTR (""));
|
||||||
CFRelease (path);
|
CFRelease (path);
|
||||||
NSBundle* viewBundle = [NSBundle bundleWithPath: [unescapedPath autorelease]];
|
NSBundle* viewBundle = [NSBundle bundleWithPath: [unescapedPath autorelease]];
|
||||||
Class viewClass = [viewBundle classNamed: viewClassName];
|
Class viewClass = [viewBundle classNamed: viewClassName];
|
||||||
|
|
@ -2662,7 +2662,7 @@ void AudioUnitPluginFormat::createPluginInstance (const PluginDescription& desc,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((auComponent = AudioComponentFindNext (0, &componentDesc)) == nullptr)
|
if ((auComponent = AudioComponentFindNext (nullptr, &componentDesc)) == nullptr)
|
||||||
{
|
{
|
||||||
callback (userData, nullptr, errMessage);
|
callback (userData, nullptr, errMessage);
|
||||||
return;
|
return;
|
||||||
|
|
@ -2761,7 +2761,7 @@ bool AudioUnitPluginFormat::requiresUnblockedMessageThreadDuringCreation (const
|
||||||
|| AudioUnitFormatHelpers::getComponentDescFromFile (desc.fileOrIdentifier, componentDesc,
|
|| AudioUnitFormatHelpers::getComponentDescFromFile (desc.fileOrIdentifier, componentDesc,
|
||||||
pluginName, version, manufacturer))
|
pluginName, version, manufacturer))
|
||||||
{
|
{
|
||||||
if (AudioComponent auComp = AudioComponentFindNext (0, &componentDesc))
|
if (AudioComponent auComp = AudioComponentFindNext (nullptr, &componentDesc))
|
||||||
if (AudioComponentGetDescription (auComp, &componentDesc) == noErr)
|
if (AudioComponentGetDescription (auComp, &componentDesc) == noErr)
|
||||||
return ((componentDesc.componentFlags & kAudioComponentFlag_IsV3AudioUnit) != 0);
|
return ((componentDesc.componentFlags & kAudioComponentFlag_IsV3AudioUnit) != 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,15 @@
|
||||||
#if __has_warning("-Wcomma")
|
#if __has_warning("-Wcomma")
|
||||||
#pragma clang diagnostic ignored "-Wcomma"
|
#pragma clang diagnostic ignored "-Wcomma"
|
||||||
#endif
|
#endif
|
||||||
|
#if __has_warning("-Wzero-as-null-pointer-constant")
|
||||||
|
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||||
|
#endif
|
||||||
|
#if __has_warning("-Winconsistent-missing-destructor-override")
|
||||||
|
#pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
|
||||||
|
#endif
|
||||||
|
#if __has_warning("-Wcast-align")
|
||||||
|
#pragma clang diagnostic ignored "-Wcast-align"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef DEVELOPMENT
|
#undef DEVELOPMENT
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,17 @@ static int warnOnFailure (int result) noexcept
|
||||||
DBG (message);
|
DBG (message);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int warnOnFailureIfImplemented (int result) noexcept
|
||||||
|
{
|
||||||
|
if (result != kResultOk && result != kNotImplemented)
|
||||||
|
return warnOnFailure (result);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#define warnOnFailure(x) x
|
#define warnOnFailure(x) x
|
||||||
|
#define warnOnFailureIfImplemented(x) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
@ -949,7 +958,7 @@ private:
|
||||||
const File file (filePath);
|
const File file (filePath);
|
||||||
const char* const utf8 = file.getFullPathName().toRawUTF8();
|
const char* const utf8 = file.getFullPathName().toRawUTF8();
|
||||||
|
|
||||||
if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (0, (const UInt8*) utf8, (CFIndex) std::strlen (utf8), file.isDirectory()))
|
if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (nullptr, (const UInt8*) utf8, (CFIndex) std::strlen (utf8), file.isDirectory()))
|
||||||
{
|
{
|
||||||
bundleRef = CFBundleCreate (kCFAllocatorDefault, url);
|
bundleRef = CFBundleCreate (kCFAllocatorDefault, url);
|
||||||
CFRelease (url);
|
CFRelease (url);
|
||||||
|
|
@ -1131,7 +1140,7 @@ struct VST3PluginWindow : public AudioProcessorEditor,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~VST3PluginWindow()
|
~VST3PluginWindow() override
|
||||||
{
|
{
|
||||||
warnOnFailure (view->removed());
|
warnOnFailure (view->removed());
|
||||||
warnOnFailure (view->setFrame (nullptr));
|
warnOnFailure (view->setFrame (nullptr));
|
||||||
|
|
@ -1716,7 +1725,7 @@ public:
|
||||||
holder->host->setPlugin (this);
|
holder->host->setPlugin (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~VST3PluginInstance()
|
~VST3PluginInstance() override
|
||||||
{
|
{
|
||||||
jassert (getActiveEditor() == nullptr); // You must delete any editors before deleting the plugin instance!
|
jassert (getActiveEditor() == nullptr); // You must delete any editors before deleting the plugin instance!
|
||||||
|
|
||||||
|
|
@ -1886,10 +1895,7 @@ public:
|
||||||
cachedBusLayouts = getBusesLayout();
|
cachedBusLayouts = getBusesLayout();
|
||||||
|
|
||||||
warnOnFailure (holder->component->setActive (true));
|
warnOnFailure (holder->component->setActive (true));
|
||||||
auto result = processor->setProcessing (true);
|
warnOnFailureIfImplemented (processor->setProcessing (true));
|
||||||
|
|
||||||
if (result != kResultOk && result != kNotImplemented)
|
|
||||||
warnOnFailure (result);
|
|
||||||
|
|
||||||
isActive = true;
|
isActive = true;
|
||||||
}
|
}
|
||||||
|
|
@ -1904,12 +1910,7 @@ public:
|
||||||
setStateForAllMidiBuses (false);
|
setStateForAllMidiBuses (false);
|
||||||
|
|
||||||
if (processor != nullptr)
|
if (processor != nullptr)
|
||||||
{
|
warnOnFailureIfImplemented (processor->setProcessing (false));
|
||||||
auto result = processor->setProcessing (false);
|
|
||||||
|
|
||||||
if (result != kResultOk && result != kNotImplemented)
|
|
||||||
warnOnFailure (result);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (holder->component != nullptr)
|
if (holder->component != nullptr)
|
||||||
warnOnFailure (holder->component->setActive (false));
|
warnOnFailure (holder->component->setActive (false));
|
||||||
|
|
@ -2626,15 +2627,8 @@ private:
|
||||||
Steinberg::MemoryStream stream;
|
Steinberg::MemoryStream stream;
|
||||||
|
|
||||||
if (holder->component->getState (&stream) == kResultTrue)
|
if (holder->component->getState (&stream) == kResultTrue)
|
||||||
{
|
|
||||||
if (stream.seek (0, Steinberg::IBStream::kIBSeekSet, nullptr) == kResultTrue)
|
if (stream.seek (0, Steinberg::IBStream::kIBSeekSet, nullptr) == kResultTrue)
|
||||||
{
|
warnOnFailureIfImplemented (editController->setComponentState (&stream));
|
||||||
auto result = editController->setComponentState (&stream);
|
|
||||||
|
|
||||||
if (result != kResultOk && result != kNotImplemented)
|
|
||||||
warnOnFailure (result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void grabInformationObjects()
|
void grabInformationObjects()
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public:
|
||||||
VST3PluginFormat();
|
VST3PluginFormat();
|
||||||
|
|
||||||
/** Destructor */
|
/** Destructor */
|
||||||
~VST3PluginFormat();
|
~VST3PluginFormat() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Attempts to reload a VST3 plugin's state from some preset file data.
|
/** Attempts to reload a VST3 plugin's state from some preset file data.
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,12 @@
|
||||||
#define __cdecl
|
#define __cdecl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if JUCE_CLANG
|
||||||
|
#if __has_warning("-Wzero-as-null-pointer-constant")
|
||||||
|
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define VST_FORCE_DEPRECATED 0
|
#define VST_FORCE_DEPRECATED 0
|
||||||
#define JUCE_VSTINTERFACE_H_INCLUDED 1
|
#define JUCE_VSTINTERFACE_H_INCLUDED 1
|
||||||
|
|
||||||
|
|
@ -207,7 +213,7 @@ namespace
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
static bool makeFSRefFromPath (FSRef* destFSRef, const String& path)
|
static bool makeFSRefFromPath (FSRef* destFSRef, const String& path)
|
||||||
{
|
{
|
||||||
return FSPathMakeRef (reinterpret_cast<const UInt8*> (path.toRawUTF8()), destFSRef, 0) == noErr;
|
return FSPathMakeRef (reinterpret_cast<const UInt8*> (path.toRawUTF8()), destFSRef, nullptr) == noErr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -630,7 +636,7 @@ struct ModuleHandle : public ReferenceCountedObject
|
||||||
#elif JUCE_MAC
|
#elif JUCE_MAC
|
||||||
FSRef ref;
|
FSRef ref;
|
||||||
makeFSRefFromPath (&ref, f.getParentDirectory().getFullPathName());
|
makeFSRefFromPath (&ref, f.getParentDirectory().getFullPathName());
|
||||||
FSGetCatalogInfo (&ref, kFSCatInfoNone, 0, 0, &parentDirFSSpec, 0);
|
FSGetCatalogInfo (&ref, kFSCatInfoNone, nullptr, nullptr, &parentDirFSSpec, nullptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -730,13 +736,13 @@ struct ModuleHandle : public ReferenceCountedObject
|
||||||
{
|
{
|
||||||
auto* utf8 = file.getFullPathName().toRawUTF8();
|
auto* utf8 = file.getFullPathName().toRawUTF8();
|
||||||
|
|
||||||
if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (0, (const UInt8*) utf8,
|
if (CFURLRef url = CFURLCreateFromFileSystemRepresentation (nullptr, (const UInt8*) utf8,
|
||||||
(CFIndex) strlen (utf8), file.isDirectory()))
|
(CFIndex) strlen (utf8), file.isDirectory()))
|
||||||
{
|
{
|
||||||
bundleRef = CFBundleCreate (kCFAllocatorDefault, url);
|
bundleRef = CFBundleCreate (kCFAllocatorDefault, url);
|
||||||
CFRelease (url);
|
CFRelease (url);
|
||||||
|
|
||||||
if (bundleRef != 0)
|
if (bundleRef != nullptr)
|
||||||
{
|
{
|
||||||
if (CFBundleLoadExecutable (bundleRef))
|
if (CFBundleLoadExecutable (bundleRef))
|
||||||
{
|
{
|
||||||
|
|
@ -785,7 +791,7 @@ struct ModuleHandle : public ReferenceCountedObject
|
||||||
{
|
{
|
||||||
CFBundleUnloadExecutable (bundleRef);
|
CFBundleUnloadExecutable (bundleRef);
|
||||||
CFRelease (bundleRef);
|
CFRelease (bundleRef);
|
||||||
bundleRef = 0;
|
bundleRef = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -796,7 +802,7 @@ struct ModuleHandle : public ReferenceCountedObject
|
||||||
|
|
||||||
void close()
|
void close()
|
||||||
{
|
{
|
||||||
if (bundleRef != 0)
|
if (bundleRef != nullptr)
|
||||||
{
|
{
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
CFBundleCloseBundleResourceMap (bundleRef, resFileId);
|
CFBundleCloseBundleResourceMap (bundleRef, resFileId);
|
||||||
|
|
@ -812,7 +818,7 @@ struct ModuleHandle : public ReferenceCountedObject
|
||||||
|
|
||||||
void closeEffect (Vst2::AEffect* eff)
|
void closeEffect (Vst2::AEffect* eff)
|
||||||
{
|
{
|
||||||
eff->dispatcher (eff, Vst2::effClose, 0, 0, 0, 0);
|
eff->dispatcher (eff, Vst2::effClose, 0, 0, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1006,7 +1012,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
Array<String> shortParamNames;
|
Array<String> shortParamNames;
|
||||||
float defaultValue = 0;
|
float defaultValue = 0;
|
||||||
String label;
|
String label;
|
||||||
bool isAutomatable = dispatch (Vst2::effCanBeAutomated, i, 0, 0, 0) != 0;
|
bool isAutomatable = dispatch (Vst2::effCanBeAutomated, i, 0, nullptr, 0) != 0;
|
||||||
bool isDiscrete = false;
|
bool isDiscrete = false;
|
||||||
int numSteps = AudioProcessor::getDefaultNumParameterSteps();
|
int numSteps = AudioProcessor::getDefaultNumParameterSteps();
|
||||||
bool isBoolSwitch = false;
|
bool isBoolSwitch = false;
|
||||||
|
|
@ -1081,7 +1087,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
setRateAndBufferSizeDetails (sampleRateToUse, blockSizeToUse);
|
setRateAndBufferSizeDetails (sampleRateToUse, blockSizeToUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
~VSTPluginInstance()
|
~VSTPluginInstance() override
|
||||||
{
|
{
|
||||||
if (vstEffect != nullptr && vstEffect->magic == 0x56737450 /* 'VstP' */)
|
if (vstEffect != nullptr && vstEffect->magic == 0x56737450 /* 'VstP' */)
|
||||||
{
|
{
|
||||||
|
|
@ -1143,14 +1149,14 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
{
|
{
|
||||||
newEffect->resvd2 = 0;
|
newEffect->resvd2 = 0;
|
||||||
|
|
||||||
newEffect->dispatcher (newEffect, Vst2::effIdentify, 0, 0, 0, 0);
|
newEffect->dispatcher (newEffect, Vst2::effIdentify, 0, 0, nullptr, 0);
|
||||||
|
|
||||||
auto blockSize = jmax (32, initialBlockSize);
|
auto blockSize = jmax (32, initialBlockSize);
|
||||||
|
|
||||||
newEffect->dispatcher (newEffect, Vst2::effSetSampleRate, 0, 0, 0, static_cast<float> (initialSampleRate));
|
newEffect->dispatcher (newEffect, Vst2::effSetSampleRate, 0, 0, nullptr, static_cast<float> (initialSampleRate));
|
||||||
newEffect->dispatcher (newEffect, Vst2::effSetBlockSize, 0, blockSize, 0, 0);
|
newEffect->dispatcher (newEffect, Vst2::effSetBlockSize, 0, blockSize, nullptr, 0);
|
||||||
|
|
||||||
newEffect->dispatcher (newEffect, Vst2::effOpen, 0, 0, 0, 0);
|
newEffect->dispatcher (newEffect, Vst2::effOpen, 0, 0, nullptr, 0);
|
||||||
BusesProperties ioConfig = queryBusIO (newEffect);
|
BusesProperties ioConfig = queryBusIO (newEffect);
|
||||||
|
|
||||||
return new VSTPluginInstance (newModule, ioConfig, newEffect, initialSampleRate, blockSize);
|
return new VSTPluginInstance (newModule, ioConfig, newEffect, initialSampleRate, blockSize);
|
||||||
|
|
@ -1223,25 +1229,25 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
|
|
||||||
setRateAndBufferSizeDetails (initialSampleRate, initialBlockSize);
|
setRateAndBufferSizeDetails (initialSampleRate, initialBlockSize);
|
||||||
|
|
||||||
dispatch (Vst2::effIdentify, 0, 0, 0, 0);
|
dispatch (Vst2::effIdentify, 0, 0, nullptr, 0);
|
||||||
|
|
||||||
if (getSampleRate() > 0)
|
if (getSampleRate() > 0)
|
||||||
dispatch (Vst2::effSetSampleRate, 0, 0, 0, (float) getSampleRate());
|
dispatch (Vst2::effSetSampleRate, 0, 0, nullptr, (float) getSampleRate());
|
||||||
|
|
||||||
if (getBlockSize() > 0)
|
if (getBlockSize() > 0)
|
||||||
dispatch (Vst2::effSetBlockSize, 0, jmax (32, getBlockSize()), 0, 0);
|
dispatch (Vst2::effSetBlockSize, 0, jmax (32, getBlockSize()), nullptr, 0);
|
||||||
|
|
||||||
dispatch (Vst2::effOpen, 0, 0, 0, 0);
|
dispatch (Vst2::effOpen, 0, 0, nullptr, 0);
|
||||||
|
|
||||||
setRateAndBufferSizeDetails (getSampleRate(), getBlockSize());
|
setRateAndBufferSizeDetails (getSampleRate(), getBlockSize());
|
||||||
|
|
||||||
if (getNumPrograms() > 1)
|
if (getNumPrograms() > 1)
|
||||||
setCurrentProgram (0);
|
setCurrentProgram (0);
|
||||||
else
|
else
|
||||||
dispatch (Vst2::effSetProgram, 0, 0, 0, 0);
|
dispatch (Vst2::effSetProgram, 0, 0, nullptr, 0);
|
||||||
|
|
||||||
for (int i = vstEffect->numInputs; --i >= 0;) dispatch (Vst2::effConnectInput, i, 1, 0, 0);
|
for (int i = vstEffect->numInputs; --i >= 0;) dispatch (Vst2::effConnectInput, i, 1, nullptr, 0);
|
||||||
for (int i = vstEffect->numOutputs; --i >= 0;) dispatch (Vst2::effConnectOutput, i, 1, 0, 0);
|
for (int i = vstEffect->numOutputs; --i >= 0;) dispatch (Vst2::effConnectOutput, i, 1, nullptr, 0);
|
||||||
|
|
||||||
if (getVstCategory() != Vst2::kPlugCategShell) // (workaround for Waves 5 plugins which crash during this call)
|
if (getVstCategory() != Vst2::kPlugCategShell) // (workaround for Waves 5 plugins which crash during this call)
|
||||||
updateStoredProgramNames();
|
updateStoredProgramNames();
|
||||||
|
|
@ -1293,7 +1299,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
if ((vstEffect->flags & Vst2::effFlagsNoSoundInStop) != 0)
|
if ((vstEffect->flags & Vst2::effFlagsNoSoundInStop) != 0)
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|
||||||
auto tailSize = dispatch (Vst2::effGetTailSize, 0, 0, 0, 0);
|
auto tailSize = dispatch (Vst2::effGetTailSize, 0, 0, nullptr, 0);
|
||||||
auto sampleRate = getSampleRate();
|
auto sampleRate = getSampleRate();
|
||||||
|
|
||||||
// remain backward compatible with old JUCE plug-ins: anything larger
|
// remain backward compatible with old JUCE plug-ins: anything larger
|
||||||
|
|
@ -1313,7 +1319,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
bool producesMidi() const override { return pluginCanDo ("sendVstMidiEvent") > 0; }
|
bool producesMidi() const override { return pluginCanDo ("sendVstMidiEvent") > 0; }
|
||||||
bool supportsMPE() const override { return pluginCanDo ("MPE") > 0; }
|
bool supportsMPE() const override { return pluginCanDo ("MPE") > 0; }
|
||||||
|
|
||||||
Vst2::VstPlugCategory getVstCategory() const noexcept { return (Vst2::VstPlugCategory) dispatch (Vst2::effGetPlugCategory, 0, 0, 0, 0); }
|
Vst2::VstPlugCategory getVstCategory() const noexcept { return (Vst2::VstPlugCategory) dispatch (Vst2::effGetPlugCategory, 0, 0, nullptr, 0); }
|
||||||
|
|
||||||
int pluginCanDo (const char* text) const { return (int) dispatch (Vst2::effCanDo, 0, 0, (void*) text, 0); }
|
int pluginCanDo (const char* text) const { return (int) dispatch (Vst2::effCanDo, 0, 0, (void*) text, 0); }
|
||||||
|
|
||||||
|
|
@ -1355,15 +1361,15 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
|
|
||||||
incomingMidi.clear();
|
incomingMidi.clear();
|
||||||
|
|
||||||
dispatch (Vst2::effSetSampleRate, 0, 0, 0, (float) rate);
|
dispatch (Vst2::effSetSampleRate, 0, 0, nullptr, (float) rate);
|
||||||
dispatch (Vst2::effSetBlockSize, 0, jmax (16, samplesPerBlockExpected), 0, 0);
|
dispatch (Vst2::effSetBlockSize, 0, jmax (16, samplesPerBlockExpected), nullptr, 0);
|
||||||
|
|
||||||
if (supportsDoublePrecisionProcessing())
|
if (supportsDoublePrecisionProcessing())
|
||||||
{
|
{
|
||||||
int32 vstPrecision = isUsingDoublePrecision() ? Vst2::kVstProcessPrecision64
|
int32 vstPrecision = isUsingDoublePrecision() ? Vst2::kVstProcessPrecision64
|
||||||
: Vst2::kVstProcessPrecision32;
|
: Vst2::kVstProcessPrecision32;
|
||||||
|
|
||||||
dispatch (Vst2::effSetProcessPrecision, 0, (pointer_sized_int) vstPrecision, 0, 0);
|
dispatch (Vst2::effSetProcessPrecision, 0, (pointer_sized_int) vstPrecision, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto maxChannels = jmax (1, jmax (vstEffect->numInputs, vstEffect->numOutputs));
|
auto maxChannels = jmax (1, jmax (vstEffect->numInputs, vstEffect->numOutputs));
|
||||||
|
|
@ -1390,7 +1396,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch (Vst2::effStartProcess, 0, 0, 0, 0);
|
dispatch (Vst2::effStartProcess, 0, 0, nullptr, 0);
|
||||||
|
|
||||||
setLatencySamples (vstEffect->initialDelay);
|
setLatencySamples (vstEffect->initialDelay);
|
||||||
}
|
}
|
||||||
|
|
@ -1400,7 +1406,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
{
|
{
|
||||||
if (initialised)
|
if (initialised)
|
||||||
{
|
{
|
||||||
dispatch (Vst2::effStopProcess, 0, 0, 0, 0);
|
dispatch (Vst2::effStopProcess, 0, 0, nullptr, 0);
|
||||||
setPower (false);
|
setPower (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1544,12 +1550,12 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
int getNumPrograms() override { return vstEffect != nullptr ? jmax (0, vstEffect->numPrograms) : 0; }
|
int getNumPrograms() override { return vstEffect != nullptr ? jmax (0, vstEffect->numPrograms) : 0; }
|
||||||
|
|
||||||
// NB: some plugs return negative numbers from this function.
|
// NB: some plugs return negative numbers from this function.
|
||||||
int getCurrentProgram() override { return (int) dispatch (Vst2::effGetProgram, 0, 0, 0, 0); }
|
int getCurrentProgram() override { return (int) dispatch (Vst2::effGetProgram, 0, 0, nullptr, 0); }
|
||||||
|
|
||||||
void setCurrentProgram (int newIndex) override
|
void setCurrentProgram (int newIndex) override
|
||||||
{
|
{
|
||||||
if (getNumPrograms() > 0 && newIndex != getCurrentProgram())
|
if (getNumPrograms() > 0 && newIndex != getCurrentProgram())
|
||||||
dispatch (Vst2::effSetProgram, 0, jlimit (0, getNumPrograms() - 1, newIndex), 0, 0);
|
dispatch (Vst2::effSetProgram, 0, jlimit (0, getNumPrograms() - 1, newIndex), nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const String getProgramName (int index) override
|
const String getProgramName (int index) override
|
||||||
|
|
@ -1594,7 +1600,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void timerCallback() override
|
void timerCallback() override
|
||||||
{
|
{
|
||||||
if (dispatch (Vst2::effIdle, 0, 0, 0, 0) == 0)
|
if (dispatch (Vst2::effIdle, 0, 0, nullptr, 0) == 0)
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1979,8 +1985,8 @@ private:
|
||||||
{
|
{
|
||||||
VST2BypassParameter (VSTPluginInstance& effectToUse)
|
VST2BypassParameter (VSTPluginInstance& effectToUse)
|
||||||
: parent (effectToUse),
|
: parent (effectToUse),
|
||||||
onStrings (TRANS("on"), TRANS("yes"), TRANS("true")),
|
vstOnStrings (TRANS("on"), TRANS("yes"), TRANS("true")),
|
||||||
offStrings (TRANS("off"), TRANS("no"), TRANS("false")),
|
vstOffStrings (TRANS("off"), TRANS("no"), TRANS("false")),
|
||||||
values (TRANS("Off"), TRANS("On"))
|
values (TRANS("Off"), TRANS("On"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -1997,11 +2003,11 @@ private:
|
||||||
{
|
{
|
||||||
String lowercaseText (text.toLowerCase());
|
String lowercaseText (text.toLowerCase());
|
||||||
|
|
||||||
for (auto& testText : onStrings)
|
for (auto& testText : vstOnStrings)
|
||||||
if (lowercaseText == testText)
|
if (lowercaseText == testText)
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
|
|
||||||
for (auto& testText : offStrings)
|
for (auto& testText : vstOffStrings)
|
||||||
if (lowercaseText == testText)
|
if (lowercaseText == testText)
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
||||||
|
|
@ -2021,7 +2027,7 @@ private:
|
||||||
|
|
||||||
VSTPluginInstance& parent;
|
VSTPluginInstance& parent;
|
||||||
bool currentValue = false;
|
bool currentValue = false;
|
||||||
StringArray onStrings, offStrings, values;
|
StringArray vstOnStrings, vstOffStrings, values;
|
||||||
};
|
};
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
@ -2098,7 +2104,7 @@ private:
|
||||||
|
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
if (getActiveEditor() != nullptr)
|
if (getActiveEditor() != nullptr)
|
||||||
dispatch (Vst2::effEditIdle, 0, 0, 0, 0);
|
dispatch (Vst2::effEditIdle, 0, 0, nullptr, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Timer::callPendingTimersSynchronously();
|
Timer::callPendingTimersSynchronously();
|
||||||
|
|
@ -2629,7 +2635,7 @@ private:
|
||||||
|
|
||||||
String getVersion() const
|
String getVersion() const
|
||||||
{
|
{
|
||||||
auto v = (unsigned int) dispatch (Vst2::effGetVendorVersion, 0, 0, 0, 0);
|
auto v = (unsigned int) dispatch (Vst2::effGetVendorVersion, 0, 0, nullptr, 0);
|
||||||
|
|
||||||
String s;
|
String s;
|
||||||
|
|
||||||
|
|
@ -2702,7 +2708,7 @@ private:
|
||||||
|
|
||||||
void setPower (const bool on)
|
void setPower (const bool on)
|
||||||
{
|
{
|
||||||
dispatch (Vst2::effMainsChanged, 0, on ? 1 : 0, 0, 0);
|
dispatch (Vst2::effMainsChanged, 0, on ? 1 : 0, nullptr, 0);
|
||||||
isPowerOn = on;
|
isPowerOn = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2775,7 +2781,7 @@ public:
|
||||||
setVisible (true);
|
setVisible (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
~VSTPluginWindow()
|
~VSTPluginWindow() override
|
||||||
{
|
{
|
||||||
closePluginWindow();
|
closePluginWindow();
|
||||||
|
|
||||||
|
|
@ -2958,7 +2964,7 @@ public:
|
||||||
if (! reentrantGuard)
|
if (! reentrantGuard)
|
||||||
{
|
{
|
||||||
reentrantGuard = true;
|
reentrantGuard = true;
|
||||||
plugin.dispatch (Vst2::effEditIdle, 0, 0, 0, 0);
|
plugin.dispatch (Vst2::effEditIdle, 0, 0, nullptr, 0);
|
||||||
reentrantGuard = false;
|
reentrantGuard = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2990,7 +2996,7 @@ public:
|
||||||
activeVSTWindows.add (this);
|
activeVSTWindows.add (this);
|
||||||
|
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
dispatch (Vst2::effEditTop, 0, 0, 0, 0);
|
dispatch (Vst2::effEditTop, 0, 0, nullptr, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3034,7 +3040,7 @@ private:
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
void openPluginWindow (void* parentWindow)
|
void openPluginWindow (void* parentWindow)
|
||||||
{
|
{
|
||||||
if (isOpen || parentWindow == 0)
|
if (isOpen || parentWindow == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
isOpen = true;
|
isOpen = true;
|
||||||
|
|
@ -3045,10 +3051,10 @@ private:
|
||||||
|
|
||||||
// do this before and after like in the steinberg example
|
// do this before and after like in the steinberg example
|
||||||
dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0);
|
dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0);
|
||||||
dispatch (Vst2::effGetProgram, 0, 0, 0, 0); // also in steinberg code
|
dispatch (Vst2::effGetProgram, 0, 0, nullptr, 0); // also in steinberg code
|
||||||
|
|
||||||
// Install keyboard hooks
|
// Install keyboard hooks
|
||||||
pluginWantsKeys = (dispatch (Vst2::effKeysRequired, 0, 0, 0, 0) == 0);
|
pluginWantsKeys = (dispatch (Vst2::effKeysRequired, 0, 0, nullptr, 0) == 0);
|
||||||
|
|
||||||
// double-check it's not too tiny
|
// double-check it's not too tiny
|
||||||
int w = 250, h = 150;
|
int w = 250, h = 150;
|
||||||
|
|
@ -3224,7 +3230,7 @@ private:
|
||||||
|
|
||||||
JUCE_VST_LOG ("Closing VST UI: " + plugin.getName());
|
JUCE_VST_LOG ("Closing VST UI: " + plugin.getName());
|
||||||
isOpen = false;
|
isOpen = false;
|
||||||
dispatch (Vst2::effEditClose, 0, 0, 0, 0);
|
dispatch (Vst2::effEditClose, 0, 0, nullptr, 0);
|
||||||
stopTimer();
|
stopTimer();
|
||||||
|
|
||||||
#if JUCE_WINDOWS
|
#if JUCE_WINDOWS
|
||||||
|
|
@ -3513,7 +3519,7 @@ void VSTPluginFormat::findAllTypesForFile (OwnedArray<PluginDescription>& result
|
||||||
// Normal plugin...
|
// Normal plugin...
|
||||||
results.add (new PluginDescription (desc));
|
results.add (new PluginDescription (desc));
|
||||||
|
|
||||||
instance->dispatch (Vst2::effOpen, 0, 0, 0, 0);
|
instance->dispatch (Vst2::effOpen, 0, 0, nullptr, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class JUCE_API VSTPluginFormat : public AudioPluginFormat
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
VSTPluginFormat();
|
VSTPluginFormat();
|
||||||
~VSTPluginFormat();
|
~VSTPluginFormat() override;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Attempts to retrieve the VSTXML data from a plugin.
|
/** Attempts to retrieve the VSTXML data from a plugin.
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@ struct AutoResizingNSViewComponentWithParent : public AutoResizingNSViewCompone
|
||||||
|
|
||||||
#if JUCE_CLANG
|
#if JUCE_CLANG
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#if __has_warning("-Wcast-align")
|
||||||
|
#pragma clang diagnostic ignored "-Wcast-align"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "format/juce_AudioPluginFormat.cpp"
|
#include "format/juce_AudioPluginFormat.cpp"
|
||||||
|
|
|
||||||
|
|
@ -692,7 +692,7 @@ public:
|
||||||
DelegateClass::setState (delegate, this);
|
DelegateClass::setState (delegate, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~URLConnectionState()
|
~URLConnectionState() override
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public:
|
||||||
nativeContext.reset();
|
nativeContext.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
~CachedImage()
|
~CachedImage() override
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
@ -671,7 +671,7 @@ public:
|
||||||
attach();
|
attach();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Attachment()
|
~Attachment() override
|
||||||
{
|
{
|
||||||
detach();
|
detach();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue