PulseAudio playback in Blender corrupts sound in other applications
As I have written on the mailing list already:
I've developed a PulseAudio backend  for Blender which is going to be released with Blender 3.0 and should be the default audio backend on Linux.
I've developed the backend based on the documentation  and looking at some code of other implementations [3,4], but I'm not sure if I did everything correctly. It works on my end, but some users are reporting that it now distorts audio playback on their system .
Basically I create a stream that I cork while there is no playback. I'm using a pa_mainloop object that is iterated in an own thread, to avoid deadlocks with the locking mechanism of the underlying audio device/backend code.
I hoped someone could have a quick look at my implementation  and check if I made a mistake using the API. Or maybe there is another reason for the issues that some people are experiencing? Thanks for your help already in advance!
I discussed the issue on IRC with @arun who told me that my implementation should be fine. However, the issue still persists and more users seem to be affected . As discussed on IRC, I asked the user to provide a log and I got one at the bottom of the first bug report , but I'll also attach it here: pulse.log. Searching for Blender brings one to the important bits I guess. It would be great if we could get this sorted! Thanks already for your help!
-  https://github.com/neXyon/audaspace/blob/master/plugins/pulseaudio/PulseAudioDevice.cpp
-  https://freedesktop.org/software/pulseaudio/doxygen/
-  https://github.com/kcat/openal-soft/blob/master/alc/backends/pulseaudio.cpp
-  https://source.chromium.org/chromium/chromium/src/+/main:media/audio/pulse/pulse_output.cc
-  https://developer.blender.org/T88089
-  https://developer.blender.org/T88876