@@ -18,10 +18,12 @@ class HostAudioProcessorImpl
18
18
{
19
19
public:
20
20
HostAudioProcessorImpl ()
21
- : AudioProcessor(BusesProperties()
22
- .withInput(" Input" , AudioChannelSet::stereo(), true )
23
- .withOutput(" Output" , AudioChannelSet::stereo(), true )
24
- .withInput(" Sidechain" , AudioChannelSet::stereo(), false ))
21
+ : AudioProcessor(
22
+ BusesProperties ()
23
+ .withInput(" Input" , AudioChannelSet::stereo(), true)
24
+ .withOutput(" Output" , AudioChannelSet::stereo(), true)
25
+ .withInput(" Sidechain" , AudioChannelSet::stereo(), false)
26
+ )
25
27
26
28
{
27
29
appProperties.setStorageParameters (
@@ -249,9 +251,6 @@ class HostAudioProcessorImpl
249
251
250
252
editorStyle = where;
251
253
252
- if (inner != nullptr && !mb.isEmpty ())
253
- inner->setStateInformation (mb.getData (), (int )mb.getSize ());
254
-
255
254
// In a 'real' plugin, we'd also need to set the bus configuration of the inner plugin.
256
255
// One possibility would be to match the bus configuration of the wrapper plugin, but
257
256
// the inner plugin isn't guaranteed to support the same layout. Alternatively, we
@@ -321,15 +320,19 @@ class HostAudioProcessorImpl
321
320
getBlockSize ()
322
321
);
323
322
}
324
-
325
- inner->prepareToPlay (getSampleRate (), getBlockSize ());
326
323
}
327
324
325
+ this ->prepareToPlay (getSampleRate (), getBlockSize ());
326
+
327
+ if (inner != nullptr && !mb.isEmpty ())
328
+ inner->setStateInformation (mb.getData (), (int )mb.getSize ());
329
+
328
330
if (needsPluginChanged)
329
331
NullCheckedInvocation::invoke (pluginChanged);
330
332
};
331
333
332
- pluginFormatManager.createPluginInstanceAsync (pd, getSampleRate (), getBlockSize (), callback);
334
+ if (inner == nullptr || (inner != nullptr && inner->getPluginDescription ().name != pd.name ))
335
+ pluginFormatManager.createPluginInstanceAsync (pd, getSampleRate (), getBlockSize (), callback);
333
336
}
334
337
335
338
void clearPlugin ()
0 commit comments