LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Bypass pulseaudio problems and crashes when you don't have pulseaudio. (https://www.linuxquestions.org/questions/linux-software-2/bypass-pulseaudio-problems-and-crashes-when-you-dont-have-pulseaudio-4175588259/)

Rinndalir 08-29-2016 01:47 PM

Bypass pulseaudio problems and crashes when you don't have pulseaudio.
 
I was looking into how Kerbal Space Program runs on linux (before I buy) and came across this one:

http://bugs.kerbalspaceprogram.com/issues/7514

and that got me to this one:

http://bugs.kerbalspaceprogram.com/issues/7515

and finally this one:

http://bugs.kerbalspaceprogram.com/a.../pulsenomore.c

This is a nice work around if you don't have (or want) pulseaudio but have to run an app that requires pulseaudio.

Code:

gcc -std=gnu99 -O2 -o pulsenomore pulsenomore.c -ldl

./pulsenomore myapp

pulsenomore loads the app into memory than replaces libpulse-simple.so.0 entries to /dev/null

Have not had a chance to test it, yet but looking at the code it seems simple enough and it doesn't require any root privileges.

Rinndalir 08-31-2016 01:00 PM

I found out that the pulsenomore 64-bit works fine if myapp is also 64-bit. But pulsenomore 64-bit did not work when myapp was 32-bit. I might have to create another wrapper script around myapp to use LD_PRELOAD or LD_LIBRARY_PATH to load 32-bit libs. More research required.


Also the technique is useful for other cases and presents some interesting ideas.


All times are GMT -5. The time now is 12:50 AM.