projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.22k stars 364 forks source link

Delay with pipewire #706

Closed pzant closed 1 year ago

pzant commented 1 year ago

Describe the bug projectM have ~2 sec delay with pipewire

Desktop:

Additional context If using a helvum to pass the stream except the alsa analog monitor directly from the source to projectM then delay disappears

kblaschke commented 1 year ago

Could you please test this with the rewritten SDL frontend and tell us if that issue is still present there?

Also please check if setting a specific audio driver for libSDL, e.g. using export SDL_AUDIODRIVER=pipewire and other values like pulseaudioor alsa, makes a difference.

In addition to that, the version of your local libSDL2 would be relevant, as SDL only added direct pipewire support in version 2.0.16, previous versions would use a different driver which may incur additional delays.

pzant commented 1 year ago

@kblaschke great, works fine but take incorrect monitor, always take sink but not monitor in my case:

kblaschke commented 1 year ago

Not sure what "upstream" means here. I've released a development build from an early dev version, which was stable enough for people to use it. There was more work being down since then, but the frontend currently lacks any UI or feedback, making it very hard to use.

My current focus is on the core library, getting it as Milkdrop-compatible as possible. To elaborate, there will be three releases, probably in this order:

The frontend is now a separate application, no longer part of the core library to make it easier to release both at a different pace, as internal changes to the library without visible stuff for the user (e.g. new API functions or a different rendering backend) may confuse people.

On Wayland, it may not work really well because Wayland uses EGL, while projectM only supports GLX rendering for now. This may change in the future when libSDL 3 is stable and we have implemented EGL and Vulkan rendering backends in projectM, which we'll probably release as version 5.0.

I can't really give an ETA on any release, because we're only working on this in our spare time. So releases may happen fast, or take a year or two.

Since this problem only affects the old release, I'm closing this issue.