Hey Jules -
I’ve just noticed that when I call getCurrentProgram() on AU plugins from my host I get screwed up results.
Previously I figured it was just certain plugins, but it seems to happen with all AUs and not with VSTs.
I tried it today with the PluginHost and got the same issue. The attached screenshot shows a compilation of the PluginHost with a timer that prints out the results of getCurrentProgram() for every loaded plugin.
The inputs/outputs return 0, as do any plugins with no programs. The others give (oddly similar) wrong answers (even the Apple plugin). I did find some that gave slightly different results (the Martin Eastwood plugin here always reports it is on program 519151360). The others seem to be returning a large number that varies with time.
Anyway, I checked it at the base call in juce_AudioUnitPluginFormat.mm and saw the wrong answers coming back there.
Also, I should note that getting the total number of programs, and their names, and setting current programs all seem to work just fine. I can actually set the program, say program 3, and see that it has worked, but I still get these screwy returned program numbers.
Anyway, take a look when you get a chance, or let me know what silly thing I am doing wrong if that is the case.