Auv3 resizing issue on macos (not ios)

I’ve spent some time debugging this. There seem to be several issues with AUv3 resizing, only one of which we can work around in JUCE:

  • JUCE plugins were not responding to host-initiated resize requests. I have a fix for this, which I’ll push once it’s been reviewed. Unfortunately, this only seems to work on Big Sur. On Catalina, I can’t get host-initiated resize to work for JUCE plugins or for Apple’s AUv3 Filter Demo. Given that Apple’s demo is broken, I think this is likely a platform issue.
  • Client-initiated resize (e.g. from a corner resizer or dropdown inside the plugin) doesn’t work for JUCE AUv3 plugins. So far, I haven’t been able to find any AUv3 plugin that can be resized from within the plugin itself. I also haven’t been able to find any documentation that would suggest client-initiated resize is possible. If you know of a plugin where this works, please let me know. At the moment, I think this may not be supported by the plugin format.
  • Logic’s handling of AUv3 resizing seems to be a bit broken:
    • If the AUv3 reports that it doesn’t support any of the view configurations that Logic requests, the plugin window will initially be sized to the view controller’s preferredContentSize. If the view is then resized, closed, and reopened, the editor will not reopen at its previous size. Repeatedly closing and opening the window will cause the editor to grow/shrink exponentially. I can reproduce this issue in the AUv3 demo, if I modify it to support none of the requested view configurations. This appears to be a Logic bug.
    • If the AUv3 reports that it does support one or more of the requested view configurations, Logic will pick one of those view configurations rather than using the preferredContentSize provided by the view controller. As a result, the view may not respect the aspect ratio set in the plugin editor’s constrainer. This does prevent the issue with the editor growing/shrinking on open, though. Again, this behaviour is consistent with the AUv3 demo.

The least-broken setup at the moment seems to be:

  • Avoid allowing the user to resize the plugin view from within the editor. Disable corner resizers etc. if running as an AUv3. Rely on the host to provide resizing capabilities.
  • Attempt to support at least one of the view configurations that Logic requests, in order to avoid the exponential-resize bug. Logic 10.6.1 requests 1024x768 and 1366x1024.

Hopefully that helps.

This patch fixes host-initiated resize for AUv3 plugins on macOS:

2 Likes