Sound enabled SNAP makes sound from other programs crackle

In this snap which plays sound using SDL2, while it is running any other app on the computer playing sound not via the snapcraft sandbox sounds like its dropped in sample rate or something, I’m not even sure how the sandbox can effect the sound of other applications like that.

Am I doing something wrong in my snapcraft.yaml or is this just a known problem of using the sandbox? The sound from the actual program running in the sandbox sounds fine, it’s just the other programs running.

It’s been over year since I originally raised this issue, the problem still persists and yet I have no idea what causes it.

I can confirm the sound degradation in other applications when running borger3. It seems that SDL is reconfiguring audio parameters so that it sounds right for borger3, but it doesn’t sound like a simple sample rate issue – it’s more like mono/stereo or fragment size mismatch. Pulseaudio should take care of processing stream data to make it compatible, but it’s clearly not happening.

I see yes the borger3 configures SDL audio to output Mono, this is an unfortunate side effect. I assume that I could mitigate this by outputting my mono channel on both L & R stereo tracks and leaving SDL configured for stereo output but it’s an inconvenience and hard to justify when it’s implementing a hack for one specific system that executes this program.

Yes, this looks like a bug and any change in the application size would be a workaround, the bug must be understood and fixed.

I wonder if this bug is related: https://bugs.launchpad.net/ubuntu/+source/speech-dispatcher/+bug/1739310.

I was able to reproduce this both with the snap and the AppImage of borger3, so this may be a pulseaudio bug. Can you link to the original report you made?

Sure I originally reported it here but my original thread doesn’t provide any additional information; Snap build breaking one of my applications, debugging options?

I can however confirm to you that I use Xubuntu and that it does indeed use Pulseaudio.