JUCE 4 to JUCE 5 having strange issues with standalone plugin


#1

Upgraded from JUCE 4 code to 5 and some very strange things are occurring.

What happened to the audio settings?

JUCE 4:

JUCE 5:

And why am I hitting this assert? (And consequently standalone plugin remains silent)

Edit: I realize there’s a description of why it’s being hit, no idea where to call reset, and why it’s suddenly needed.


#2

In the AudioDeviceSelectorComponent constructor, you can specify whether certain fields are visible or hidden as explained here: https://juce.com/doc/classAudioDeviceSelectorComponent#a859af6ef664a974dc7d2ce3d24d8f94c

As for the assertion, you need to call reset() in the prepareToPlay() function of your AudioProcessor on your MidiMessageCollector like so:

midiCollector.reset (sampleRate);


#3

thanks!


#4

How do you customize it without editing the JUCE code?

i.e. create a sub class, override, etc. where do you do it? what do you override? etc.

I can probably figure out what to override, but I just have no f***ing clue how JUCE expects me to not edit the JUCE code.


#5

There’s no MidiMessageCollector declared in class AudioProcessor…? So this seems to be invalid:

As for the assertion, you need to call reset() in the prepareToPlay() function of your AudioProcessor on your MidiMessageCollector like so:

midiCollector.reset (sampleRate);

not sure why this is so difficult for me… wish there was a guide on customizing standalone app.


#6

Have you tried creating a new standalone plugin from the Projucer plugin template? Do you see the same errors?


#7

As a reference have also a look in this thread:


#8

Thanks! I have this figured out as much as I care to at the moment, will take a look again in the future.