<Sound Dev> Opening multiple output lines
Juraj Svec
Juraj.Svec at Sun.COM
Tue Dec 11 14:34:11 PST 2007
Hi,
could you please send some more information? Output of the
TRACE1("Opening ALSA device %s\n", buffer); above the snd_pcm_open would
be great and also your sound card type and version will definitely help.
Thanks,
Juraj
> Hi,
>
> I'm testing a sound-using applet on Fedora 8. Sun JDK 1.6 runs the
applet
> correctly but OpenJDK does not. The applet attempts to open two
audio playback
> lines in succession, without closing the first before attempting to
open the
> second. The first open attempt succeeds but the second attempt fails
with:
>
> javax.sound.sampled.LineUnavailableException: line with format
PCM_SIGNED
> 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.
> at
>
com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:511)
> at
com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:124)
> at
com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:156)
> at PAPU.start(PAPU.java:198)
> at NES.enableSound(NES.java:390)
> at AppletGui.init(AppletGui.java:38)
> at sun.applet.AppletPanel.run(AppletPanel.java:435)
> at java.lang.Thread.run(Thread.java:674)
>
> The exception message is misleading since the line format is
supported. The
> actual cause of the failure is in:
>
> PLATFORM_API_LinuxOS_ALSA_PCMUtils.c:openPCMfromDeviceID
>
> This call:
>
> ret = snd_pcm_open(handle, buffer,
>
isSource?SND_PCM_STREAM_PLAYBACK:SND_PCM_STREAM_CAPTURE,
> SND_PCM_NONBLOCK);
>
> returns the error corresponding to "Device or resource busy".
>
> The attached test case demonstrates the failure.
>
> Tom
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: AudioSystemGetLineTest.java
> Type: text/x-java
> Size: 747 bytes
> Desc: not available
> Url :
http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20071123/3375bb6c/attachment.bin
More information about the sound-dev
mailing list