Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8140620

Find and load default.sf2 as the default soundbank on Linux

XMLWordPrintable

    • b94


        As Fedora developers, we have been carrying a custom change in our OpenJDK distribution. It's a symlink from $JAVA_HOME/jre/lib/audio/default.sf2 to /usr/share/soundfonts/default.sf2.

        This makes Java have a soft dependency on the default.sf2 file. The
        default.sf2 file is the default soundfont file selected by Fedora. If
        the default.sf2 file is installed, the presence of this symlink makes
        OpenJDK use that default soundfont file to create a higher quality
        soundbank than the emergency soundbank it would create otherwise. If the default.sf2 file is missing, OpenJDK falls back to the emergency soundbank which is worse in quality.

        This is the original request from a user that prompted
        this change: https://bugzilla.redhat.com/show_bug.cgi?id=541466

        It turns out, however, that certain applications and build scripts break
        when they see a dangling symlink in $JAVA_HOME. An alternative solution that makes sense to me is to load the default.sf2 file from code. The following webrev does that:
        http://cr.openjdk.java.net/~omajid/webrevs/linux-default-sf2/

        This is similar in concept to the approach that the Windows-specific
        code in this file uses.

        Does this sound like a sensible change to add in OpenJDK? It would let more linux distributions take advantage of the default.sf2 file and
        would allow us to stop carrying a broken symlink. It looks to be of
        extremely low risk to me.

              omajid Omair Majid
              omajid Omair Majid
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: