Fedora 9 Pulseaudio and Java

Post date: Nov 3, 2008 4:44:57 AM

Ever Got a javax.sound.sampled.LineUnavailableException: Audio Device Unavailable trying to play an audio file with a java app (such as jOggPlayer) on a system running Pulseaudio?

Well I did.

I use Fedora 9 which starts up a pulseaudio daemon. The trouble with this is that Java (Suns JDK for linux version 1.6.0_10-rc2) does not seem to work when the pulseaudio daemon is running.

I shut down the PA daemon and java now plays tunes again!

While I was trouble shooting, I ran into this great article on Java Sound.

Attached is a java source file to help iterate through the available audio systems on your computer. (they are from the above article)