VST3 host detection should use the IHostApplication GetName() function


#1

It looks like JUCE detects what host a VST3 plugin is running in by the filename (in juce_PluginHostType.h). The sdk provides the IHostApplication interface however, which has a GetName() function that provides this information as well. Wouldn’t it be better to use that, when available? The filename detection could still be used as a backup.

For example, the filename of FL Studio is different on Windows and on macOS. The current check will not detect that FL is the host, while the GetName() function will return the same string in both cases. It will also provide the same name for its plugin bridge, which is also a separate case in the current JUCE code.

Fwiw, the VST2 sdk also provides an opcode to get the host name: audioMasterGetProductString


#2

Using the file name gives us consistent results across plug-in formats, including AU. Relying upon the hosts to provide sensible information is a dangerous game and since we’d need all the fallback code anyway I’m not sure it would be a good way to go.


#3

In that case the code should be amended to detect FL correctly on macOS (and maybe this is the case for other hosts as well).

It still seems wrong to ignore an sdk feature to get the information that you want and rely on a method that is not defined and may or may not give proper results. It feels like bugs waiting to happen.


#4

What’s going wrong on MacOS? I’ve just given it a try and it’s working for me…


#5

A change to properly detect FL Studio on macOS was pushed only recently. Running of the last version?


#6

t0m: The filename there is different so FL won’t be detected properly. It will be either “FL Studio 20.app” or (more likely) “OsxFL”. But either of those may also change in the future, while the reported host name will stay the same.

luzifer: I don’t use JUCE myself, I was looking at the code to investigate some bugs with JUCE plugins in FL.


#7

Ah, yes. It’s been added but not made its way onto the master branch yet.

There’s no guarantee that the reported host name will stay the same either. What does FL Studio report? Is it Fruity Loops or FL Studio? JUCE has to deal with many different DAWs, some of which do some pretty exciting things via the API.


#8

FL reports Fruity Wrapper as the host name, and Image-Line as the vendor. This hasn’t changed in 18 years :slight_smile:.

Anyway, I realize it’s not easy to deal with this stuff. But I do believe that if there’s an “official” way to do something, that should be used unless there’s proof that it doesn’t work as intended.