afarhan / sbitx

168 stars 58 forks source link

Improvements around pulseaudio opening PCM capture device #64

Closed n1ai closed 9 months ago

n1ai commented 10 months ago

I accidentally added software that depended on pulseaudio onto my sbitx device so the sbitx program would not run because pulseaudio had the PCM devices opened.

When debugging this I found that the error message being printed said the capture device being opened was (null) because the fprintf() statement was not using the same variable as the snd_pcm_open() statement, it was using a global variable that was set to NULL and never used it again. I got rid of this variable and a similar one set up for the play device but totally unused.

I also found some related fprintf() messages did not end with newline so it was hard to read the output, so I added the newlines.

And I found via googling that the info in the install.txt did not completely deal with the situation. The improved advise sets the daemon-binary to /bin/true so any component that tries to spawn pulseaudio actually ends up spawning /bin/true which keeps it satisfied without actually starting pulseaudio.

n1ai commented 10 months ago

I'm pretty sure this happened because the bluetooth support on my Pi running bullseye activated pulseaudio... Going to the toolbar and clicking on the bluetooth icon and turning it off seems to prevent pulseaudio from starting....