<Sound Dev> JavaSound is not actually usable on Oracle JDK

Damjan Jovanovic damjan.jov at gmail.com
Mon Aug 14 14:08:11 UTC 2017


Which Linux distribution are you using?

On at leaset Ubuntu the default jre/lib/sound.properties for OpenJDK only
contains these lines:

javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider

so it's using IcedTea's PulseAudio driver instead of Oracle's ALSA driver.
That may account for the difference you are seeing.

Regards
Damjan

On Mon, Aug 14, 2017 at 3:24 PM, Stefan Reich <
stefan.reich.maker.of.eye at googlemail.com> wrote:

> Hi there,
>
> I am currently using JavaSound on Oracle JDK 1.8 on Linux and Windows.
> It's an unmitigated catastrophe.
>
> Something as simple as playing a Clip only works 60% of the time. The
> other times, it just stays mute.
>
> This may not be your fault as I'm not currently using OpenJDK. How
> different is the OpenJDK code base versus Oracle relating to JavaSound?
>
> Should I try OpenJDK again?
>
> The background is: I really want to support every end user out there, so
> both OpenJDK and Oracle JDK should run my software well...
>
> I am working around the issue by actually invoking command line tools
> (aplay on Linux, cmdmp3.exe on Windows) for playing sounds. Perfect? Hell
> no. But JavaSound really is too thoroughly broken, at least on Oracle JDK.
>
> Sorry for the harsh words. Where is the way out?
>
> All the best,
> Stefan
>
> --
> Stefan Reich
> BotCompany.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/sound-dev/attachments/20170814/f7654385/attachment.html>


More information about the sound-dev mailing list