What packages are neccessary to have sound output from java applets?

Posted by MvG on Ask Ubuntu See other posts from Ask Ubuntu or by MvG
Published on 2012-11-14T16:30:00Z Indexed on 2012/11/14 17:30 UTC
Read the original article Hit count: 296

Filed under:
|
|

I've got a very minimalistic setup of ubuntu precise, created using debootstrap. So please don't assume that any packages are installed just because they usually are. On that system, I'd like to play some sounds from a java applet. However, this always fails with the following error message:

javax.sound.midi.MidiUnavailableException: Can not open line
    at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1132)
    at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1036)
    ...
Caused by: java.lang.IllegalArgumentException: No line matching interface
        SourceDataLine supporting format PCM_SIGNED 44100.0 Hz,
        16 bit, stereo, 4 bytes/frame, little-endian is supported.
    at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:476)
    at javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:604)
    at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1066)
    ... 35 more

As the messages mention a soft synthesizer, and pcm lines, I expect that the lack of some midi daemon is not the issue here. As far as I can tell, the alsa kernel modules are loaded, including snd_hda_intel, snd_pcm, snd_seq_midi among others. I've also included the alsa-base and alsa-utils packages in my installation. alsa-mixer looks good, using “HDA Intel PCH” as its default device.

What other packages, configuration settings or daemon startups does java require to make its sound output work?

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about sound