PluginHostType Logic and Multi-Output

This is an odd one…

Background:

I have multiple constructors depending on the PluginHostType - for this issue we have to consider that our VI in Logic has 16 stereo outputs and the VI in GarageBand is limited to 1 stereo out only.

  1. Start Logic
  2. Load the stereo version of our VI
  • PluginHostType detects that we’re running under AUHostingService and detects that it’s AppleLogic so isLogic() returns true. The plugin opens with the 16 outputs.

  1. In the insert menu switch the VI from stereo to Multi-Output (16xstereo)

The current instance is destroyed and a new instance is created, but this time PluginHostType detects that we’re running under AUHostingService but the host type is AppleGarageBand so our recall crashes.

If in step 2 I instantiate the Multi-Out version (don’t load stereo and then switch) PluginHostType correctly detects it’s running under Logic.

Anyone else seen this?

Rail

Okay - this kludge works…

Add this in the HostType enum:

        AppleGarageBand,            /**< Represents Apple GarageBand. */
        MaybeAppleGarageBand,

and add:

    bool isGarageBand() const noexcept        { return type == AppleGarageBand; }
    bool isMaybeGarageBand() const noexcept   { return type == MaybeAppleGarageBand; }

Then

PluginHostType::getHostType()

change the return type for “com.apple.garageband”

if (hostIdReportedByWrapper == "com.apple.garageband")              return MaybeAppleGarageBand;

And when the VI starts up in GarageBand the HostType is AppleGarageBand, when the VI starts up as stereo or Multi-Out in Logic Pro the HostType is AppleLogic and if you then change the plugin configuration in Logic and the VI restarts the HostType is MaybeAppleGarageBand

Rail

Maybe it is related to this: Logic 10.7.5 reporting wrong host?!?!

I tested with 10.7.4 and QC tested with 10.7.8 – so this seems to be a current bug when switching the plugin from stereo to Multi-Out in Logic.

My fix works so QC have approved the release.

Rail

The most recent version of Logic Pro is 11.0.1. Do you know if the issue is still present there?

Appears fixed in 11.0.1

Sorry had to deal with Logic not destroying the VI when you close the project… Very frustrating :frowning_with_open_mouth:

Rail