<Sound Dev> [9] Review Request: Find and load default.sf2 as the default soundbank on Linux

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Oct 9 11:44:47 UTC 2015


Hi, Omair.
I do not see a problem to integrate such changes, since I assume you 
will plan to backport it to jdk8. But later in jdk9 however probably it 
will be better to move such information to the configuration file 
JAVA_HOME/conf/sound.properties

I have one note about the fix: the usage of libaudio.exists() vs 
defaultSoundFont.isFile(). I think we should use the same call in all 
cases, the question is which one. Also it is interesting should we check 
that the file is readable.

On 09.10.15 1:54, Omair Majid wrote:
> Hi,
>
> 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/00/
>
> 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.
>
> Thanks,
> Omair
>


-- 
Best regards, Sergey.


More information about the sound-dev mailing list