<Sound Dev> sound on Linux

Peter Salomonsen contact at petersalomonsen.com
Wed Oct 14 04:10:29 PDT 2009


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")));

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



2009/10/14 rom1dep <rom1dep at gmail.com>

> 2009/10/13 cyberGn0m <cy6ergn0m at 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...
> 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 <file.wav>".
> 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 

More information about the sound-dev mailing list