From fitzsim at redhat.com Wed Apr 30 18:17:11 2008 From: fitzsim at redhat.com (Thomas Fitzsimmons) Date: Wed, 30 Apr 2008 21:17:11 -0400 Subject: Opening multiple output lines In-Reply-To: <475F1063.6080109@sun.com> References: <475F1063.6080109@sun.com> Message-ID: <48191A17.3070604@redhat.com> Hi, I've attached the output of running AudioSystemGetLineTest against openjdk-6-src-b09-11_apr_2008 with USE_TRACE defined, and the description of my sound card reported by lspci -vv. Tom Juraj Svec wrote: > 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 > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: trace.log Url: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20080430/3fb22ed4/attachment.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cardinfo.txt Url: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20080430/3fb22ed4/attachment.txt