You are not logged in.

#1 2012-02-11 21:52:29

megajosh2
Member
Registered: 2009-04-15
Posts: 57

[SOLVED] Java can't play any sound

I can't get any Java applets whatsoever to play sound. I think I've had this problem in the past, and all I did was add these lines to /etc/asound.conf:

pcm.!plughw {
    type plug
    slave.pcm "dmixer"
}

... as I'm using ALSA with dmixer. From what I can tell, most attempts to get sound playing through Java result in an exception like this:

javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 48000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.

... and then it doesn't open any of the devices in /dev/snd/ to play sound over them. This problem happens whether or not any other application is accessing the sound card. Any ideas of what could be wrong?

Edit: Ignore me, I just realized I forgot to enable OSS emulation in the kernel.

Last edited by megajosh2 (2012-02-11 22:29:10)

Offline

Board footer

Powered by FluxBB