How do I make Sun Java output sound through PulseAudio using a browser?
I am trying to make Sun Java 1.6.0_20 output its sound through PulseAudio. Currently, Java uses the sound card directly, blocking every other application from using sound when a Java program is running. Other applications work just fine, and I can get multiple programs to output sound at the same time as long as no Java program is running. PulseAudio Volume Control lists all programs trying to output sound through PulseAudio, but Java is nowhere to be found when it's playing sound.
I have tried executing "padsp firefox", but Firefox doesn't even start when I try that. I have also tested "padsp konqueror", but when I do that, there's no sound from Java applets. Putting padsp in front of the command to launch the non-browser Java applet does work though.
I have also tried renaming the java binary to java.bin and then creating a file named "java" that says
To summarise: I would like Firefox to output Java's sound through PulseAudio, but "padsp firefox" doesn't work.
I hope this was clear enough. If I need to supply any more information, please ask, because I don't really know much about outputting sound. Thanks in advance.
Could you provide a link to a page that uses java to produce sound? It would help if you could verify the problem and test a solution.
Does the java program access OSS drivers or Alsa?
Your firefox command is probably a wrapper script which may undo the changes to $LD_PRELOAD that the padsp command made. Try running the binary directly instead:
e.g. padsp -- /usr/lib/firefox/firefox <url>
You might try running the java program w/o pulse, e.g. pasuspender -- firefox <url>
And then use lsof to see which files and devices are opened. Or use "ltrace /usr/lib/firefox/firefox" or "strace /usr/lib/firefox/firefox" which will allow you to discover which libraries and system calls are used. This can often provide valuable clues. Pay particular attention to libraries loaded and errors.
|All times are GMT -5. The time now is 07:05 PM.|