openjdk should use pulseaudio by default

Bug #407299 reported by Oleksij Rempel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

openjdk-6-jre-headless use alsa by default. This brake things on karmic where pulseaudio is default sound system (choppy sound and more). The fix is simple:
edit /etc/java-6-openjdk/sound.properties and change

javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider
javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider
javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider
javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider

to

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

To reproduce try to use josm (javaopenstreetmap) and load some sound file... this will brake sound if you press pause and play again. After this fix, every thing working fine.

lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10

apt-cache policy openjdk-6-jre-headless
openjdk-6-jre-headless:
  Installiert: 6b16~pre4-0ubuntu7
  Kandidat: 6b16~pre4-0ubuntu7
  Versions-Tabelle:
 *** 6b16~pre4-0ubuntu7 0
        500 http://de.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Matthias Klose (doko) wrote :

what does happen, if pulseaudio is not installed? this is the case for server installations.

Revision history for this message
Oleksij Rempel (olerem) wrote : Re: [Bug 407299] Re: openjdk should use pulseaudio by default

If you prefer to answer with questions: do server need sound?
Or should awry one who make openstreetmap use other OS? Or there is some
other painless soulution for us?
or you expect i'll fix pulseaudio?
I do my job in OSS community and you probably do your. I reported this
bug to make it pain less for other _users_, awry one who use
ubuntu-server have more knowledge to edit this config then ubunu-desktop
users...

Revision history for this message
Matthias Klose (doko) wrote :

anyway, we have to check this first.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-6 - 6b16-1.6.1-1ubuntu1

---------------
openjdk-6 (6b16-1.6.1-1ubuntu1) karmic; urgency=low

  * Fix dependency on the java bridge packages.
  * debian/rules: Conditionalize stuff so that the recent release
    is never mentioned.
  * Remove obsolete patches in debian/patches.
  * Rebuild on armel to fix up libffi for the soft float abi.
  * For jaunty builds, fix IcedTeaPlugin failure to start with xulrunner 1.9.1
    (LP: #359407).
    - debian/patches/icedtea-plugin-use-runtime-nsIProcess-IID.diff: Add.
    - debian/rules: Apply it for jaunty builds.
  * Use pulseaudio as default serviceprovider for
    javax.sound.midi.MidiSystem and javax.sound.sampled.AudioSystem.
    LP: #407299.

 -- Matthias Klose <email address hidden> Sat, 26 Sep 2009 16:01:48 +0200

Changed in openjdk-6 (Ubuntu):
status: New → Fix Released
Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

Hello,

  I had a problem with the default setting of pulseaudio being the default serviceprovider for audio in openjdk, so I alternate values in /etc/java-6-openjdk/sound.properties to get my problem fixed.

Please look at LP: #491784

Revision history for this message
paul kashofer (paul-kashofer) wrote :

Hello,

I had a problem with the default setting of pulseaudio, too.
Because i am using Kubuntu (no pulseaudio).
Alternative values in /etc/java-6-openjdk/jre/lib/sound.properties did work, but brakes other Sound Software (vlc).

I am using Kubuntu 10.04

Revision history for this message
Fredrik Tolf (fredrik-dolda2000) wrote :

I would suggest that PulseAudio only be the default on distros that use it. I use Debian which doesn't use PulseAudio by default, and somehow this change seems to have trickled into it as well, judging by the comment from lib/sound.properties to provide feedback on this Launchpad bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.