From cy6ergn0m at gmail.com Tue Oct 13 15:31:56 2009 From: cy6ergn0m at gmail.com (cyberGn0m) Date: Wed, 14 Oct 2009 02:31:56 +0400 Subject: sound on Linux Message-ID: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> Anybody tested java sound on linux? As I know, java uses ALSA on Linux to play audio.. so, i have a problem with it: when java plays sound, other applications can't play anything. When other applications plays sound, java can't. As i know, mplayer can play sound via ALSA and i can open many players and all of them will plays as expected... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/235e9906/attachment.html From i30817 at gmail.com Tue Oct 13 15:45:37 2009 From: i30817 at gmail.com (Paulo Levi) Date: Tue, 13 Oct 2009 23:45:37 +0100 Subject: sound on Linux In-Reply-To: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> Message-ID: <212322090910131545q16f59fexf4cce53bf09cd03a@mail.gmail.com> I was just looking at this problem a while ago... opening the java sound audio engine instead of the default one might be a solution. Actually right now i'm using the method bellow, however, there are still some errors on a test machine that exhibited errors before (but no exception anymore) - the errors come in a Fedora (Pulse-Audio) linux. Obviously if it can't open the mixer it will try to open the java sound audio engine one - that should take take of one of the errors java not playing, but still might cause the second - native applications not playing. Actually the guy that is running the tests for me in that machine reports that audio is inaudible still, but no exception is raised if i use this. /** * Lines can fail to open because they are already in use. * Java sound uses OSS and some linuxes are using pulseaudio. * OSS needs exclusive access to the line, and pulse audio * highjacks it. Try to open another line. * @param format * @return a open line * @throws IllegalStateException if it can't open a dataline for the * audioformat. */ private SourceDataLine getSourceDataLine(AudioFormat format) { Exception audioException = null; try { DataLine.Info info = new DataLine.Info(SourceDataLine.class, format); for (Mixer.Info mi : AudioSystem.getMixerInfo()) { SourceDataLine dataline = null; try { Mixer mixer = AudioSystem.getMixer(mi); dataline = (SourceDataLine) mixer.getLine(info); dataline.open(format); dataline.start(); return dataline; } catch (Exception e) { audioException = e; } if (dataline != null) { try { dataline.close(); } catch (Exception e) { } } } } catch (Exception e) { throw new IllegalStateException("Error trying to aquire dataline.", e); } if (audioException == null) { throw new IllegalStateException("Couldn't aquire a dataline, this computer doesn't seem to have audio output?"); } else { throw new IllegalStateException("Couldn't aquire a dataline, probably because all are in use. Last exception:", audioException); } } From cy6ergn0m at gmail.com Tue Oct 13 22:22:12 2009 From: cy6ergn0m at gmail.com (cyberGn0m) Date: Wed, 14 Oct 2009 09:22:12 +0400 Subject: sound on Linux In-Reply-To: <212322090910131545q16f59fexf4cce53bf09cd03a@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <212322090910131545q16f59fexf4cce53bf09cd03a@mail.gmail.com> Message-ID: <645d12c20910132222r6bcdf9ddj2a2cd5ced6defaab@mail.gmail.com> I already wrote the same code but it still does not work. It conflicts with flash player and with mplayer (in any mode). 2009/10/14 Paulo Levi > I was just looking at this problem a while ago... opening the java > sound audio engine instead of the default one might be a solution. > Actually right now i'm using the method bellow, however, there are > still some errors on a test machine that exhibited errors before (but > no exception anymore) - the errors come in a Fedora (Pulse-Audio) > linux. Obviously if it can't open the mixer it will try to open the > java sound audio engine one - that should take take of one of the > errors java not playing, but still might cause the second - native > applications not playing. > Actually the guy that is running the tests for me in that machine > reports that audio is inaudible still, but no exception is raised if i > use this. > > /** > * Lines can fail to open because they are already in use. > * Java sound uses OSS and some linuxes are using pulseaudio. > * OSS needs exclusive access to the line, and pulse audio > * highjacks it. Try to open another line. > * @param format > * @return a open line > * @throws IllegalStateException if it can't open a dataline for the > * audioformat. > */ > private SourceDataLine getSourceDataLine(AudioFormat format) { > Exception audioException = null; > try { > DataLine.Info info = new > DataLine.Info(SourceDataLine.class, format); > > for (Mixer.Info mi : AudioSystem.getMixerInfo()) { > SourceDataLine dataline = null; > try { > Mixer mixer = AudioSystem.getMixer(mi); > dataline = (SourceDataLine) mixer.getLine(info); > dataline.open(format); > dataline.start(); > return dataline; > } catch (Exception e) { > audioException = e; > } > if (dataline != null) { > try { > dataline.close(); > } catch (Exception e) { > } > } > } > } catch (Exception e) { > throw new IllegalStateException("Error trying to aquire > dataline.", e); > } > if (audioException == null) { > throw new IllegalStateException("Couldn't aquire a > dataline, this computer doesn't seem to have audio output?"); > } else { > throw new IllegalStateException("Couldn't aquire a > dataline, probably because all are in use. Last exception:", > audioException); > } > } > -- ----------------------------------------------------------------- ????? ?????????? sound on Linux In-Reply-To: <645d12c20910132222r6bcdf9ddj2a2cd5ced6defaab@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <212322090910131545q16f59fexf4cce53bf09cd03a@mail.gmail.com> <645d12c20910132222r6bcdf9ddj2a2cd5ced6defaab@mail.gmail.com> Message-ID: <212322090910132249v2c261ef9s269d4f6fa96141d4@mail.gmail.com> Try to make the default engine the java audio engine... I think i had a test case to see if it worked around here... replace the string for the wav file, and also, probably the "Java Sound Audio Engine" is not the correct name string in the comparator ... you'll have to see. I can't test this now since i don't have a linux here this fails handy. -------------- next part -------------- A non-text attachment was scrubbed... Name: SoundPlayer.java Type: text/x-java Size: 12321 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/0ef4cedd/attachment-0001.bin From cy6ergn0m at gmail.com Tue Oct 13 23:08:35 2009 From: cy6ergn0m at gmail.com (cyberGn0m) Date: Wed, 14 Oct 2009 10:08:35 +0400 Subject: sound on Linux In-Reply-To: <212322090910132249v2c261ef9s269d4f6fa96141d4@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <212322090910131545q16f59fexf4cce53bf09cd03a@mail.gmail.com> <645d12c20910132222r6bcdf9ddj2a2cd5ced6defaab@mail.gmail.com> <212322090910132249v2c261ef9s269d4f6fa96141d4@mail.gmail.com> Message-ID: <645d12c20910132308v2b1d74fckc69c1ee74002b2c@mail.gmail.com> This way still conflicts with ALSA-based players... and probably with any other sound players.. In comments i saw that Java uses OSS for sound output? I think this is a root cause.. This looks it is the same that no sound at Linux... 2009/10/14 Paulo Levi > Try to make the default engine the java audio engine... I think i had > a test case to see if it worked around here... replace the string for > the wav file, and also, probably the "Java Sound Audio Engine" is not > the correct name string in the comparator ... you'll have to see. I > can't test this now since i don't have a linux here this fails handy. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/f6bf2217/attachment.html From contact at petersalomonsen.com Wed Oct 14 00:29:53 2009 From: contact at petersalomonsen.com (Peter Salomonsen) Date: Wed, 14 Oct 2009 09:29:53 +0200 Subject: sound on Linux In-Reply-To: <645d12c20910132308v2b1d74fckc69c1ee74002b2c@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <212322090910131545q16f59fexf4cce53bf09cd03a@mail.gmail.com> <645d12c20910132222r6bcdf9ddj2a2cd5ced6defaab@mail.gmail.com> <212322090910132249v2c261ef9s269d4f6fa96141d4@mail.gmail.com> <645d12c20910132308v2b1d74fckc69c1ee74002b2c@mail.gmail.com> Message-ID: Hi, If you rather use OpenJDK instead of Sun's, then you can use pulseaudio for playback. Actually pulseaudio is default audio output for OpenJDK on ubuntu linux. Then it's no problem with audio output from multiple applications simultaneously.. regards, Peter 2009/10/14 cyberGn0m > This way still conflicts with ALSA-based players... and probably with any > other sound players.. In comments i saw that Java uses OSS for sound output? > I think this is a root cause.. This looks it is the same that no sound at > Linux... > > 2009/10/14 Paulo Levi > >> Try to make the default engine the java audio engine... I think i had >> >> a test case to see if it worked around here... replace the string for >> the wav file, and also, probably the "Java Sound Audio Engine" is not >> the correct name string in the comparator ... you'll have to see. I >> can't test this now since i don't have a linux here this fails handy. >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/48ec7bf0/attachment.html From pauljohnleonard at googlemail.com Wed Oct 14 03:00:19 2009 From: pauljohnleonard at googlemail.com (PJ leonard) Date: Wed, 14 Oct 2009 11:00:19 +0100 Subject: sound on Linux In-Reply-To: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> Message-ID: <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> My understanding is: mplayer might use pulseaudio which allows the sharing of the soundoutput (on my ubuntu this is the default) JAVA uses the alsa device directly so it can not be used by other applications. iced tea JAVA does have a pulseaudio device but I can only produce broken up sound using this. Paul. 2009/10/13 cyberGn0m > Anybody tested java sound on linux? As I know, java uses ALSA on Linux to > play audio.. so, i have a problem with it: when java plays sound, other > applications can't play anything. When other applications plays sound, java > can't. As i know, mplayer can play sound via ALSA and i can open many > players and all of them will plays as expected... > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/27d09447/attachment.html From rom1dep at gmail.com Wed Oct 14 03:51:45 2009 From: rom1dep at gmail.com (rom1dep) Date: Wed, 14 Oct 2009 12:51:45 +0200 Subject: sound on Linux In-Reply-To: <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> Message-ID: <494d907f0910140351t9c84d7ere23f5932b4be4392@mail.gmail.com> > > 2009/10/13 cyberGn0m > >> Anybody tested java sound on linux? As I know, java uses ALSA on Linux to >> play audio.. so, i have a problem with it: when java plays sound, other >> applications can't play anything. When other applications plays sound, java >> can't. As i know, mplayer can play sound via ALSA and i can open many >> players and all of them will plays as expected... >> > > Yepp, I have this problem too and this is very annoying. I found this bug : http://bugs.sun.com/view_bug.do?bug_id=6832063 but I was asking me recently whether or not the fix is really in progress. This issue has made us (people working on the XtremeMP media player) think on a fallback audio backend based on gstreamer-java for people running under linux If you rather use OpenJDK instead of Sun's, then you can use pulseaudio for > playback. Actually pulseaudio is default audio output for OpenJDK on ubuntu > linux. Then it's no problem with audio output from multiple applications > simultaneously.. > Are you sure ? I use OpenJDK 1.7.0b70 and can't have amarok (gstreamer->PulseAudio) and XtremeMP playing simultaneously on my netbook. Maybe your hardware has some mixing abilities that lets your 'normal' programs play through pulseaudio over a stream while another one is available for java ? You can try this : play something with mplayer or whatever grinding PA, + trying to play a wave file with "aplay ". If you have your two streams being played, then your audio card is likely mixing-capable... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/e410b074/attachment.html From contact at petersalomonsen.com Wed Oct 14 04:10:29 2009 From: contact at petersalomonsen.com (Peter Salomonsen) Date: Wed, 14 Oct 2009 13:10:29 +0200 Subject: sound on Linux In-Reply-To: <494d907f0910140351t9c84d7ere23f5932b4be4392@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> <494d907f0910140351t9c84d7ere23f5932b4be4392@mail.gmail.com> Message-ID: Hi, Yes, I'm sure: This is run on an out-of-the-box ubuntu installation: public static void main(String[] args) throws Exception { Clip clip = AudioSystem.getClip(); clip.open(AudioSystem.getAudioInputStream(new File("test.wav"))); clip.start(); while(true) Thread.sleep(1); } Plays without problems, and I can also call with skype simultaneously (and other pulseaudio supporting apps). As for Frinika - the sound produced from this app is choppy as Paul said - but this is a problem with Frinika and not the pulseaudio support in openjdk.. regards, Peter 2009/10/14 rom1dep > 2009/10/13 cyberGn0m >> >>> Anybody tested java sound on linux? As I know, java uses ALSA on Linux to >>> play audio.. so, i have a problem with it: when java plays sound, other >>> applications can't play anything. When other applications plays sound, java >>> can't. As i know, mplayer can play sound via ALSA and i can open many >>> players and all of them will plays as expected... >>> >> >> > Yepp, I have this problem too and this is very annoying. I found this bug : > http://bugs.sun.com/view_bug.do?bug_id=6832063 > but I was asking me recently whether or not the fix is really in progress. > This issue has made us (people working on the XtremeMP media player) think > on a fallback audio backend based on gstreamer-java for people running under > linux > > If you rather use OpenJDK instead of Sun's, then you can use pulseaudio for >> playback. Actually pulseaudio is default audio output for OpenJDK on ubuntu >> linux. Then it's no problem with audio output from multiple applications >> simultaneously.. >> > > Are you sure ? I use OpenJDK 1.7.0b70 and can't have amarok > (gstreamer->PulseAudio) and XtremeMP playing simultaneously on my netbook. > Maybe your hardware has some mixing abilities that lets your 'normal' > programs play through pulseaudio over a stream while another one is > available for java ? You can try this : play something with mplayer or > whatever grinding PA, + trying to play a wave file with "aplay ". > If you have your two streams being played, then your audio card is likely > mixing-capable... > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091014/765b832a/attachment.html From alex.menkov at sun.com Wed Oct 14 05:32:16 2009 From: alex.menkov at sun.com (Alex Menkov) Date: Wed, 14 Oct 2009 16:32:16 +0400 Subject: sound on Linux In-Reply-To: <494d907f0910140351t9c84d7ere23f5932b4be4392@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> <494d907f0910140351t9c84d7ere23f5932b4be4392@mail.gmail.com> Message-ID: <4AD5C4D0.4020200@sun.com> rom1dep wrote: > 2009/10/13 cyberGn0m > > Anybody tested java sound on linux? As I know, java uses ALSA on > Linux to play audio.. so, i have a problem with it: when java > plays sound, other applications can't play anything. When other > applications plays sound, java can't. As i know, mplayer can > play sound via ALSA and i can open many players and all of them > will plays as expected... > Yepp, I have this problem too and this is very annoying. I found this > bug : http://bugs.sun.com/view_bug.do?bug_id=6832063 > but I was asking me recently whether or not the fix is really in > progress. This issue has made us (people working on the XtremeMP media > player) think on a fallback audio backend based on gstreamer-java for > people running under linux The bug is fixed in 6-open, but the fix is still not integrated into jdk7. Regards Alex > If you rather use OpenJDK instead of Sun's, then you can use > pulseaudio for playback. Actually pulseaudio is default audio output > for OpenJDK on ubuntu linux. Then it's no problem with audio output > from multiple applications simultaneously.. > Are you sure ? I use OpenJDK 1.7.0b70 and can't have amarok > (gstreamer->PulseAudio) and XtremeMP playing simultaneously on my > netbook. Maybe your hardware has some mixing abilities that lets your > 'normal' programs play through pulseaudio over a stream while another > one is available for java ? You can try this : play something with > mplayer or whatever grinding PA, + trying to play a wave file with > "aplay ". If you have your two streams being played, then your > audio card is likely mixing-capable... From cy6ergn0m at gmail.com Thu Oct 15 00:24:28 2009 From: cy6ergn0m at gmail.com (cyberGn0m) Date: Thu, 15 Oct 2009 11:24:28 +0400 Subject: sound on Linux In-Reply-To: <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> Message-ID: <645d12c20910150024o1722323etdfb73c09224cd30@mail.gmail.com> I run mplayer in "alsa" mode and many mplayer's can play sound at the same time in this mode. Java uses ALSA too, but it gets exclusive access to audio device... 2009/10/14 PJ leonard > My understanding is: > > mplayer might use pulseaudio which allows the sharing of the soundoutput > (on my ubuntu this is the default) > JAVA uses the alsa device directly so it can not be used by other > applications. > iced tea JAVA does have a pulseaudio device but I can only produce broken > up sound using this. > > Paul. > > 2009/10/13 cyberGn0m > >> Anybody tested java sound on linux? As I know, java uses ALSA on Linux to >> play audio.. so, i have a problem with it: when java plays sound, other >> applications can't play anything. When other applications plays sound, java >> can't. As i know, mplayer can play sound via ALSA and i can open many >> players and all of them will plays as expected... >> >> >> > -- ----------------------------------------------------------------- ????? ?????????? SourceDataLine behavior on Linux and Windows Message-ID: <645d12c20910151518i2b99be45y2c2910858c29de9c@mail.gmail.com> DataLine has a different behavior on Linux and Windows. I do not know, it it a bug or feature... may be documentation is not a full? So, steps to reproduce: 1. Create and open data line and start() on it. 2. Write data to line in a separate thread. 3. Stop line with a stop() method but do not stop thread from (2). On Windows: Thread that writes data to data line will fill line's buffer and then blocks (sleeps) when buffer reaches full. On Linux: Thread that writes data to line will spin around method write and eat CPU, because stopped line can't be written and write method returns 0 (no bytes written). This happens before line's buffer reaches full (available() > 0). Of course workaround present, but this behavior looks strange... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091016/3013f3d3/attachment.html From i30817 at gmail.com Thu Oct 15 17:19:09 2009 From: i30817 at gmail.com (Paulo Levi) Date: Fri, 16 Oct 2009 01:19:09 +0100 Subject: SourceDataLine behavior on Linux and Windows In-Reply-To: <645d12c20910151518i2b99be45y2c2910858c29de9c@mail.gmail.com> References: <645d12c20910151518i2b99be45y2c2910858c29de9c@mail.gmail.com> Message-ID: <212322090910151719had26bdcs838f259a9baec4db@mail.gmail.com> Are you trying to make a pause() method in a streaming audioplayer implementation? If you are can you tell any pointers to do it. In fact can AudioInputStream do it? The documentation implies that mark can work. On Thu, Oct 15, 2009 at 11:18 PM, cyberGn0m wrote: > DataLine has a different behavior on Linux and Windows. I do not know, it it > a bug or feature... may be documentation is not a full? > > So, steps to reproduce: > 1. Create and open data line and start() on it. > 2. Write data to line in a separate thread. > 3. Stop line with a stop() method but do not stop thread from (2). > > On Windows: > Thread that writes data to data line will fill line's buffer and then blocks > (sleeps) when buffer reaches full. > > On Linux: > Thread that writes data to line will spin around method write and eat CPU, > because stopped line can't be written and write method returns 0? (no bytes > written). This happens before line's buffer reaches full (available() > 0). > > Of course workaround present, but this behavior looks strange... > From i30817 at gmail.com Fri Oct 16 15:29:16 2009 From: i30817 at gmail.com (Paulo Levi) Date: Fri, 16 Oct 2009 23:29:16 +0100 Subject: sound on Linux In-Reply-To: <645d12c20910150024o1722323etdfb73c09224cd30@mail.gmail.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> <645d12c20910150024o1722323etdfb73c09224cd30@mail.gmail.com> Message-ID: <212322090910161529ua072262xa5ed149e9ae74c3f@mail.gmail.com> So this is only fixed on openjdk? No code level work around for lower versions? On Thu, Oct 15, 2009 at 8:24 AM, cyberGn0m wrote: > I run mplayer in "alsa" mode and many mplayer's can play sound at the same > time in this mode. Java uses ALSA too, but it gets exclusive access to audio > device... > > 2009/10/14 PJ leonard >> >> My understanding is: >> >> mplayer might use pulseaudio which allows the sharing of the soundoutput >> (on my ubuntu this is the default) >> JAVA uses the alsa device directly so it can not be used by other >> applications. >> iced tea JAVA does have a pulseaudio device but I can only produce broken >> up sound using this. >> >> Paul. >> >> 2009/10/13 cyberGn0m >>> >>> Anybody tested java sound on linux? As I know, java uses ALSA on Linux to >>> play audio.. so, i have a problem with it: when java plays sound, other >>> applications can't play anything. When other applications plays sound, java >>> can't. As i know, mplayer can play sound via ALSA and i can open many >>> players and all of them will plays as expected... >>> >>> >> > > > > -- > ----------------------------------------------------------------- > ????? ?????????? > > ? ? ? ? ? ? ? ? ? ? ? ? ? From rom1dep at gmail.com Sat Oct 17 04:45:01 2009 From: rom1dep at gmail.com (rom1dep) Date: Sat, 17 Oct 2009 13:45:01 +0200 Subject: sound on Linux In-Reply-To: <4AD5C4D0.4020200@sun.com> References: <645d12c20910131531r6e938dc8h916189ccfb14bb27@mail.gmail.com> <1fb5efbb0910140300s79904b37qf8be07f6037cfda1@mail.gmail.com> <494d907f0910140351t9c84d7ere23f5932b4be4392@mail.gmail.com> <4AD5C4D0.4020200@sun.com> Message-ID: <494d907f0910170445l4de0580dq9b2df1e0e4ab8b92@mail.gmail.com> 2009/10/14 Alex Menkov > > rom1dep wrote: > >> 2009/10/13 cyberGn0m > >> >> Anybody tested java sound on linux? As I know, java uses ALSA on >> Linux to play audio.. so, i have a problem with it: when java >> plays sound, other applications can't play anything. When other >> applications plays sound, java can't. As i know, mplayer can >> play sound via ALSA and i can open many players and all of them >> will plays as expected... >> Yepp, I have this problem too and this is very annoying. I found this bug >> : http://bugs.sun.com/view_bug.do?bug_id=6832063 >> but I was asking me recently whether or not the fix is really in progress. >> This issue has made us (people working on the XtremeMP media player) think >> on a fallback audio backend based on gstreamer-java for people running under >> linux >> > > The bug is fixed in 6-open, but the fix is still not integrated into jdk7. > > Regards > Alex Ok, that fits with the behavior I encounter... Do you know when the fix will be applied into jdk7 ? That shouldn't be that hard if the work has already been done for openjdk6 :) Then, have a nice WE ! Romain. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091017/abde79b8/attachment.html From welchd at ymail.com Sat Oct 17 20:16:49 2009 From: welchd at ymail.com (David Welch) Date: Sat, 17 Oct 2009 20:16:49 -0700 (PDT) Subject: gstreame - Sound output? Message-ID: <916860.48889.qm@web59604.mail.ac4.yahoo.com> I've loaded gstreamer to expand the number of sound formats my software will handle. Does it also assist sound output? It supports 24-bit stereo FLAC, and I can hear the difference! Is anybody working to bring this functionality to the JDK? Warm regards, Dave (An old retired Computer Geek.) P.S. I am running OpenSolaris 2009.06 with two "entire" updates. ------------------------------------------------------------ Freemasonry is a system of morality, veiled in allegory, and illustrated by symbols. ------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20091017/2944417f/attachment.html From neugens at limasoftware.net Sun Oct 18 03:26:45 2009 From: neugens at limasoftware.net (Mario Torre) Date: Sun, 18 Oct 2009 12:26:45 +0200 Subject: gstreame - Sound output? In-Reply-To: <916860.48889.qm@web59604.mail.ac4.yahoo.com> References: <916860.48889.qm@web59604.mail.ac4.yahoo.com> Message-ID: <4ADAED65.9060805@limasoftware.net> Il 18/10/2009 05:16, David Welch ha scritto: > I've loaded gstreamer to expand the number of sound formats my software will handle. Does it also assist sound output? It supports 24-bit stereo FLAC, and I can hear the difference! Is anybody working to bring this functionality to the JDK? > > Warm regards, > Dave (An old retired Computer Geek.) > > P.S. > I am running OpenSolaris 2009.06 with two "entire" updates. Hi! I once wrote a GStreamer java sound backend. It's not in perfect shape and lots of things are needed, but the code is public, you can find it in the GNU Classpath repository, you could use it as a basis, or as is depending on your needs. Porting it to OpenJDK should be a matter of adding some build machinery, because the code doesn't really depend on any internal Classpath code, if you find any of such dependencies, is probably one or two lines of code that can be easily replaced (in fact, as we use a Pointer abstraction in Classpath to store native pointers you may need to replace this code, but it's not much work). In general, it's not very easy to do a Java Sound backend with GStreamer, because GStreamer is quite high level API and doesn't really support well the way Java Sound work internally, but was enough to stream from the network all the funny format supported by GStreamer (it auto detects those, so no need to do anything). I didn't implement support for MIDI and if you plan to use it for real time audio editing you will be out of luck. It was a fun project, I would really liked to revive it if I had some time. Cheers, Mario -- pgp key: http://subkeys.pgp.net/ Proud GNU Classpath developer: http://www.classpath.org/ Read About us at: http://planet.classpath.org OpenJDK: http://openjdk.java.net/projects/caciocavallo/ Please, support open standards: http://endsoftpatents.org/