Glitchy Playback on Linux / PulseAudio

When doing playback in a standalone version of a plugin on Linux with the audio device Playback/recording through the PulseAudio sound server, I usually get glitchy playback. There is a 1 in 10 chance playback starts normally. The only way so far I have found to resolve the issue is to start pavucontrol (volume app for PulseAudio) in a separate terminal after the plugin was started. This also only works half of the time.

If it does not work, or if pavucontrol was started before the plugin, I can see what I think is the issue: There is an ALSA plugin named ALSA plug-in [MyJucePlugin] which is popping in and out of existence multiple times per second.

I have encountered this issue on every distro I used (all Debian derivatives) and across a number of audio interfaces. I’ve been battling this issue pretty much the entire years I’ve been using JUCE. Plz halp.

I remember there being an older, possibly related post, but I can’t find it right now.

Sidenote: I know about JACK, and it has worked before for me. But it is very far from convenient to set up or use and hardly beginner friendly.

This issue still exists. If you set the input channel to “none”, the glitch disappears. To the Juce team, can you please fix this bug?

I found the same, hopefully Pipewire once mature will not suffer the same problems. I would recommend for now remembering to start the JACK server via QJackCtl, I think I might investigate whether a JUCE app can programmatically start the JACK server automatically to bypass the need for this.

Can you explain more why JACK is not preferable? I have found that once you have your soundcard properly configured in QJackCtrl, the only issue with it is remembering to start the server before launching your Linux app. I would say that PulseAudio is a dated audio back end and not meant for low latency activities, something that Pipewire definitely seems to be able to improve on.

The right solution here is not to use PulseAudio, because it was not designed for low latency, audio production and can’t emulate low level access to soundcard, which is the case of problem I believe. PipeWire is getting better with each release, but for now I recommend to use pure ALSA or JACK.

The right solution is to fix the bug. PulseAudio works great if you disable the input channel.

Why is this happening? Is there a plugin being robotically instantiated by something, failing to enumerate its bus, and dying - only to be re-instantiated over and over? Whats the plugin? Why is it dying?

The fix is to investigate the cause of this issue, if you have it in front of you, and provide more details …

Ok, fix bug in PulseAudio.