mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
StandaloneFilterWindow fix.
This commit is contained in:
parent
58872b9fe2
commit
1b1fe9d24e
1 changed files with 9 additions and 11 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue