Browse Source

StandaloneFilterWindow fix.

tags/2021-05-28
jules 12 years ago
parent
commit
1b1fe9d24e
1 changed files with 9 additions and 11 deletions
  1. +9
    -11
      modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h

+ 9
- 11
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h View File

@@ -26,8 +26,6 @@
#ifndef __JUCE_STANDALONEFILTERWINDOW_JUCEHEADER__
#define __JUCE_STANDALONEFILTERWINDOW_JUCEHEADER__
extern AudioProcessor* JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor::WrapperType);
//==============================================================================
/**
A class that can be used to run a simple standalone application containing your filter.
@@ -59,13 +57,7 @@ public:
optionsButton.addListener (this);
optionsButton.setTriggeredOnMouseDown (true);
JUCE_TRY
{
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);
filter = createPluginFilter();
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined);
}
JUCE_CATCH_ALL
createFilter();
if (filter == nullptr)
{
@@ -155,12 +147,18 @@ public:
AudioProcessor* getAudioProcessor() const noexcept { return filter; }
AudioDeviceManager* getDeviceManager() const noexcept { return deviceManager; }
void createFilter()
{
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);
filter = createPluginFilter();
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined);
}
/** Deletes and re-creates the filter and its UI. */
void resetFilter()
{
deleteFilter();
filter = createPluginFilterOfType (AudioProcessor::wrapperType_Standalone);
createFilter();
if (filter != nullptr)
{


Loading…
Cancel
Save