tenacityteam / tenacity-legacy

THIS REPO IS NOT MAINTAINED ANYMORE. Please see https://codeberg.org/tenacityteam/tenacity for Tenacity, which is maintained.
https://tenacityaudio.org
Other
6.77k stars 256 forks source link

[Wayland] VST depends on gdk/gdkx.h (GDK X11) #614

Open lanodan opened 3 years ago

lanodan commented 3 years ago

Guidelines

Version/Commit hash

01f22e8acb65b978181055cb6009093f5f6a3da4

Describe the bug.

While building tenacity in a libX11-free system I had to reconfigure it and disable use_vst as it uses gdk/gdkx.h, which is for X11.

Expected behavior

I think there should either be a test into the buildsystem for gdk-x11-3.0 (pkg-config name) before allowing VST; or if possible removing the dependency on gdkx.

OS

Gentoo w/ USE=-X

Additional context

No response

This issue is not a duplicate

leio commented 3 years ago

Looks like the VST stuff gets passed in a XID in VSTControlGTK.cpp for some GUI integration to work, so yeah, this is incompatible with wayland right now, but maybe it could be made to work if the underlying stuff has wayland support by now, by passing wayland specific surfaces into it then instead with gdkwayland. So while it might compile with GTK built with X support, it wouldn't actually work unless tenacity falls back to running with Xwayland.

Be-ing commented 3 years ago

I think there should either be a test into the buildsystem for gdk-x11-3.0 (pkg-config name) before allowing VST

That sounds reasonable. That check should only run if NOT WIN32 AND NOT APPLE.

maybe it could be made to work if the underlying stuff has wayland support by now, by passing wayland specific surfaces into it then instead with gdkwayland.

That would be better if someone steps up to do the work. In the meantime checking for the requirements in the build system would be good.

Be-ing commented 3 years ago

Some of the VST2 code (src/effects/VST/aeffects.h) comes from LMMS. I wonder if LMMS has VST2 effects working on Wayland?

lanodan commented 3 years ago

Some of the VST2 code (src/effects/VST/aeffects.h) comes from LMMS. I wonder if LMMS has VST2 effects working on Wayland?

LMMS works with pure wayland but similarly to Tenacity, VST support is out as it depends on Qt X11 Extras ( https://github.com/LMMS/lmms/blob/770d2498b5b727a81c09ae207ff6a3dd1efa70d4/CMakeLists.txt#L171 )

leio commented 3 years ago

Reopening, as we don't have a solution for VST2 on Wayland yet

falkTX commented 3 years ago

VST2 doesnt work on wayland, the system pointer is an X11 Window. Even LV2 and VST3 dont support wayland, all of plugin embedding is still done with X11 Window ids. So if there is no gdkx.h header available, VST2 UIs are not possible.

lanodan commented 3 years ago

VST2 doesnt work on wayland, the system pointer is an X11 Window. Even LV2 and VST3 dont support wayland, all of plugin embedding is still done with X11 Window ids. So if there is no gdkx.h header available, VST2 UIs are not possible.

Erm, on https://lv2plug.in/ns/extensions/ui#UI it looks like X11 is only a part of the available UIs. And not sure what's up with "Note that this UI type is not suitable for binary distribution since multiple versions of Qt/GTK can not be used in the same process." I guess they mean without using shared librairies, which instead is something they should use since both Qt and GTK have ABI freezes with their APIs. As for tenacity itself well… I have the LADSPA and LV2 support compiled and enabled without any X11 on my machine, haven't tried actual plugins yet though. LADSPA and LV2 plugins seems to be working, I tried https://github.com/swh/lv2/ and http://drobilla.net/software/mda-lv2/ which are in gentoo packages (some other packaged ones seem to have direct X11 dependencies) they seem to be working fine.

screen .

Be-ing commented 3 years ago

Good to see you back here @falkTX.

@lanodan are you sure Tenacity is running as a Wayland application and not XWayland? Do you have XWayland installed? I'm not sure how wxWidgets / GTK determines whether to use Wayland or XWayland.

lanodan commented 3 years ago

@lanodan are you sure Tenacity is running as a Wayland application and not XWayland? Do you have XWayland installed? I'm not sure how wxWidgets / GTK determines whether to use Wayland or XWayland.

No XWayland either, not that it could build/run with libX11 being gone anyway. As for GTK I think it tries wayland first and then X11. Can be forced via the GDK_BACKEND environment variable.