|
|
@@ -89,18 +89,14 @@ template <> struct ContainerDeletePolicy<const __CFString> { static void destr |
|
|
// make sure the audio processor is initialized before the AUBase class
|
|
|
// make sure the audio processor is initialized before the AUBase class
|
|
|
struct AudioProcessorHolder
|
|
|
struct AudioProcessorHolder
|
|
|
{
|
|
|
{
|
|
|
AudioProcessorHolder (bool initialiseGUI)
|
|
|
|
|
|
|
|
|
AudioProcessorHolder()
|
|
|
{
|
|
|
{
|
|
|
if (initialiseGUI)
|
|
|
|
|
|
initialiseJuce_GUI();
|
|
|
|
|
|
|
|
|
|
|
|
juceFilter = createPluginFilterOfType (AudioProcessor::wrapperType_AudioUnit);
|
|
|
|
|
|
|
|
|
|
|
|
// audio units do not have a notion of enabled or un-enabled buses
|
|
|
// audio units do not have a notion of enabled or un-enabled buses
|
|
|
juceFilter->enableAllBuses();
|
|
|
juceFilter->enableAllBuses();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
std::unique_ptr<AudioProcessor> juceFilter;
|
|
|
|
|
|
|
|
|
ScopedJuceInitialiser_GUI scopedInitialiser;
|
|
|
|
|
|
std::unique_ptr<AudioProcessor> juceFilter { createPluginFilterOfType (AudioProcessor::wrapperType_AudioUnit) };
|
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
@@ -111,8 +107,7 @@ class JuceAU final : public AudioProcessorHolder, |
|
|
{
|
|
|
{
|
|
|
public:
|
|
|
public:
|
|
|
JuceAU (AudioUnit component)
|
|
|
JuceAU (AudioUnit component)
|
|
|
: AudioProcessorHolder (activePlugins.size() + activeUIs.size() == 0),
|
|
|
|
|
|
MusicDeviceBase (component,
|
|
|
|
|
|
|
|
|
: MusicDeviceBase (component,
|
|
|
(UInt32) AudioUnitHelpers::getBusCountForWrapper (*juceFilter, true),
|
|
|
(UInt32) AudioUnitHelpers::getBusCountForWrapper (*juceFilter, true),
|
|
|
(UInt32) AudioUnitHelpers::getBusCountForWrapper (*juceFilter, false))
|
|
|
(UInt32) AudioUnitHelpers::getBusCountForWrapper (*juceFilter, false))
|
|
|
{
|
|
|
{
|
|
|
@@ -173,9 +168,6 @@ public: |
|
|
|
|
|
|
|
|
jassert (activePlugins.contains (this));
|
|
|
jassert (activePlugins.contains (this));
|
|
|
activePlugins.removeFirstMatchingValue (this);
|
|
|
activePlugins.removeFirstMatchingValue (this);
|
|
|
|
|
|
|
|
|
if (activePlugins.size() + activeUIs.size() == 0)
|
|
|
|
|
|
shutdownJuce_GUI();
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
@@ -1723,6 +1715,7 @@ public: |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
private:
|
|
|
private:
|
|
|
|
|
|
ScopedJuceInitialiser_GUI scopedInitialiser;
|
|
|
Rectangle<int> lastBounds;
|
|
|
Rectangle<int> lastBounds;
|
|
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE (EditorCompHolder)
|
|
|
JUCE_DECLARE_NON_COPYABLE (EditorCompHolder)
|
|
|
@@ -1823,8 +1816,6 @@ public: |
|
|
// there's some kind of component currently modal, but the host
|
|
|
// there's some kind of component currently modal, but the host
|
|
|
// is trying to delete our plugin..
|
|
|
// is trying to delete our plugin..
|
|
|
jassert (Component::getCurrentlyModalComponent() == nullptr);
|
|
|
jassert (Component::getCurrentlyModalComponent() == nullptr);
|
|
|
|
|
|
|
|
|
shutdownJuce_GUI();
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
|