Standalonefilter window issue (resolved)

I’ve just created a simple project using the standalonefilterwindow and standalonpluginholder classes provided by JUCE. However, when I run my app I am immediately brought to an assert here:

numInputChannels is 0, and numOutputChans is 0, yet the number of input and output buses is set to 1. I have to admit to not paying much attention to the updates made to the audios bus and channels system :worried: I’ve being living in the serene peace and tranquility of JUCE 4.0 for far too long! Any ideas of how to address this?

Look at the constructor and the isBusesLayoutSupported method of the latest version of JuceDemoPlugin.

Depending on your needs it may be sufficient to just copy the relevant parts of these.

Thanks Tom, but i don’t see any reference to isBusesLayoutSupported?

Am i looking in the right place?

p.s. a search of the entire repo didn’t show any hits for isBusesLayoutSupported? Must be a typo?

Oh, sorry - I had assumed this was a problem with the new bus layout stuff on the develop branch.

Ah. No I don’t think so. Unless I somehow got caught in the crossfire. There are a few new methods in the AudioDeviceSetup class like BigInteger AudioDeviceManager::AudioDeviceSetup::inputChannels, but I see no reference to them at all in any of the examples. Are they internal only methods? I’m clutching at straws…

Are you creating a standalone version of a plug-in (via AUv3), or are you using the StandaloneFilterWindow and StandalonePluginHolder in a more complex way?

I’m creating a standalone version of a plugin using StandaloneFilterWindow and StandalonePluginHolder as I’ve done many times in the past with older versions of JUCE, including v4. Only this time I’m getting that assert. It works fine in release mode. But it’s bugging me all the same.

Well, without seeing your source code I would suggest looking at how the AUv3 standalone version of JuceDemoPlugin is done - that certainly avoids the asserts.

If you are on master you may want to define JucePlugin_MaxNumInputChannels, JucePlugin_MaxNumOutputChannels and JucePlugin_PreferredChannelConfigurations. For example:

For example, at the top of your AppConfig.h, add the following lines

#ifndef  JucePlugin_MaxNumInputChannels
 #define JucePlugin_MaxNumInputChannels    2
#ifndef  JucePlugin_MaxNumOutputChannels
 #define JucePlugin_MaxNumOutputChannels   2
#ifndef  JucePlugin_PreferredChannelConfigurations
 define JucePlugin_PreferredChannelConfigurations  {1,1},{2,2}

Note, however, that this is deprecated and is not necessary on the develop branch anymore (and will not be necessary on master for the next release).

Thanks Fabian. I already have those defined in my AppConfig.h file. I’ve zipped a most minimal VS2015 example to here:

If you get a spare minute would you mind taking a look? I would really appreciate it.

So it seems I rather spectacularly mixed up different versions of JUCE. Apologies for sending anyone on a wild goose-chase, especially Fabian, like he’s not busy enough as is!