From mark at klomp.org Thu May 1 00:12:44 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 01 May 2008 09:12:44 +0200 Subject: IcedTea In-Reply-To: <17c6771e0804301637q7cec77e7n413dfde90e5d4c9d@mail.gmail.com> References: <17c6771e0804301321j2c071fcdq1a5460a798d8527d@mail.gmail.com> <4818F153.4000703@redhat.com> <17c6771e0804301637q7cec77e7n413dfde90e5d4c9d@mail.gmail.com> Message-ID: <1209625964.3996.28.camel@dijkstra.wildebeest.org> Hi Andrew, On Thu, 2008-05-01 at 00:37 +0100, Andrew John Hughes wrote: > In working with OpenJDK, using IcedTea would make it much easier for > me to build and work with, so having an up-to-date icedtea branch > would be very useful. As I say, I can easily merge across the patches > locally from icedtea6, but are people happy for me to push these to > the icedtea tree? Yes, that would be great. It is basically compile times that stop me from immediately applying stuff to 7 also. But with a little help I think we can keep up with both trees. Cheers, Mark From twisti at complang.tuwien.ac.at Thu May 1 01:32:36 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Thu, 01 May 2008 10:32:36 +0200 Subject: IcedTea In-Reply-To: <17c6771e0804301637q7cec77e7n413dfde90e5d4c9d@mail.gmail.com> References: <17c6771e0804301321j2c071fcdq1a5460a798d8527d@mail.gmail.com> <4818F153.4000703@redhat.com> <17c6771e0804301637q7cec77e7n413dfde90e5d4c9d@mail.gmail.com> Message-ID: <1209630756.32341.0.camel@workstation.home.at> On Thu, 2008-05-01 at 00:37 +0100, Andrew John Hughes wrote: > In working with OpenJDK, using IcedTea would make it much easier for > me to build and work with, so having an up-to-date icedtea branch > would be very useful. As I say, I can easily merge across the patches > locally from icedtea6, but are people happy for me to push these to > the icedtea tree? I'd be happy :-) - twisti From mark at klomp.org Thu May 1 01:58:12 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 01 May 2008 08:58:12 +0000 Subject: changeset in /hg/icedtea6: Fix some Gervill nits (correct Soundb... Message-ID: changeset 57bbbc3db355 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=57bbbc3db355 description: Fix some Gervill nits (correct Soundbank, IOExceptions on URL, wrong name). 2008-05-01 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ DLSSoundbankReader.java (getSoundbank(URL)): Don't throw IOException. (getSoundbank(File)): Allow soundbanks not ending in .dls. * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ PATSoundbankReader.java (getSoundbank(URL)): Don't throw IOException. * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ SF2SoundbankReader.java (getSoundbank(URL)): Likewise. (getSoundbank(File)): Allow soundbanks not ending in .sf2. * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ SoftSynthesizer.java (unloadAllInstruments): Check if Soundbank supported. (unloadInstruments): Likewise. diffstat: 5 files changed, 31 insertions(+), 2 deletions(-) ChangeLog | 15 ++++++++++ overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java | 5 ++- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATSoundbankReader.java | 2 + overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SF2SoundbankReader.java | 5 ++- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java | 6 ++++ diffs (101 lines): diff -r 7b560b84e143 -r 57bbbc3db355 ChangeLog --- a/ChangeLog Wed Apr 30 17:08:19 2008 -0400 +++ b/ChangeLog Thu May 01 10:57:58 2008 +0200 @@ -1,3 +1,18 @@ 2008-04-30 Thomas Fitzsimmons + + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ + DLSSoundbankReader.java (getSoundbank(URL)): Don't throw IOException. + (getSoundbank(File)): Allow soundbanks not ending in .dls. + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ + PATSoundbankReader.java (getSoundbank(URL)): Don't throw IOException. + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ + SF2SoundbankReader.java (getSoundbank(URL)): Likewise. + (getSoundbank(File)): Allow soundbanks not ending in .sf2. + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ + SoftSynthesizer.java (unloadAllInstruments): Check if Soundbank + supported. + (unloadInstruments): Likewise. + 2008-04-30 Thomas Fitzsimmons * rt/net/sourceforge/jnlp/security/MoreInfoPane.java: Fix typo. diff -r 7b560b84e143 -r 57bbbc3db355 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java Wed Apr 30 17:08:19 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java Thu May 01 10:57:58 2008 +0200 @@ -52,6 +52,10 @@ public class DLSSoundbankReader extends { return null; } + catch(IOException ioe) + { + return null; + } } public Soundbank getSoundbank(InputStream stream) throws InvalidMidiDataException, IOException { @@ -68,7 +72,6 @@ public class DLSSoundbankReader extends } public Soundbank getSoundbank(File file) throws InvalidMidiDataException, IOException { - if(!file.getPath().toLowerCase().endsWith(".dls")) return null; try { return new DLSSoundbank(file); diff -r 7b560b84e143 -r 57bbbc3db355 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATSoundbankReader.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATSoundbankReader.java Wed Apr 30 17:08:19 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATSoundbankReader.java Thu May 01 10:57:58 2008 +0200 @@ -59,6 +59,8 @@ public class PATSoundbankReader extends snk.addInstrument(ins); return snk; } catch (InvalidFormatException e) { + return null; + } catch (IOException ioe) { return null; } } diff -r 7b560b84e143 -r 57bbbc3db355 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SF2SoundbankReader.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SF2SoundbankReader.java Wed Apr 30 17:08:19 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SF2SoundbankReader.java Thu May 01 10:57:58 2008 +0200 @@ -55,6 +55,10 @@ public class SF2SoundbankReader extends { return null; } + catch(IOException ioe) + { + return null; + } } public Soundbank getSoundbank(InputStream stream) throws InvalidMidiDataException, IOException { @@ -71,7 +75,6 @@ public class SF2SoundbankReader extends } public Soundbank getSoundbank(File file) throws InvalidMidiDataException, IOException { - if(!file.getPath().toLowerCase().endsWith(".sf2")) return null; try { return new SF2Soundbank(file); diff -r 7b560b84e143 -r 57bbbc3db355 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java Wed Apr 30 17:08:19 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java Thu May 01 10:57:58 2008 +0200 @@ -593,6 +593,9 @@ public class SoftSynthesizer implements } public void unloadAllInstruments(Soundbank soundbank) { + + if(soundbank == null || !isSoundbankSupported(soundbank)) + throw new IllegalArgumentException("Unsupported soundbank: " + soundbank); if(!isOpen()) return; @@ -619,6 +622,9 @@ public class SoftSynthesizer implements public void unloadInstruments(Soundbank soundbank, Patch[] patchList) { + if(soundbank == null || !isSoundbankSupported(soundbank)) + throw new IllegalArgumentException("Unsupported soundbank: " + soundbank); + if(!isOpen()) return; From mwielaard at redhat.com Thu May 1 02:08:40 2008 From: mwielaard at redhat.com (Mark Wielaard) Date: Thu, 01 May 2008 11:08:40 +0200 Subject: Some small Gervill fixes Message-ID: <1209632920.3996.39.camel@dijkstra.wildebeest.org> Hi, I played with Gervill a little and found some small nits. First SoftSynth lets me unload Instruments from unsupported Soundbanks. Second some SoundbankReaders would throw IOExceptions on reads from bad URLs, these could be transient and so shouldn't be thrown to give another SoundbankReader a chance to try the URL again. And last DLSSoundbankReader and SF2SoundbankReader wouldn't let me open wrongly named files. 2008-05-01 Mark Wielaard * com/sun/media/sound/DLSSoundbankReader.java (getSoundbank(URL)): Don't throw IOException. (getSoundbank(File)): Allow soundbanks not ending in .dls. * com/sun/media/sound/PATSoundbankReader.java (getSoundbank(URL)): Don't throw IOException. * com/sun/media/sound/SF2SoundbankReader.java (getSoundbank(URL)): Likewise. (getSoundbank(File)): Allow soundbanks not ending in .sf2. * com/sun/media/sound/SoftSynthesizer.java (unloadAllInstruments): Check if Soundbank supported. (unloadInstruments): Likewise. Let me know what you think. I added these patches to IcedTea. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: text/x-patch Size: 2973 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080501/79412736/attachment.bin From mark at klomp.org Thu May 1 16:31:04 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 01 May 2008 23:31:04 +0000 Subject: changeset in /hg/icedtea6: Fix SoftChannel controlChange for lea... Message-ID: changeset 8810f9b6e357 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8810f9b6e357 description: Fix SoftChannel controlChange for least significant control values. 2008-05-01 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ SoftChannel.java (controlChange): Reset least significant controller if necessary. diffstat: 2 files changed, 13 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java | 8 +++++++- diffs (31 lines): diff -r 57bbbc3db355 -r 8810f9b6e357 ChangeLog --- a/ChangeLog Thu May 01 10:57:58 2008 +0200 +++ b/ChangeLog Fri May 02 01:30:56 2008 +0200 @@ -1,3 +1,9 @@ 2008-05-01 Mark Wielaard + + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ + SoftChannel.java (controlChange): Reset least significant + controller if necessary. + 2008-05-01 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ diff -r 57bbbc3db355 -r 8810f9b6e357 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java Thu May 01 10:57:58 2008 +0200 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java Fri May 02 01:30:56 2008 +0200 @@ -1170,7 +1170,13 @@ public class SoftChannel implements Midi return; } - this.controller[controller] = value; + // Keep track of values (capped to 7 bit). + // Reset least significant (32 through 63) + // controller value when most significant + // (0 through 31) is set. + this.controller[controller] = value & 127; + if (controller < 32) + this.controller[controller + 32] = 0; for (int i = 0; i < voices.length; i++) if (voices[i].active) From mwielaard at redhat.com Thu May 1 16:33:45 2008 From: mwielaard at redhat.com (Mark Wielaard) Date: Fri, 02 May 2008 01:33:45 +0200 Subject: Some small Gervill fixes In-Reply-To: <1209632920.3996.39.camel@dijkstra.wildebeest.org> References: <1209632920.3996.39.camel@dijkstra.wildebeest.org> Message-ID: <1209684825.29815.8.camel@dijkstra.wildebeest.org> Hi, Another small nit. In SoftChannel.controlChange() the controller values for least significant values (32-64) weren't reset to zero when the most significant values were set. This showed up when calling getController(). 2008-05-01 Mark Wielaard * com/sun/media/sound/SoftChannel.java (controlChange): Reset least significant controller if necessary. Let me know what you think. I added this patch to IcedTea. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: text/x-patch Size: 631 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080502/199f1053/attachment.bin From Joe.Darcy at Sun.COM Thu May 1 22:15:30 2008 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Thu, 01 May 2008 22:15:30 -0700 Subject: Gervill integrated into IcedTea In-Reply-To: <17c6771e0804301318w4bd72bd9o6a26d82fabcdca6c@mail.gmail.com> References: <1209586413.3996.24.camel@dijkstra.wildebeest.org> <17c6771e0804301318w4bd72bd9o6a26d82fabcdca6c@mail.gmail.com> Message-ID: <481AA372.8010406@sun.com> Andrew John Hughes wrote: > On 30/04/2008, Mark Wielaard wrote: [snip] > As to the jtreg hack, I fiddled about with a similar short bit of > shell hackery a few months back and managed to run the JMX tests this > way. Not a full-proof solution by any means, and I wouldn't attest to > it working well generally, but it does the job for the time being. > > The spec. for the jtreg files is available online. Was it not for a > Free version being in the works from Sun anyway, we could probably > implement a clone. jtreg has just been released under open source: http://blogs.sun.com/jjg/entry/jtreg_4_open_source -Joe From gnu_andrew at member.fsf.org Fri May 2 01:05:53 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 2 May 2008 09:05:53 +0100 Subject: Gervill integrated into IcedTea In-Reply-To: <481AA372.8010406@sun.com> References: <1209586413.3996.24.camel@dijkstra.wildebeest.org> <17c6771e0804301318w4bd72bd9o6a26d82fabcdca6c@mail.gmail.com> <481AA372.8010406@sun.com> Message-ID: <17c6771e0805020105m73a76857vd69a544636fae7dc@mail.gmail.com> 2008/5/2 Joseph D. Darcy : > Andrew John Hughes wrote: > > > On 30/04/2008, Mark Wielaard wrote: > > > > [snip] > > > > > As to the jtreg hack, I fiddled about with a similar short bit of > > shell hackery a few months back and managed to run the JMX tests this > > way. Not a full-proof solution by any means, and I wouldn't attest to > > it working well generally, but it does the job for the time being. > > > > The spec. for the jtreg files is available online. Was it not for a > > Free version being in the works from Sun anyway, we could probably > > implement a clone. > > > > jtreg has just been released under open source: > > http://blogs.sun.com/jjg/entry/jtreg_4_open_source > > -Joe > Presumably as Free Software as well? The jtreg page merely says: 'The majority of OpenJDK code is released under the GNU General Public License Version 2 (GPLv2).' Does this majority include jtreg? It's not very clear. If it is indeed GPLed, then many thanks to all those who made it possible to finally release this under more acceptable terms! I look forward to using it. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From twisti at complang.tuwien.ac.at Fri May 2 01:21:11 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Fri, 02 May 2008 10:21:11 +0200 Subject: Gervill integrated into IcedTea In-Reply-To: <17c6771e0805020105m73a76857vd69a544636fae7dc@mail.gmail.com> References: <1209586413.3996.24.camel@dijkstra.wildebeest.org> <17c6771e0804301318w4bd72bd9o6a26d82fabcdca6c@mail.gmail.com> <481AA372.8010406@sun.com> <17c6771e0805020105m73a76857vd69a544636fae7dc@mail.gmail.com> Message-ID: <1209716471.32341.2.camel@workstation.home.at> On Fri, 2008-05-02 at 09:05 +0100, Andrew John Hughes wrote: > Presumably as Free Software as well? The jtreg page merely says: > > 'The majority of OpenJDK code is released under the GNU General Public > License Version 2 (GPLv2).' > > Does this majority include jtreg? It's not very clear. > > If it is indeed GPLed, then many thanks to all those who made it > possible to finally release this under more acceptable terms! > I look forward to using it. The COPYRIGHT file says so: Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. - twisti From gnu_andrew at member.fsf.org Fri May 2 02:43:17 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 2 May 2008 10:43:17 +0100 Subject: Gervill integrated into IcedTea In-Reply-To: <1209716471.32341.2.camel@workstation.home.at> References: <1209586413.3996.24.camel@dijkstra.wildebeest.org> <17c6771e0804301318w4bd72bd9o6a26d82fabcdca6c@mail.gmail.com> <481AA372.8010406@sun.com> <17c6771e0805020105m73a76857vd69a544636fae7dc@mail.gmail.com> <1209716471.32341.2.camel@workstation.home.at> Message-ID: <17c6771e0805020243k2e1e93fbw371b11613c87f8ba@mail.gmail.com> 2008/5/2 Christian Thalinger : > On Fri, 2008-05-02 at 09:05 +0100, Andrew John Hughes wrote: > > Presumably as Free Software as well? The jtreg page merely says: > > > > 'The majority of OpenJDK code is released under the GNU General Public > > License Version 2 (GPLv2).' > > > > Does this majority include jtreg? It's not very clear. > > > > If it is indeed GPLed, then many thanks to all those who made it > > possible to finally release this under more acceptable terms! > > I look forward to using it. > > The COPYRIGHT file says so: > > Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. > DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > > This code is free software; you can redistribute it and/or modify it > under the terms of the GNU General Public License version 2 only, as > published by the Free Software Foundation. > > - twisti > > Ah good, it's just not clear on the website. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Sun May 4 09:47:45 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 04 May 2008 16:47:45 +0000 Subject: changeset in /hg/icedtea6: Allow directaudio to reopen hardware ... Message-ID: changeset bb8988602259 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=bb8988602259 description: Allow directaudio to reopen hardware device for line. 2008-05-04 Mark Wielaard * Makefile.am (ICEDTEA_PATCHES): Add patches/icedtea-directaudio-close-trick.patch. * Makefile.in: Regenerated. * patches/icedtea-directaudio-close-trick.patch: New patch. diffstat: 4 files changed, 94 insertions(+), 1 deletion(-) ChangeLog | 7 ++ Makefile.am | 1 Makefile.in | 3 patches/icedtea-directaudio-close-trick.patch | 84 +++++++++++++++++++++++++ diffs (126 lines): diff -r 8810f9b6e357 -r bb8988602259 ChangeLog --- a/ChangeLog Fri May 02 01:30:56 2008 +0200 +++ b/ChangeLog Sun May 04 18:47:31 2008 +0200 @@ -1,3 +1,10 @@ 2008-05-01 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Add + patches/icedtea-directaudio-close-trick.patch. + * Makefile.in: Regenerated. + * patches/icedtea-directaudio-close-trick.patch: New patch. + 2008-05-01 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/ diff -r 8810f9b6e357 -r bb8988602259 Makefile.am --- a/Makefile.am Fri May 02 01:30:56 2008 +0200 +++ b/Makefile.am Sun May 04 18:47:31 2008 +0200 @@ -310,6 +310,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-color-profiles.patch \ patches/icedtea-fonts.patch \ patches/icedtea-gervill.patch \ + patches/icedtea-directaudio-close-trick.patch \ $(GCC_PATCH) \ $(DISTRIBUTION_PATCHES) diff -r 8810f9b6e357 -r bb8988602259 Makefile.in --- a/Makefile.in Fri May 02 01:30:56 2008 +0200 +++ b/Makefile.in Sun May 04 18:47:31 2008 +0200 @@ -413,7 +413,8 @@ ICEDTEA_PATCHES = $(ZERO_PATCHES_COND) \ patches/icedtea-color-createcontext.patch \ patches/icedtea-color-profiles.patch \ patches/icedtea-fonts.patch patches/icedtea-gervill.patch \ - $(GCC_PATCH) $(DISTRIBUTION_PATCHES) $(am__append_7) + patches/icedtea-directaudio-close-trick.patch $(GCC_PATCH) \ + $(DISTRIBUTION_PATCHES) $(am__append_7) # Patch OpenJDK for plug replacements and ecj. ICEDTEA_ECJ_PATCH = patches/icedtea-ecj.patch diff -r 8810f9b6e357 -r bb8988602259 patches/icedtea-directaudio-close-trick.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-directaudio-close-trick.patch Sun May 04 18:47:31 2008 +0200 @@ -0,0 +1,84 @@ +--- /home/mark/src/openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-04-13 01:05:30.000000000 +0200 ++++ openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-05-04 18:42:39.000000000 +0200 +@@ -394,7 +394,10 @@ + private float leftGain, rightGain; + protected volatile boolean noService = false; // do not run the nService method + +- protected Object lockNative = new Object(); ++ // Guards all native calls and the lastOpened static variable. ++ protected static Object lockNative = new Object(); ++ // Keeps track of last opened line, see implOpen "trick". ++ protected static DirectDL lastOpened; + + // CONSTRUCTOR + protected DirectDL(DataLine.Info info, +@@ -496,20 +499,47 @@ + // align buffer to full frames + bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize(); + +- id = nOpen(mixerIndex, deviceID, isSource, +- encoding, +- hardwareFormat.getSampleRate(), +- hardwareFormat.getSampleSizeInBits(), +- hardwareFormat.getFrameSize(), +- hardwareFormat.getChannels(), +- hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), +- hardwareFormat.isBigEndian(), +- bufferSize); ++ synchronized(lockNative) { ++ id = nOpen(mixerIndex, deviceID, isSource, ++ encoding, ++ hardwareFormat.getSampleRate(), ++ hardwareFormat.getSampleSizeInBits(), ++ hardwareFormat.getFrameSize(), ++ hardwareFormat.getChannels(), ++ hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), ++ hardwareFormat.isBigEndian(), ++ bufferSize); ++ ++ if (id == 0) { ++ // Bah... Dirty trick. The most likely cause is an application ++ // already having a line open for this particular hardware ++ // format and forgetting about it. If so, silently close that ++ // implementation and try again. Unfortuantely we can only ++ // open one line per hardware format currently. ++ if (lastOpened != null ++ && hardwareFormat.matches(lastOpened.hardwareFormat)) { ++ lastOpened.implClose(); ++ lastOpened = null; ++ ++ id = nOpen(mixerIndex, deviceID, isSource, ++ encoding, ++ hardwareFormat.getSampleRate(), ++ hardwareFormat.getSampleSizeInBits(), ++ hardwareFormat.getFrameSize(), ++ hardwareFormat.getChannels(), ++ hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), ++ hardwareFormat.isBigEndian(), ++ bufferSize); ++ } ++ ++ if (id == 0) { ++ // TODO: nicer error messages... ++ throw new LineUnavailableException("line with format "+format+" not supported."); ++ } ++ } ++ lastOpened = this; ++ } + +- if (id == 0) { +- // TODO: nicer error messages... +- throw new LineUnavailableException("line with format "+format+" not supported."); +- } + this.bufferSize = nGetBufferSize(id, isSource); + if (this.bufferSize < 1) { + // this is an error! +@@ -616,6 +646,8 @@ + id = 0; + synchronized (lockNative) { + nClose(oldID, isSource); ++ if (lastOpened == this) ++ lastOpened = null; + } + bytePosition = 0; + softwareConversionSize = 0; From mark at klomp.org Sun May 4 10:19:47 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 4 May 2008 19:19:47 +0200 Subject: Opening multiple output lines In-Reply-To: <48191A17.3070604@redhat.com> References: <475F1063.6080109@sun.com> <48191A17.3070604@redhat.com> Message-ID: <20080504171929.GA20060@gnu.wildebeest.org> Hi Tom, On Wed, Apr 30, 2008 at 09:17:11PM -0400, Thomas Fitzsimmons wrote: >>> I'm testing a sound-using applet on Fedora 8. Sun JDK 1.6 runs the >>> appletcorrectly but OpenJDK does not. The applet attempts to open two >>> audio playback lines in succession, without closing the first before >>> attempting to open the second. >>> The first open attempt succeeds but the second attempt fails with: >>> >>> javax.sound.sampled.LineUnavailableException: line with format >>> PCM_SIGNED >>> 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported. >>> [...] >>> >>> The exception message is misleading since the line format is >>> supported. The actual cause of the failure is in: >>> >>> PLATFORM_API_LinuxOS_ALSA_PCMUtils.c:openPCMfromDeviceID >>> >>> This call: >>> >>> ret = snd_pcm_open(handle, buffer, >>> isSource?SND_PCM_STREAM_PLAYBACK:SND_PCM_STREAM_CAPTURE, >>> SND_PCM_NONBLOCK); >>> >>> returns the error corresponding to "Device or resource busy". > > Juraj Svec wrote: >> could you please send some more information? Output of the >> TRACE1("Opening ALSA device %s\n", buffer); above the snd_pcm_open would >> be great and also your sound card type and version will definitely help. > > I've attached the output of running AudioSystemGetLineTest against > openjdk-6-src-b09-11_apr_2008 with USE_TRACE defined, > and the description of my sound card reported by lspci -vv. I had the same problem with a similar setup and with applications that forget to close a line they don't use anymore (unfortunately this seems very common). With the current directaudio backend I don't see how multiple lines for the same hardware device could work though. So I am using a trick to look for "sloppy" applications. If the last line opened in the directaudio device was for the same hardware format then we silence that one first so we can hand out a new one. This seems to work surprisingly well. And it doesn't seem to interfere with applications that handle the hardware formats they need explicitly. With gcjwebplugin and this patch we can happily play the vNES games :) Of course a real solution would be to import or write a better mixer that does share lines properly. Cheers, Mark -------------- next part -------------- --- /home/mark/src/openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-04-13 01:05:30.000000000 +0200 +++ openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-05-04 18:42:39.000000000 +0200 @@ -394,7 +394,10 @@ private float leftGain, rightGain; protected volatile boolean noService = false; // do not run the nService method - protected Object lockNative = new Object(); + // Guards all native calls and the lastOpened static variable. + protected static Object lockNative = new Object(); + // Keeps track of last opened line, see implOpen "trick". + protected static DirectDL lastOpened; // CONSTRUCTOR protected DirectDL(DataLine.Info info, @@ -496,20 +499,47 @@ // align buffer to full frames bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize(); - id = nOpen(mixerIndex, deviceID, isSource, - encoding, - hardwareFormat.getSampleRate(), - hardwareFormat.getSampleSizeInBits(), - hardwareFormat.getFrameSize(), - hardwareFormat.getChannels(), - hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), - hardwareFormat.isBigEndian(), - bufferSize); + synchronized(lockNative) { + id = nOpen(mixerIndex, deviceID, isSource, + encoding, + hardwareFormat.getSampleRate(), + hardwareFormat.getSampleSizeInBits(), + hardwareFormat.getFrameSize(), + hardwareFormat.getChannels(), + hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), + hardwareFormat.isBigEndian(), + bufferSize); + + if (id == 0) { + // Bah... Dirty trick. The most likely cause is an application + // already having a line open for this particular hardware + // format and forgetting about it. If so, silently close that + // implementation and try again. Unfortuantely we can only + // open one line per hardware format currently. + if (lastOpened != null + && hardwareFormat.matches(lastOpened.hardwareFormat)) { + lastOpened.implClose(); + lastOpened = null; + + id = nOpen(mixerIndex, deviceID, isSource, + encoding, + hardwareFormat.getSampleRate(), + hardwareFormat.getSampleSizeInBits(), + hardwareFormat.getFrameSize(), + hardwareFormat.getChannels(), + hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), + hardwareFormat.isBigEndian(), + bufferSize); + } + + if (id == 0) { + // TODO: nicer error messages... + throw new LineUnavailableException("line with format "+format+" not supported."); + } + } + lastOpened = this; + } - if (id == 0) { - // TODO: nicer error messages... - throw new LineUnavailableException("line with format "+format+" not supported."); - } this.bufferSize = nGetBufferSize(id, isSource); if (this.bufferSize < 1) { // this is an error! @@ -616,6 +646,8 @@ id = 0; synchronized (lockNative) { nClose(oldID, isSource); + if (lastOpened == this) + lastOpened = null; } bytePosition = 0; softwareConversionSize = 0; From fitzsim at redhat.com Sun May 4 13:00:20 2008 From: fitzsim at redhat.com (Thomas Fitzsimmons) Date: Sun, 04 May 2008 20:00:20 +0000 Subject: changeset in /hg/icedtea6: 2008-05-04 Thomas Fitzsimmons changeset 8e665e78cbfe in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8e665e78cbfe description: 2008-05-04 Thomas Fitzsimmons * Makefile.am (EXTRA_DIST): Add patches/icedtea-netx-plugin.patch. diffstat: 2 files changed, 5 insertions(+) ChangeLog | 4 ++++ Makefile.am | 1 + diffs (22 lines): diff -r bb8988602259 -r 8e665e78cbfe ChangeLog --- a/ChangeLog Sun May 04 18:47:31 2008 +0200 +++ b/ChangeLog Sun May 04 13:00:16 2008 -0700 @@ -1,3 +1,7 @@ 2008-05-04 Mark Wielaard + + * Makefile.am (EXTRA_DIST): Add patches/icedtea-netx-plugin.patch. + 2008-05-04 Mark Wielaard * Makefile.am (ICEDTEA_PATCHES): Add diff -r bb8988602259 -r 8e665e78cbfe Makefile.am --- a/Makefile.am Sun May 04 18:47:31 2008 +0200 +++ b/Makefile.am Sun May 04 13:00:16 2008 -0700 @@ -42,6 +42,7 @@ EXTRA_DIST = rt generated $(ICEDTEA_PATC gcjwebplugin.cc tools-copy contrib ports \ patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES) \ patches/icedtea-cacao.patch javaws.png javaws.desktop \ + patches/icedtea-netx-plugin.patch \ overlays extra jconsole.desktop policytool.desktop # The Binary plugs directory is called jdk1.7.0 for historical reasons. The From fitzsim at redhat.com Sun May 4 13:12:53 2008 From: fitzsim at redhat.com (Thomas Fitzsimmons) Date: Sun, 04 May 2008 20:12:53 +0000 Subject: changeset in /hg/icedtea6: * Makefile.in: Regenerate. Message-ID: changeset 0a1846892905 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0a1846892905 description: * Makefile.in: Regenerate. diffstat: 2 files changed, 2 insertions(+) ChangeLog | 1 + Makefile.in | 1 + diffs (22 lines): diff -r 8e665e78cbfe -r 0a1846892905 ChangeLog --- a/ChangeLog Sun May 04 13:00:16 2008 -0700 +++ b/ChangeLog Sun May 04 13:12:48 2008 -0700 @@ -1,6 +1,7 @@ 2008-05-04 Thomas Fitzsimmons * Makefile.am (EXTRA_DIST): Add patches/icedtea-netx-plugin.patch. + * Makefile.in: Regenerate. 2008-05-04 Mark Wielaard diff -r 8e665e78cbfe -r 0a1846892905 Makefile.in --- a/Makefile.in Sun May 04 13:00:16 2008 -0700 +++ b/Makefile.in Sun May 04 13:12:48 2008 -0700 @@ -258,6 +258,7 @@ EXTRA_DIST = rt generated $(ICEDTEA_PATC gcjwebplugin.cc tools-copy contrib ports \ patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES) \ patches/icedtea-cacao.patch javaws.png javaws.desktop \ + patches/icedtea-netx-plugin.patch \ overlays extra jconsole.desktop policytool.desktop From mark at klomp.org Sun May 4 14:35:35 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 04 May 2008 21:35:35 +0000 Subject: changeset in /hg/icedtea6: Import HAT SPL/GPLv2 fix. Message-ID: changeset a952ab0e58fb in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a952ab0e58fb description: Import HAT SPL/GPLv2 fix. 2008-05-04 Mark Wielaard * Makefile.am (EXTRA_DIST): Add patches/icedtea-hat-spl-gpl.patch. * Makefile.in: Regenerate. * patches/icedtea-hat-spl-gpl.patch: New patch. diffstat: 4 files changed, 2142 insertions(+), 1 deletion(-) ChangeLog | 6 Makefile.am | 1 Makefile.in | 3 patches/icedtea-hat-spl-gpl.patch | 2133 +++++++++++++++++++++++++++++++++++++ diffs (truncated from 2174 to 500 lines): diff -r 0a1846892905 -r a952ab0e58fb ChangeLog --- a/ChangeLog Sun May 04 13:12:48 2008 -0700 +++ b/ChangeLog Sun May 04 23:35:04 2008 +0200 @@ -1,3 +1,9 @@ 2008-05-04 Thomas Fitzsimmons + + * Makefile.am (EXTRA_DIST): Add patches/icedtea-hat-spl-gpl.patch. + * Makefile.in: Regenerate. + * patches/icedtea-hat-spl-gpl.patch: New patch. + 2008-05-04 Thomas Fitzsimmons * Makefile.am (EXTRA_DIST): Add patches/icedtea-netx-plugin.patch. diff -r 0a1846892905 -r a952ab0e58fb Makefile.am --- a/Makefile.am Sun May 04 13:12:48 2008 -0700 +++ b/Makefile.am Sun May 04 23:35:04 2008 +0200 @@ -312,6 +312,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-fonts.patch \ patches/icedtea-gervill.patch \ patches/icedtea-directaudio-close-trick.patch \ + patches/icedtea-hat-spl-gpl.patch \ $(GCC_PATCH) \ $(DISTRIBUTION_PATCHES) diff -r 0a1846892905 -r a952ab0e58fb Makefile.in --- a/Makefile.in Sun May 04 13:12:48 2008 -0700 +++ b/Makefile.in Sun May 04 23:35:04 2008 +0200 @@ -414,7 +414,8 @@ ICEDTEA_PATCHES = $(ZERO_PATCHES_COND) \ patches/icedtea-color-createcontext.patch \ patches/icedtea-color-profiles.patch \ patches/icedtea-fonts.patch patches/icedtea-gervill.patch \ - patches/icedtea-directaudio-close-trick.patch $(GCC_PATCH) \ + patches/icedtea-directaudio-close-trick.patch \ + patches/icedtea-hat-spl-gpl.patch $(GCC_PATCH) \ $(DISTRIBUTION_PATCHES) $(am__append_7) # Patch OpenJDK for plug replacements and ecj. diff -r 0a1846892905 -r a952ab0e58fb patches/icedtea-hat-spl-gpl.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hat-spl-gpl.patch Sun May 04 23:35:04 2008 +0200 @@ -0,0 +1,2133 @@ +Changeset: d70a63c92b49 +Author: ohair +Date: 2008-04-30 17:34 -0700 +URL: http://hg.openjdk.java.net/jdk7/build/jdk/rev/d70a63c92b49 + +6695553: Cleanup GPLv2+SPL legal notices in hat sources +Summary: Just correcting the legal notices on the HAT sources. +Reviewed-by: alanb + +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/Main.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/Main.java Wed Apr 30 17:34:41 2008 -0700 +@@ -23,18 +23,10 @@ + * have any questions. + */ + +- + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/build.xml Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/build.xml Wed Apr 30 17:34:41 2008 -0700 +@@ -27,19 +27,9 @@ + + + +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/ArrayTypeCodes.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/ArrayTypeCodes.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/HackJavaValue.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/HackJavaValue.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaBoolean.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaBoolean.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaByte.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaByte.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaChar.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaChar.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaDouble.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaDouble.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaField.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaField.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaFloat.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaFloat.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaInt.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaInt.java Wed Apr 30 17:34:41 2008 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,20 +25,9 @@ + + + /* +- * The contents of this file are subject to the Sun Public License +- * Version 1.0 (the "License"); you may not use this file except in +- * compliance with the License. A copy of the License is available at +- * http://www.sun.com/, and in the file LICENSE.html in the +- * doc directory. +- * + * The Original Code is HAT. The Initial Developer of the + * Original Code is Bill Foote, with contributions from others +- * at JavaSoft/Sun. Portions created by Bill Foote and others +- * at Javasoft/Sun are Copyright (C) 1997-2004. All Rights Reserved. +- * +- * In addition to the formal license, I ask that you don't +- * change the history or donations files without permission. +- * ++ * at JavaSoft/Sun. + */ + + package com.sun.tools.hat.internal.model; +--- openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaLazyReadObject.java Fri Apr 18 16:40:32 2008 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaLazyReadObject.java Wed Apr 30 17:34:41 2008 -0700 From mark at klomp.org Sun May 4 14:37:53 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 04 May 2008 23:37:53 +0200 Subject: (J)Hat tool exclusion In-Reply-To: <4814D85A.8050604@sun.com> References: <1209309066.3103.24.camel@dijkstra.wildebeest.org> <4814D85A.8050604@sun.com> Message-ID: <1209937074.3058.1.camel@dijkstra.wildebeest.org> Hi Kelly, On Sun, 2008-04-27 at 12:47 -0700, Kelly O'Hair wrote: > IANAL ... I think this was just an oversight on our part. > I will investigate, since I was the one that initiated dragging > these files into the jdk sources. That was super quick. Thanks! I imported the fix into icedtea6. Distro people, please enable the HAT tool in your packages so it gets the testing it deserves. Cheers, Mark From bugzilla-daemon at icedtea.classpath.org Sun May 4 14:39:19 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 04 May 2008 21:39:19 +0000 Subject: [Bug 143] (J)Hat tool has conflicting GPL/SPL license terms Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=143 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from mark at klomp.org 2008-05-04 21:39 ------- Fixed in patches/icedtea-hat-spl-gpl.patch: Changeset: d70a63c92b49 Author: ohair Date: 2008-04-30 17:34 -0700 URL: http://hg.openjdk.java.net/jdk7/build/jdk/rev/d70a63c92b49 6695553: Cleanup GPLv2+SPL legal notices in hat sources Summary: Just correcting the legal notices on the HAT sources. Reviewed-by: alanb -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Sun May 4 14:39:19 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 04 May 2008 21:39:19 +0000 Subject: [Bug 138] jdk6 - GPL-compatible free software licenses and documented copyrights and licenses Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=138 Bug 138 depends on bug 143, which changed state. Bug 143 Summary: (J)Hat tool has conflicting GPL/SPL license terms http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=143 What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From Joe.Darcy at Sun.COM Sun May 4 15:15:12 2008 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Sun, 04 May 2008 15:15:12 -0700 Subject: (J)Hat tool exclusion In-Reply-To: <1209937074.3058.1.camel@dijkstra.wildebeest.org> References: <1209309066.3103.24.camel@dijkstra.wildebeest.org> <4814D85A.8050604@sun.com> <1209937074.3058.1.camel@dijkstra.wildebeest.org> Message-ID: <481E3570.8080703@sun.com> This fix has also been applied to the Sun internal OpenJDK 6 workspaces and will be reflected in our next source drop (after JavaOne). -Joe Mark Wielaard wrote: > Hi Kelly, > > On Sun, 2008-04-27 at 12:47 -0700, Kelly O'Hair wrote: >> IANAL ... I think this was just an oversight on our part. >> I will investigate, since I was the one that initiated dragging >> these files into the jdk sources. > > That was super quick. Thanks! I imported the fix into icedtea6. > Distro people, please enable the HAT tool in your packages so it gets > the testing it deserves. > > Cheers, > > Mark > From mark at klomp.org Sun May 4 15:30:30 2008 From: mark at klomp.org (Mark Wielaard) Date: Mon, 05 May 2008 00:30:30 +0200 Subject: SV: [Audio-engine-dev] Some small Gervill fixes In-Reply-To: <36EC82E93EB0AD40A4301DAD654323868CA4FB2ACA@mail.midverk.is> References: <1209632920.3996.39.camel@dijkstra.wildebeest.org> ,<1209684825.29815.8.camel@dijkstra.wildebeest.org> <36EC82E93EB0AD40A4301DAD654323868CA4FB2ACA@mail.midverk.is> Message-ID: <1209940230.3058.16.camel@dijkstra.wildebeest.org> Hi Karl, On Fri, 2008-05-02 at 16:25 +0000, Karl Helgason wrote: > I am not currently filtering the control values to 0..127 because some > user likes to be able to overdrive the values > for example to set Volume to 255 which mean more than 100% volume (it > was possible with the previous beatnik synthesizer). > This could however result in unpredictable behaviors. > If we want to prevent out of range values we should do that at the > beginning in the controlChange method with if statement. Aha, yes, I see. If the user is allowed to "boost" a control then maybe we should just let them. Reading those "weird" values back in getController() can lead to some strangeness though. > But it is cool to get more code reviewers :) Sun is planning to add > Gervill into OpenJDK 6 after JavaOne. That would be very cool. I am playing with frinika now on top of icedtea/openjdk with gervill integrated (frinika obviously works since it already had an older gervill imported). I never knew midi could be so much fun! > I have added this fix into the CVS and these also: > > - Added: AudioFloatFormatConverter, used to convert > between PCM_SIGNED, PCM_UNSIGNED, PCM_FLOAT in 8/16/24/32 bit (big/little endian), > and resample using (linear/cubic/sinc...) if needed. > - Added: WaveExtensibleReader, used to read WAV files using WAVE_FORMAT_EXTENSIBLE format. > - Added: WaveFloatFileWriter, used to writing WAV files with PCM_FLOAT encoding. > - Fix: AudioFloatConverter tests incorrectly AudioFormat frameSize against SampleSizeInBits > Support for 64-byte float added, and support for 32+ bit PCM samples. > SampleSizeInBits not dividable by 8 are now handled correctly. > - Fix: DLSID(GUID) values incorrectly read from files in DLSSoundBank. > - Fix: WaveFloatFileReader incorrectly sets framrate. > - Fix: DLSSoundbank writes avgBytesPerSec incorrectly if SampleSizeInBits is not dividable by 8. > - Fix: SoftChannel didn't reset concept of LSB control to 0 when MSB control value is set > (according to MIDI 1.0 Detailed Spec. page 12) > - Fix: SoftChannel, added check for illegal noteNumbers. > If illegal notenumber was used in NoteOn/NoteOff > a ArrayOutOfIndex exception was thrown. > > I especially proud of the new AudioFloatFormatConverter, it makes > sample rate conversion available via a FormatConversionProvider. > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4916960 O wow, very nice. I imported the new Gervill CVS version into IcedTea. Thanks, Mark From mark at klomp.org Sun May 4 15:31:59 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 04 May 2008 22:31:59 +0000 Subject: changeset in /hg/icedtea6: Import new Gervill CVS. Message-ID: changeset 4706d355d973 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4706d355d973 description: Import new Gervill CVS. 2008-05-04 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound: Import new Gervill CVS. See CHANGES.txt. Changed: AudioFloatConverter.java, DLSSoundbank.java, SoftChannel.java, WaveFloatFileReader.java. Added: AudioFloatFormatConverter.java, WaveExtensibleFileReader.java, WaveFloatFileWriter.java. Deleted: PATInstrument.java, PATSample.java, PATSoundbankReader.java. diffstat: 12 files changed, 1426 insertions(+), 973 deletions(-) ChangeLog | 9 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java | 384 +++++++ overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java | 523 +++++++++ overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt | 19 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java | 20 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATInstrument.java | 536 ---------- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATSample.java | 113 -- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/PATSoundbankReader.java | 296 ----- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java | 21 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java | 331 ++++++ overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/WaveFloatFileReader.java | 6 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/WaveFloatFileWriter.java | 141 ++ diffs (truncated from 2610 to 500 lines): diff -r a952ab0e58fb -r 4706d355d973 ChangeLog --- a/ChangeLog Sun May 04 23:35:04 2008 +0200 +++ b/ChangeLog Mon May 05 00:31:45 2008 +0200 @@ -1,3 +1,12 @@ 2008-05-04 Mark Wielaard + + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound: + Import new Gervill CVS. See CHANGES.txt. Changed: + AudioFloatConverter.java, DLSSoundbank.java, SoftChannel.java, + WaveFloatFileReader.java. Added: AudioFloatFormatConverter.java, + WaveExtensibleFileReader.java, WaveFloatFileWriter.java. Deleted: + PATInstrument.java, PATSample.java, PATSoundbankReader.java. + 2008-05-04 Mark Wielaard * Makefile.am (EXTRA_DIST): Add patches/icedtea-hat-spl-gpl.patch. diff -r a952ab0e58fb -r 4706d355d973 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java Sun May 04 23:35:04 2008 +0200 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java Mon May 05 00:31:45 2008 +0200 @@ -27,13 +27,14 @@ package com.sun.media.sound; import java.nio.ByteBuffer; import java.nio.ByteOrder; +import java.nio.DoubleBuffer; import java.nio.FloatBuffer; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat.Encoding; /** - * This class is used to convert between 8,16,24,32 bit signed/unsigned + * This class is used to convert between 8,16,24,32,32+ bit signed/unsigned * big/litle endian fixed/floating point byte buffers and float buffers. * * @version %I%, %E% @@ -43,6 +44,173 @@ public abstract class AudioFloatConverte public abstract class AudioFloatConverter { public static final Encoding PCM_FLOAT = new Encoding("PCM_FLOAT"); + + /*************************************************************************** + * + * LSB Filter, used filter least significant byte in samples arrays. + * + * Is used filter out data in lsb byte + * when SampleSizeInBits is not dividable by 8. + * + **************************************************************************/ + + private static class AudioFloatLSBFilter extends AudioFloatConverter { + + private AudioFloatConverter converter; + final private int offset; + final private int stepsize; + final private byte mask; + private byte[] mask_buffer; + + public AudioFloatLSBFilter(AudioFloatConverter converter, AudioFormat format) + { + int bits = format.getSampleSizeInBits(); + boolean bigEndian = format.isBigEndian(); + this.converter = converter; + stepsize = (bits + 7) / 8; + offset = bigEndian?(stepsize - 1):0; + int lsb_bits = bits % 8; + if(lsb_bits == 0) mask = (byte)0x00; + else if(lsb_bits == 1) mask = (byte)0x80; + else if(lsb_bits == 2) mask = (byte)0xC0; + else if(lsb_bits == 3) mask = (byte)0xE0; + else if(lsb_bits == 4) mask = (byte)0xF0; + else if(lsb_bits == 5) mask = (byte)0xF8; + else if(lsb_bits == 6) mask = (byte)0xFC; + else if(lsb_bits == 7) mask = (byte)0xFE; + else mask = (byte)0xFF; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, byte[] out_buff, int out_offset) { + byte[] ret = converter.toByteArray(in_buff, in_offset, in_len, out_buff, out_offset); + + int out_offset_end = in_len*stepsize; + for (int i = out_offset+offset; i < out_offset_end; i+=stepsize) { + out_buff[i] = (byte)(out_buff[i] & mask); + } + + return ret; + } + + public float[] toFloatArray(byte[] in_buff, int in_offset, float[] out_buff, int out_offset, int out_len) { + if(mask_buffer == null || mask_buffer.length < in_buff.length) + mask_buffer = new byte[in_buff.length]; + System.arraycopy(in_buff, 0, mask_buffer, 0, in_buff.length); + int in_offset_end = out_len*stepsize; + for (int i = in_offset+offset; i < in_offset_end; i+=stepsize) { + mask_buffer[i] = (byte)(mask_buffer[i] & mask); + } + float[] ret = converter.toFloatArray(mask_buffer, in_offset, out_buff, out_offset, out_len); + return ret; + } + + } + + /*************************************************************************** + * + * 64 bit float, little/big-endian + * + **************************************************************************/ + + // PCM 64 bit float, little-endian + private static class AudioFloatConversion64L extends AudioFloatConverter { + ByteBuffer bytebuffer = null; + + DoubleBuffer floatbuffer = null; + double[] double_buff = null; + + public float[] toFloatArray(byte[] in_buff, int in_offset, + float[] out_buff, int out_offset, int out_len) { + int in_len = out_len * 8; + if (bytebuffer == null || bytebuffer.capacity() < in_len) { + bytebuffer = ByteBuffer.allocate(in_len).order( + ByteOrder.LITTLE_ENDIAN); + floatbuffer = bytebuffer.asDoubleBuffer(); + } + bytebuffer.position(0); + floatbuffer.position(0); + bytebuffer.put(in_buff, in_offset, in_len); + if(double_buff == null || double_buff.length < out_len+out_offset) + double_buff = new double[out_len+out_offset]; + floatbuffer.get(double_buff, out_offset, out_len); + int out_offset_end = out_offset + out_len; + for (int i = out_offset; i < out_offset_end; i++) { + out_buff[i] = (float)double_buff[i]; + } + return out_buff; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, + byte[] out_buff, int out_offset) { + int out_len = in_len * 8; + if (bytebuffer == null || bytebuffer.capacity() < out_len) { + bytebuffer = ByteBuffer.allocate(out_len).order( + ByteOrder.LITTLE_ENDIAN); + floatbuffer = bytebuffer.asDoubleBuffer(); + } + floatbuffer.position(0); + bytebuffer.position(0); + if(double_buff == null || double_buff.length < in_offset+in_len) + double_buff = new double[in_offset+in_len]; + int in_offset_end = in_offset+in_len; + for (int i = in_offset; i < in_offset_end; i++) { + double_buff[i] = in_buff[i]; + } + floatbuffer.put(double_buff, in_offset, in_len); + bytebuffer.get(out_buff, out_offset, out_len); + return out_buff; + } + } + + // PCM 64 bit float, big-endian + private static class AudioFloatConversion64B extends AudioFloatConverter { + ByteBuffer bytebuffer = null; + + DoubleBuffer floatbuffer = null; + double[] double_buff = null; + + public float[] toFloatArray(byte[] in_buff, int in_offset, + float[] out_buff, int out_offset, int out_len) { + int in_len = out_len * 8; + if (bytebuffer == null || bytebuffer.capacity() < in_len) { + bytebuffer = ByteBuffer.allocate(in_len).order( + ByteOrder.BIG_ENDIAN); + floatbuffer = bytebuffer.asDoubleBuffer(); + } + bytebuffer.position(0); + floatbuffer.position(0); + bytebuffer.put(in_buff, in_offset, in_len); + if(double_buff == null || double_buff.length < out_len+out_offset) + double_buff = new double[out_len+out_offset]; + floatbuffer.get(double_buff, out_offset, out_len); + int out_offset_end = out_offset + out_len; + for (int i = out_offset; i < out_offset_end; i++) { + out_buff[i] = (float)double_buff[i]; + } + return out_buff; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, + byte[] out_buff, int out_offset) { + int out_len = in_len * 8; + if (bytebuffer == null || bytebuffer.capacity() < out_len) { + bytebuffer = ByteBuffer.allocate(out_len).order( + ByteOrder.BIG_ENDIAN); + floatbuffer = bytebuffer.asDoubleBuffer(); + } + floatbuffer.position(0); + bytebuffer.position(0); + if(double_buff == null || double_buff.length < in_offset+in_len) + double_buff = new double[in_offset+in_len]; + int in_offset_end = in_offset+in_len; + for (int i = in_offset; i < in_offset_end; i++) { + double_buff[i] = in_buff[i]; + } + floatbuffer.put(double_buff, in_offset, in_len); + bytebuffer.get(out_buff, out_offset, out_len); + return out_buff; + } + } /*************************************************************************** * @@ -549,14 +717,196 @@ public abstract class AudioFloatConverte } } + /*************************************************************************** + * + * 32+ bit signed/unsigned, little/big-endian + * + **************************************************************************/ + + // PCM 32+ bit, signed, little-endian + private static class AudioFloatConversion32xSL extends AudioFloatConverter { + + final int xbytes; + + public AudioFloatConversion32xSL(int xbytes) + { + this.xbytes = xbytes; + } + + public float[] toFloatArray(byte[] in_buff, int in_offset, + float[] out_buff, int out_offset, int out_len) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < out_len; i++) { + ix += xbytes; + int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8) + | ((in_buff[ix++] & 0xFF) << 16) + | ((in_buff[ix++] & 0xFF) << 24); + out_buff[ox++] = x * (1.0f / 2147483647.0f); + } + return out_buff; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, + byte[] out_buff, int out_offset) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < in_len; i++) { + int x = (int) (in_buff[ix++] * 2147483647.0); + for (int j = 0; j < xbytes; j++) { + out_buff[ox++] = 0; + } + out_buff[ox++] = (byte) x; + out_buff[ox++] = (byte) (x >>> 8); + out_buff[ox++] = (byte) (x >>> 16); + out_buff[ox++] = (byte) (x >>> 24); + } + return out_buff; + } + } + + // PCM 32+ bit, signed, big-endian + private static class AudioFloatConversion32xSB extends AudioFloatConverter { + + final int xbytes; + + public AudioFloatConversion32xSB(int xbytes) + { + this.xbytes = xbytes; + } + + public float[] toFloatArray(byte[] in_buff, int in_offset, + float[] out_buff, int out_offset, int out_len) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < out_len; i++) { + int x = ((in_buff[ix++] & 0xFF) << 24) + | ((in_buff[ix++] & 0xFF) << 16) + | ((in_buff[ix++] & 0xFF) << 8) + | (in_buff[ix++] & 0xFF); + ix += xbytes; + out_buff[ox++] = x * (1.0f / 2147483647.0f); + } + return out_buff; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, + byte[] out_buff, int out_offset) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < in_len; i++) { + int x = (int) (in_buff[ix++] * 2147483647.0); + out_buff[ox++] = (byte) (x >>> 24); + out_buff[ox++] = (byte) (x >>> 16); + out_buff[ox++] = (byte) (x >>> 8); + out_buff[ox++] = (byte) x; + for (int j = 0; j < xbytes; j++) { + out_buff[ox++] = 0; + } + } + return out_buff; + } + } + + // PCM 32+ bit, unsigned, little-endian + private static class AudioFloatConversion32xUL extends AudioFloatConverter { + + final int xbytes; + + public AudioFloatConversion32xUL(int xbytes) + { + this.xbytes = xbytes; + } + + public float[] toFloatArray(byte[] in_buff, int in_offset, + float[] out_buff, int out_offset, int out_len) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < out_len; i++) { + ix += xbytes; + int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8) + | ((in_buff[ix++] & 0xFF) << 16) + | ((in_buff[ix++] & 0xFF) << 24); + x -= 2147483647; + out_buff[ox++] = x * (1.0f / 2147483647.0f); + } + return out_buff; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, + byte[] out_buff, int out_offset) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < in_len; i++) { + int x = (int) (in_buff[ix++] * 2147483647.0); + x += 2147483647; + for (int j = 0; j < xbytes; j++) { + out_buff[ox++] = 0; + } + out_buff[ox++] = (byte) x; + out_buff[ox++] = (byte) (x >>> 8); + out_buff[ox++] = (byte) (x >>> 16); + out_buff[ox++] = (byte) (x >>> 24); + } + return out_buff; + } + } + + // PCM 32+ bit, unsigned, big-endian + private static class AudioFloatConversion32xUB extends AudioFloatConverter { + + final int xbytes; + + public AudioFloatConversion32xUB(int xbytes) + { + this.xbytes = xbytes; + } + + public float[] toFloatArray(byte[] in_buff, int in_offset, + float[] out_buff, int out_offset, int out_len) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < out_len; i++) { + int x = ((in_buff[ix++] & 0xFF) << 24) + | ((in_buff[ix++] & 0xFF) << 16) + | ((in_buff[ix++] & 0xFF) << 8) + | (in_buff[ix++] & 0xFF); + ix += xbytes; + x -= 2147483647; + out_buff[ox++] = x * (1.0f / 2147483647.0f); + } + return out_buff; + } + + public byte[] toByteArray(float[] in_buff, int in_offset, int in_len, + byte[] out_buff, int out_offset) { + int ix = in_offset; + int ox = out_offset; + for (int i = 0; i < in_len; i++) { + int x = (int) (in_buff[ix++] * 2147483647.0); + x += 2147483647; + out_buff[ox++] = (byte) (x >>> 24); + out_buff[ox++] = (byte) (x >>> 16); + out_buff[ox++] = (byte) (x >>> 8); + out_buff[ox++] = (byte) x; + for (int j = 0; j < xbytes; j++) { + out_buff[ox++] = 0; + } + } + return out_buff; + } + } + + public static AudioFloatConverter getConverter(AudioFormat format) { AudioFloatConverter conv = null; - if (format.getFrameSize() != (format.getSampleSizeInBits() / 8) + if (format.getFrameSize() == 0) return null; + if (format.getFrameSize() != ((format.getSampleSizeInBits()+7) / 8) * format.getChannels()) return null; if (format.getEncoding().equals(Encoding.PCM_SIGNED)) { if (format.isBigEndian()) { - if (format.getSampleSizeInBits() == 8) + if (format.getSampleSizeInBits() <= 8) conv = new AudioFloatConversion8S(); else if (format.getSampleSizeInBits() > 8 && format.getSampleSizeInBits() <= 16) @@ -567,8 +917,10 @@ public abstract class AudioFloatConverte else if (format.getSampleSizeInBits() > 24 && format.getSampleSizeInBits() <= 32) conv = new AudioFloatConversion32SB(); + else if (format.getSampleSizeInBits() > 32) + conv = new AudioFloatConversion32xSB(((format.getSampleSizeInBits()+7)/8)-4); } else { - if (format.getSampleSizeInBits() == 8) + if (format.getSampleSizeInBits() <= 8) conv = new AudioFloatConversion8S(); else if (format.getSampleSizeInBits() > 8 & format.getSampleSizeInBits() <= 16) @@ -579,10 +931,12 @@ public abstract class AudioFloatConverte else if (format.getSampleSizeInBits() > 24 && format.getSampleSizeInBits() <= 32) conv = new AudioFloatConversion32SL(); + else if (format.getSampleSizeInBits() > 32) + conv = new AudioFloatConversion32xSL(((format.getSampleSizeInBits()+7)/8)-4); } } else if (format.getEncoding().equals(Encoding.PCM_UNSIGNED)) { if (format.isBigEndian()) { - if (format.getSampleSizeInBits() == 8) + if (format.getSampleSizeInBits() <= 8) conv = new AudioFloatConversion8U(); else if (format.getSampleSizeInBits() > 8 && format.getSampleSizeInBits() <= 16) @@ -593,8 +947,10 @@ public abstract class AudioFloatConverte else if (format.getSampleSizeInBits() > 24 && format.getSampleSizeInBits() <= 32) conv = new AudioFloatConversion32UB(); + else if (format.getSampleSizeInBits() > 32) + conv = new AudioFloatConversion32xUB(((format.getSampleSizeInBits()+7)/8)-4); } else { - if (format.getSampleSizeInBits() == 8) + if (format.getSampleSizeInBits() <= 8) conv = new AudioFloatConversion8U(); else if (format.getSampleSizeInBits() > 8 && format.getSampleSizeInBits() <= 16) @@ -605,6 +961,8 @@ public abstract class AudioFloatConverte else if (format.getSampleSizeInBits() > 24 && format.getSampleSizeInBits() <= 32) conv = new AudioFloatConversion32UL(); + else if (format.getSampleSizeInBits() > 32) + conv = new AudioFloatConversion32xUL(((format.getSampleSizeInBits()+7)/8)-4); } } else if (format.getEncoding().equals(PCM_FLOAT)) { if (format.getSampleSizeInBits() == 32) { @@ -613,6 +971,20 @@ public abstract class AudioFloatConverte else conv = new AudioFloatConversion32L(); } + else + if (format.getSampleSizeInBits() == 64) { + if (format.isBigEndian()) + conv = new AudioFloatConversion64B(); + else + conv = new AudioFloatConversion64L(); + } + + } + + if ((format.getEncoding().equals(Encoding.PCM_SIGNED) || + format.getEncoding().equals(Encoding.PCM_UNSIGNED)) + && (format.getSampleSizeInBits() % 8 != 0)) { + conv = new AudioFloatLSBFilter(conv, format); } if (conv != null) diff -r a952ab0e58fb -r 4706d355d973 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java Mon May 05 00:31:45 2008 +0200 @@ -0,0 +1,523 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * From langel at redhat.com Mon May 5 07:06:06 2008 From: langel at redhat.com (Lillian Angel) Date: Mon, 05 May 2008 14:06:06 +0000 Subject: changeset in /hg/icedtea6: 2008-05-05 Lillian Angel changeset dce24bd81691 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=dce24bd81691 description: 2008-05-05 Lillian Angel * jconsole.desktop: Fixed typo. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ policytool.desktop | 2 +- diffs (23 lines): diff -r 4706d355d973 -r dce24bd81691 ChangeLog --- a/ChangeLog Mon May 05 00:31:45 2008 +0200 +++ b/ChangeLog Mon May 05 10:06:01 2008 -0400 @@ -1,3 +1,7 @@ 2008-05-04 Mark Wielaard + + * jconsole.desktop: Fixed typo. + 2008-05-04 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound: diff -r 4706d355d973 -r dce24bd81691 policytool.desktop --- a/policytool.desktop Mon May 05 00:31:45 2008 +0200 +++ b/policytool.desktop Mon May 05 10:06:01 2008 -0400 @@ -1,7 +1,7 @@ [Desktop Entry] Name=OpenJDK Policy Tool Comment=Manage OpenJDK policy files -Exec=/usr/binpolicytool +Exec=/usr/bin/policytool Icon=java Terminal=false Type=Application From jsumali at redhat.com Tue May 6 10:11:28 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Tue, 06 May 2008 17:11:28 +0000 Subject: changeset in /hg/icedtea6: 2008-05-06 Joshua Sumali changeset 506ca3ba0559 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=506ca3ba0559 description: 2008-05-06 Joshua Sumali * rt/net/sourceforge/jnlp/security/CertWarningPane.java: Get publisher name from certificate instead of vendor field in jnlp file. diffstat: 2 files changed, 10 insertions(+), 10 deletions(-) ChangeLog | 5 +++++ rt/net/sourceforge/jnlp/security/CertWarningPane.java | 15 +++++---------- diffs (38 lines): diff -r dce24bd81691 -r 506ca3ba0559 ChangeLog --- a/ChangeLog Mon May 05 10:06:01 2008 -0400 +++ b/ChangeLog Tue May 06 13:11:19 2008 -0400 @@ -1,3 +1,8 @@ 2008-05-05 Lillian Angel + + * rt/net/sourceforge/jnlp/security/CertWarningPane.java: Get publisher + name from certificate instead of vendor field in jnlp file. + 2008-05-05 Lillian Angel * jconsole.desktop: Fixed typo. diff -r dce24bd81691 -r 506ca3ba0559 rt/net/sourceforge/jnlp/security/CertWarningPane.java --- a/rt/net/sourceforge/jnlp/security/CertWarningPane.java Mon May 05 10:06:01 2008 -0400 +++ b/rt/net/sourceforge/jnlp/security/CertWarningPane.java Tue May 06 13:11:19 2008 -0400 @@ -91,17 +91,12 @@ public class CertWarningPane extends Sec } try { - //Really ugly way of getting the publisher... - if (file instanceof PluginBridge) { - Certificate c = ((SecurityWarningDialog)optionPane) - .getJarSigner().getPublisher(); - if (c instanceof X509Certificate) { - publisher = getCN(((X509Certificate)c) - .getSubjectX500Principal().getName()); - } + Certificate c = ((SecurityWarningDialog)optionPane) + .getJarSigner().getPublisher(); + if (c instanceof X509Certificate) { + publisher = getCN(((X509Certificate)c) + .getSubjectX500Principal().getName()); } - else - publisher = file.getInformation().getVendor(); } catch (Exception e) { } From jsumali at redhat.com Wed May 7 07:43:03 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Wed, 07 May 2008 14:43:03 +0000 Subject: changeset in /hg/icedtea6: 2008-05-07 Joshua Sumali changeset 1f85b520d105 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1f85b520d105 description: 2008-05-07 Joshua Sumali * rt/net/sourceforge/jnlp/cache/ResourceTracker.java: Close URL connections nicely instead of leaving them open. diffstat: 2 files changed, 18 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ rt/net/sourceforge/jnlp/cache/ResourceTracker.java | 15 +++++++++++++-- diffs (65 lines): diff -r 506ca3ba0559 -r 1f85b520d105 ChangeLog --- a/ChangeLog Tue May 06 13:11:19 2008 -0400 +++ b/ChangeLog Wed May 07 10:42:42 2008 -0400 @@ -1,3 +1,8 @@ 2008-05-06 Joshua Sumali + + * rt/net/sourceforge/jnlp/cache/ResourceTracker.java: Close URL + connections nicely instead of leaving them open. + 2008-05-06 Joshua Sumali * rt/net/sourceforge/jnlp/security/CertWarningPane.java: Get publisher diff -r 506ca3ba0559 -r 1f85b520d105 rt/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/rt/net/sourceforge/jnlp/cache/ResourceTracker.java Tue May 06 13:11:19 2008 -0400 +++ b/rt/net/sourceforge/jnlp/cache/ResourceTracker.java Wed May 07 10:42:42 2008 -0400 @@ -600,7 +600,8 @@ public class ResourceTracker { try { // create out second in case in does not exist - InputStream in = new BufferedInputStream( resource.connection.getInputStream() ); + URLConnection con = resource.location.openConnection(); + InputStream in = new BufferedInputStream(con.getInputStream()); OutputStream out = CacheUtil.getOutputStream(resource.location, resource.downloadVersion); byte buf[] = new byte[1024]; int rlen; @@ -612,6 +613,10 @@ public class ResourceTracker { in.close(); out.close(); + + // explicitly close the URLConnection. + if (con instanceof HttpURLConnection) + ((HttpURLConnection)con).disconnect(); resource.changeStatus(DOWNLOADING, DOWNLOADED); synchronized(lock) { @@ -648,7 +653,7 @@ public class ResourceTracker { synchronized(resource) { resource.localFile = localFile; - resource.connection = connection; + // resource.connection = connection; resource.size = size; resource.changeStatus(CONNECT|CONNECTING, CONNECTED); @@ -669,6 +674,10 @@ public class ResourceTracker { lock.notifyAll(); // wake up wait's to check for completion } resource.fireDownloadEvent(); // fire CONNECTED + + // explicitly close the URLConnection. + if (connection instanceof HttpURLConnection) + ((HttpURLConnection)connection).disconnect(); } catch (Exception ex) { if (JNLPRuntime.isDebug()) @@ -857,6 +866,8 @@ public class ResourceTracker { synchronized (lock) { // check for completion for (int i=0; i < resources.length; i++) { + //NetX Deadlocking may be solved by removing this + //synch block. synchronized (resources[i]) { if (!resources[i].isSet(DOWNLOADED | ERROR)) { finished = false; From bugzilla-daemon at icedtea.classpath.org Wed May 7 08:28:22 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 07 May 2008 15:28:22 +0000 Subject: [Bug 135] OpenJDK segfaults when running a java project of mine Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=135 ------- Comment #7 from langel at redhat.com 2008-05-07 15:28 ------- is this still a problem? do you have a testcase that fails? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed May 7 09:14:27 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 07 May 2008 16:14:27 +0000 Subject: [Bug 150] New: truststore settings in hotspot Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=150 Summary: truststore settings in hotspot Product: IcedTea Version: unspecified Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: nitya.doraisamy at sun.com system properties javax.net.ssl.trustStrore, trustStorePassword and javax.net.ssl.trustStoreType are being set in hotspot and these changes don't really belong there. The code in hotspot/src/os/linux/vm/os_linux.cpp which sets the system properties as part of hotspot should be removeed and the corrects changes should be made in jdk/src/share/classes/sun/security/ssl/TrustManagerImpl.java. This includes code to point to a new default truststore and the new trustStore type. http://icedtea.classpath.org/hg/icedtea6/file/d0081b7856c8/patches/icedtea-certbundle.patch The current settings may cause any app that were to implicitly depend on the default truststore to end up not working unless they overrode with a custom system prop which they were not earlier doing. This may be a problem for Java apps that did not have such an setting made earlier. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From jsumali at redhat.com Wed May 7 10:31:48 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Wed, 07 May 2008 17:31:48 +0000 Subject: changeset in /hg/icedtea6: 2008-05-07 Joshua Sumali changeset 07c44f5d2c52 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=07c44f5d2c52 description: 2008-05-07 Joshua Sumali * rt/net/sourceforge/jnlp/Launcher.java: Check main jar for main class in case main class isn't specified in the jnlp file. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add main class error messages. diffstat: 3 files changed, 28 insertions(+) ChangeLog | 7 ++++++ rt/net/sourceforge/jnlp/Launcher.java | 19 +++++++++++++++++ rt/net/sourceforge/jnlp/resources/Messages.properties | 2 + diffs (62 lines): diff -r 1f85b520d105 -r 07c44f5d2c52 ChangeLog --- a/ChangeLog Wed May 07 10:42:42 2008 -0400 +++ b/ChangeLog Wed May 07 13:31:36 2008 -0400 @@ -1,3 +1,10 @@ 2008-05-07 Joshua Sumali + + * rt/net/sourceforge/jnlp/Launcher.java: Check main jar for main class in + case main class isn't specified in the jnlp file. + * rt/net/sourceforge/jnlp/resources/Messages.properties: Add main class + error messages. + 2008-05-07 Joshua Sumali * rt/net/sourceforge/jnlp/cache/ResourceTracker.java: Close URL diff -r 1f85b520d105 -r 07c44f5d2c52 rt/net/sourceforge/jnlp/Launcher.java --- a/rt/net/sourceforge/jnlp/Launcher.java Wed May 07 10:42:42 2008 -0400 +++ b/rt/net/sourceforge/jnlp/Launcher.java Wed May 07 13:31:36 2008 -0400 @@ -21,6 +21,7 @@ import java.awt.Container; import java.awt.Container; import java.io.*; import java.net.*; +import java.util.jar.JarFile; import java.lang.reflect.*; import net.sourceforge.jnlp.cache.*; @@ -317,6 +318,24 @@ public class Launcher { app.initialize(); String mainName = file.getApplication().getMainClass(); + + // When the application-desc field is empty, we should take a + // look at the main jar for the main class. + if (mainName == null) { + JARDesc mainJarDesc = file.getResources().getMainJAR(); + File f = CacheUtil.getCacheFile(mainJarDesc.getLocation(), null); + if (f != null) { + JarFile mainJar = new JarFile(f); + mainName = mainJar.getManifest(). + getMainAttributes().getValue("Main-Class"); + } + } + + if (mainName == null) + throw launchError(new LaunchException(file, null, + R("LSFatal"), R("LCClient"), R("LCantDetermineMainClass") , + R("LCantDetermineMainClassInfo"))); + Class mainClass = app.getClassLoader().loadClass(mainName); Method main = mainClass.getDeclaredMethod("main", new Class[] {String[].class} ); diff -r 1f85b520d105 -r 07c44f5d2c52 rt/net/sourceforge/jnlp/resources/Messages.properties --- a/rt/net/sourceforge/jnlp/resources/Messages.properties Wed May 07 10:42:42 2008 -0400 +++ b/rt/net/sourceforge/jnlp/resources/Messages.properties Wed May 07 13:31:36 2008 -0400 @@ -48,6 +48,8 @@ LInitApplicationInfo= LInitApplicationInfo= LNotLaunchable=Not a launchable JNLP file. LNotLaunchableInfo=File must be a JNLP application, applet, or installer type. +LCantDetermineMainClass=Unknown Main-Class. +LCantDetermineMainClassInfo=Could not determine the main class for this application. JNotApplet=File is not an applet. JNotApplication=File is not an application. From bugzilla-daemon at icedtea.classpath.org Wed May 7 11:16:59 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 07 May 2008 18:16:59 +0000 Subject: [Bug 135] OpenJDK segfaults when running a java project of mine Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=135 ------- Comment #8 from konrad at tylerc.org 2008-05-07 18:16 ------- It's still a problem, but I don't have a testcase yet. Feel free to close this bug. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed May 7 13:00:12 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 07 May 2008 20:00:12 +0000 Subject: [Bug 150] truststore settings in hotspot Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=150 ------- Comment #1 from langel at redhat.com 2008-05-07 20:00 ------- $ ls openjdk6/jdk/src/share/classes/sun/security/ssl/TrustManagerImpl.java ls: cannot access openjdk6/jdk/src/share/classes/sun/security/ssl/TrustManagerImpl.java: No such file or directory Are you sure this is the right file? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed May 7 13:30:16 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 07 May 2008 20:30:16 +0000 Subject: [Bug 150] truststore settings in hotspot Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=150 ------- Comment #2 from nitya.doraisamy at sun.com 2008-05-07 20:30 ------- Sorry, that should be TrustManagerFactoryImpl.java. See the following,around lines 130-200 : http://hg.openjdk.java.net/jdk7/jsn-gate/jdk/file/d95a6a4ea502/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Thu May 8 08:05:01 2008 From: langel at redhat.com (Lillian Angel) Date: Thu, 08 May 2008 15:05:01 +0000 Subject: changeset in /hg/icedtea6: 2008-05-08 Lillian Angel changeset d86e9eb1fa7d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d86e9eb1fa7d description: 2008-05-08 Lillian Angel Fixes Bug #150 * patches/icedtea-certbundle.patch: Moved system properties defined in hotspot to TrustManagerFactoryImpl. * icedtea-use-system-tzdata.patch: Updated to patch cleanly. diffstat: 3 files changed, 47 insertions(+), 38 deletions(-) ChangeLog | 7 ++++ patches/icedtea-certbundle.patch | 51 ++++++++++++++++--------------- patches/icedtea-use-system-tzdata.patch | 27 +++++++--------- diffs (114 lines): diff -r 07c44f5d2c52 -r d86e9eb1fa7d ChangeLog --- a/ChangeLog Wed May 07 13:31:36 2008 -0400 +++ b/ChangeLog Thu May 08 11:04:53 2008 -0400 @@ -1,3 +1,10 @@ 2008-05-07 Joshua Sumali + + Fixes Bug #150 + * patches/icedtea-certbundle.patch: Moved system properties defined in + hotspot to TrustManagerFactoryImpl. + * icedtea-use-system-tzdata.patch: Updated to patch cleanly. + 2008-05-07 Joshua Sumali * rt/net/sourceforge/jnlp/Launcher.java: Check main jar for main class in diff -r 07c44f5d2c52 -r d86e9eb1fa7d patches/icedtea-certbundle.patch --- a/patches/icedtea-certbundle.patch Wed May 07 13:31:36 2008 -0400 +++ b/patches/icedtea-certbundle.patch Thu May 08 11:04:53 2008 -0400 @@ -1,27 +1,3 @@ diff -urN openjdk.orig/hotspot/src/os/li -diff -urN openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2007-10-12 03:46:00.000000000 -0400 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2007-10-12 18:24:12.000000000 -0400 -@@ -376,6 +382,20 @@ - } - } - -+ SystemProperty* sp = Arguments::system_properties(); -+ Arguments::PropertyList_add (&sp, -+ "javax.net.ssl.trustStore", -+ "/etc/pki/tls/certs/ca-bundle.crt"); -+ Arguments::PropertyList_add (&sp, -+ "javax.net.ssl.trustStoreType", -+ "CertBundle"); -+ Arguments::PropertyList_add (&sp, -+ "javax.net.ssl.trustStoreProvider", -+ ""); -+ Arguments::PropertyList_add (&sp, -+ "javax.net.ssl.trustStorePassword", -+ ""); -+ - #undef malloc - #undef getenv - #undef EXTENSIONS_DIR diff -urN openjdk.orig/jdk/src/share/classes/sun/security/provider/CertBundleKeyStoreImpl.java openjdk/jdk/src/share/classes/sun/security/provider/CertBundleKeyStoreImpl.java --- openjdk.orig/jdk/src/share/classes/sun/security/provider/CertBundleKeyStoreImpl.java 1969-12-31 19:00:00.000000000 -0500 +++ openjdk/jdk/src/share/classes/sun/security/provider/CertBundleKeyStoreImpl.java 2007-10-12 18:24:05.000000000 -0400 @@ -235,3 +211,30 @@ diff -urN openjdk.orig/jdk/src/share/cla /* * Policy +--- openjdkold/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2008-03-26 04:59:04.000000000 -0400 ++++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2008-05-08 10:49:22.000000000 -0400 +@@ -140,18 +140,18 @@ + + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Void run() throws Exception { +- props.put("trustStore", System.getProperty( +- "javax.net.ssl.trustStore")); + props.put("javaHome", System.getProperty( + "java.home")); +- props.put("trustStoreType", System.getProperty( +- "javax.net.ssl.trustStoreType", +- KeyStore.getDefaultType())); + props.put("trustStoreProvider", System.getProperty( + "javax.net.ssl.trustStoreProvider", "")); + props.put("trustStorePasswd", System.getProperty( + "javax.net.ssl.trustStorePassword", "")); +- return null; ++ props.put("/etc/pki/tls/certs/ca-bundle.crt", System.getProperty( ++ "javax.net.ssl.trustStore") ++ props.put("CertBundle", System.getProperty( ++ "javax.net.ssl.trustStoreType", ++ KeyStore.getDefaultType())); ++ return null; + } + }); + diff -r 07c44f5d2c52 -r d86e9eb1fa7d patches/icedtea-use-system-tzdata.patch --- a/patches/icedtea-use-system-tzdata.patch Wed May 07 13:31:36 2008 -0400 +++ b/patches/icedtea-use-system-tzdata.patch Thu May 08 11:04:53 2008 -0400 @@ -1,17 +1,3 @@ diff -urN openjdk.orig/hotspot/src/os/li -diff -urN openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2007-10-12 18:25:55.000000000 -0400 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2007-10-12 18:26:02.000000000 -0400 -@@ -390,6 +390,10 @@ - "javax.net.ssl.trustStorePassword", - ""); - -+ // Use the system zoneinfo files, if present -+ Arguments::PropertyList_add (&sp, -+ "user.zoneinfo.dir", "/usr/share/javazi"); -+ - #undef malloc - #undef getenv - #undef EXTENSIONS_DIR --- ../openjdkb23/openjdk/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2007-10-30 04:38:28.000000000 -0400 +++ openjdk/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2007-11-13 13:16:52.000000000 -0500 @@ -28,6 +28,7 @@ @@ -57,3 +43,16 @@ diff -urN openjdk.orig/hotspot/src/os/li public Object run() throws IOException { File file = new File(fname); if (!file.canRead()) { +--- oldopenjdk6/hotspot/src/os/linux/vm/os_linux.cpp 2008-03-26 05:07:22.000000000 -0400 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-05-08 11:03:17.000000000 -0400 +@@ -376,6 +376,10 @@ + } + } + ++// Use the system zoneinfo files, if present ++Arguments::PropertyList_add (&sp, ++ "user.zoneinfo.dir", "/usr/share/javazi"); ++ + #undef malloc + #undef getenv + #undef EXTENSIONS_DIR From bugzilla-daemon at icedtea.classpath.org Thu May 8 08:05:23 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 08 May 2008 15:05:23 +0000 Subject: [Bug 150] truststore settings in hotspot Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=150 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from langel at redhat.com 2008-05-08 15:05 ------- Fixed. Thanks -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From mark at klomp.org Thu May 8 17:40:12 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 09 May 2008 00:40:12 +0000 Subject: changeset in /hg/icedtea6: Fix potential ALSA locks in DirectAud... Message-ID: changeset 3c358d6fd84e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3c358d6fd84e description: Fix potential ALSA locks in DirectAudioDevice because of races on doIO var. 2008-05-08 Mark Wielaard * patches/icedtea-directaudio-close-trick.patch: Use new static lockLast for nOpen/nClose guarding. Make lockNative non-static again. Do all checks before native calls of doIO inside lockNative guard. Set doIO to false after nClose before dropping lockNative guard. diffstat: 2 files changed, 129 insertions(+), 12 deletions(-) ChangeLog | 8 + patches/icedtea-directaudio-close-trick.patch | 133 ++++++++++++++++++++++--- diffs (179 lines): diff -r d86e9eb1fa7d -r 3c358d6fd84e ChangeLog --- a/ChangeLog Thu May 08 11:04:53 2008 -0400 +++ b/ChangeLog Fri May 09 02:30:42 2008 +0200 @@ -1,3 +1,11 @@ 2008-05-08 Lillian Angel + + * patches/icedtea-directaudio-close-trick.patch: Use new static + lockLast for nOpen/nClose guarding. Make lockNative non-static + again. Do all checks before native calls of doIO inside + lockNative guard. Set doIO to false after nClose before dropping + lockNative guard. + 2008-05-08 Lillian Angel Fixes Bug #150 diff -r d86e9eb1fa7d -r 3c358d6fd84e patches/icedtea-directaudio-close-trick.patch --- a/patches/icedtea-directaudio-close-trick.patch Thu May 08 11:04:53 2008 -0400 +++ b/patches/icedtea-directaudio-close-trick.patch Fri May 09 02:30:42 2008 +0200 @@ -1,18 +1,19 @@ --- /home/mark/src/openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-04-13 01:05:30.000000000 +0200 -+++ openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-05-04 18:42:39.000000000 +0200 -@@ -394,7 +394,10 @@ ++++ openjdk/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java 2008-05-09 02:18:21.000000000 +0200 +@@ -394,7 +394,12 @@ private float leftGain, rightGain; protected volatile boolean noService = false; // do not run the nService method -- protected Object lockNative = new Object(); -+ // Guards all native calls and the lastOpened static variable. -+ protected static Object lockNative = new Object(); ++ // Guards all native calls. + protected Object lockNative = new Object(); ++ // Guards the lastOpened static variable in implOpen and implClose. ++ protected static Object lockLast = new Object(); + // Keeps track of last opened line, see implOpen "trick". + protected static DirectDL lastOpened; // CONSTRUCTOR protected DirectDL(DataLine.Info info, -@@ -496,20 +499,47 @@ +@@ -496,20 +501,47 @@ // align buffer to full frames bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize(); @@ -25,7 +26,7 @@ - hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), - hardwareFormat.isBigEndian(), - bufferSize); -+ synchronized(lockNative) { ++ synchronized(lockLast) { + id = nOpen(mixerIndex, deviceID, isSource, + encoding, + hardwareFormat.getSampleRate(), @@ -73,12 +74,120 @@ this.bufferSize = nGetBufferSize(id, isSource); if (this.bufferSize < 1) { // this is an error! -@@ -616,6 +646,8 @@ +@@ -580,12 +612,12 @@ + } + synchronized (lockNative) { + nStop(id, isSource); +- } + +- // need to set doIO to false before notifying the +- // read/write thread, that's why isStartedRunning() +- // cannot be used +- doIO = false; ++ // need to set doIO to false before notifying the ++ // read/write thread, that's why isStartedRunning() ++ // cannot be used ++ doIO = false; ++ } + // wake up any waiting threads + synchronized(lock) { + lock.notifyAll(); +@@ -614,8 +646,12 @@ + doIO = false; + long oldID = id; id = 0; - synchronized (lockNative) { - nClose(oldID, isSource); -+ if (lastOpened == this) -+ lastOpened = null; +- synchronized (lockNative) { +- nClose(oldID, isSource); ++ synchronized (lockLast) { ++ synchronized (lockNative) { ++ nClose(oldID, isSource); ++ if (lastOpened == this) ++ lastOpened = null; ++ } } bytePosition = 0; softwareConversionSize = 0; +@@ -630,7 +666,8 @@ + } + int a = 0; + synchronized (lockNative) { +- a = nAvailable(id, isSource); ++ if (doIO) ++ a = nAvailable(id, isSource); + } + return a; + } +@@ -644,9 +681,9 @@ + int counter = 0; + long startPos = getLongFramePosition(); + boolean posChanged = false; +- while (!drained && doIO) { ++ while (!drained) { + synchronized (lockNative) { +- if ((id == 0) || !nIsStillDraining(id, isSource)) ++ if ((id == 0) || (!doIO) || !nIsStillDraining(id, isSource)) + break; + } + // check every now and then for a new position +@@ -686,7 +723,7 @@ + lock.notifyAll(); + } + synchronized (lockNative) { +- if (id != 0) { ++ if (id != 0 && doIO) { + // then flush native buffers + nFlush(id, isSource); + } +@@ -697,9 +734,10 @@ + + // replacement for getFramePosition (see AbstractDataLine) + public long getLongFramePosition() { +- long pos; ++ long pos = 0; + synchronized (lockNative) { +- pos = nGetBytePosition(id, isSource, bytePosition); ++ if (doIO) ++ pos = nGetBytePosition(id, isSource, bytePosition); + } + // hack because ALSA sometimes reports wrong framepos + if (pos < 0) { +@@ -745,11 +783,12 @@ + } + int written = 0; + while (!flushing) { +- int thisWritten; ++ int thisWritten = 0; + synchronized (lockNative) { +- thisWritten = nWrite(id, b, off, len, +- softwareConversionSize, +- leftGain, rightGain); ++ if (doIO) ++ thisWritten = nWrite(id, b, off, len, ++ softwareConversionSize, ++ leftGain, rightGain); + if (thisWritten < 0) { + // error in native layer + break; +@@ -972,9 +1011,10 @@ + } + int read = 0; + while (doIO && !flushing) { +- int thisRead; ++ int thisRead = 0; + synchronized (lockNative) { +- thisRead = nRead(id, b, off, len, softwareConversionSize); ++ if (doIO) ++ thisRead = nRead(id, b, off, len, softwareConversionSize); + if (thisRead < 0) { + // error in native layer + break; +@@ -1209,7 +1249,8 @@ + // set new native position (if necessary) + // this must come after the flush! + synchronized (lockNative) { +- nSetBytePosition(id, isSource, frames * frameSize); ++ if (doIO) ++ nSetBytePosition(id, isSource, frames * frameSize); + } + + if (Printer.debug) Printer.debug(" DirectClip.setFramePosition: " From mark at klomp.org Thu May 8 17:48:17 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 09 May 2008 02:48:17 +0200 Subject: Opening multiple output lines In-Reply-To: <20080504171929.GA20060@gnu.wildebeest.org> References: <475F1063.6080109@sun.com> <48191A17.3070604@redhat.com> <20080504171929.GA20060@gnu.wildebeest.org> Message-ID: <1210294097.16656.18.camel@dijkstra.wildebeest.org> Hi, On Sun, 2008-05-04 at 19:19 +0200, Mark Wielaard wrote: > I had the same problem with a similar setup and with applications that > forget to close a line they don't use anymore (unfortunately this seems > very common). With the current directaudio backend I don't see how multiple > lines for the same hardware device could work though. So I am using a > trick to look for "sloppy" applications. If the last line opened in the > directaudio device was for the same hardware format then we silence that > one first so we can hand out a new one. This seems to work surprisingly > well. And it doesn't seem to interfere with applications that handle the > hardware formats they need explicitly. > > With gcjwebplugin and this patch we can happily play the vNES games :) > > Of course a real solution would be to import or write a better mixer > that does share lines properly. I updated the patch a little to make it all a bit more robust. It splits the locks, so there is no longer one gaint static one (I shouldn't have reused the lockNative one and made that static in the original patch). And it makes sure that all methods that require the nativeLock check the doIO inside their synchronized block and the lock around nStop() isn't released before the flag is set. ALSA can actually hang when called on a pcm you already stopped or closed. This race was already in the code, since a DataSourceLine could be asynchronously stopped or closed at any time. My patch just exposed it more easily, because DirectAudioDevice is the mixer that is now always used by defailt. 2008-05-08 Mark Wielaard * patches/icedtea-directaudio-close-trick.patch: Use new static lockLast for nOpen/nClose guarding. Make lockNative non-static again. Do all checks before native calls of doIO inside lockNative guard. Set doIO to false after nClose before dropping lockNative guard. I do think we should write a new MixerProvider based on a modern soundserver, like pulseaudio. The current DirectAudioDeviceProvider code cannot easily be extended to provide true software sound mixing. And the way it opens direct hardware alsa devices means it locks out other applications. Cheers, Mark Patch against original code (updated patch file in icedtea6). -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-directaudio-close-trick.patch Type: text/x-patch Size: 7732 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080509/6050cf18/attachment.bin From langel at redhat.com Fri May 9 07:04:35 2008 From: langel at redhat.com (Lillian Angel) Date: Fri, 09 May 2008 14:04:35 +0000 Subject: changeset in /hg/icedtea6: 2008-05-09 Lillian Angel changeset d9fa5282ccde in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d9fa5282ccde description: 2008-05-09 Lillian Angel * icedtea-use-system-tzdata.patch: Added missing lines to patch. diffstat: 2 files changed, 8 insertions(+), 3 deletions(-) ChangeLog | 4 ++++ patches/icedtea-use-system-tzdata.patch | 7 ++++--- diffs (31 lines): diff -r 3c358d6fd84e -r d9fa5282ccde ChangeLog --- a/ChangeLog Fri May 09 02:30:42 2008 +0200 +++ b/ChangeLog Fri May 09 10:04:30 2008 -0400 @@ -1,3 +1,7 @@ 2008-05-08 Mark Wielaard + + * icedtea-use-system-tzdata.patch: Added missing lines to patch. + 2008-05-08 Mark Wielaard * patches/icedtea-directaudio-close-trick.patch: Use new static diff -r 3c358d6fd84e -r d9fa5282ccde patches/icedtea-use-system-tzdata.patch --- a/patches/icedtea-use-system-tzdata.patch Fri May 09 02:30:42 2008 +0200 +++ b/patches/icedtea-use-system-tzdata.patch Fri May 09 10:04:30 2008 -0400 @@ -45,12 +45,13 @@ if (!file.canRead()) { --- oldopenjdk6/hotspot/src/os/linux/vm/os_linux.cpp 2008-03-26 05:07:22.000000000 -0400 +++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-05-08 11:03:17.000000000 -0400 -@@ -376,6 +376,10 @@ +@@ -376,6 +381,11 @@ } } -+// Use the system zoneinfo files, if present -+Arguments::PropertyList_add (&sp, ++ SystemProperty* sp = Arguments::system_properties(); ++ // Use the system zoneinfo files, if present ++ Arguments::PropertyList_add (&sp, + "user.zoneinfo.dir", "/usr/share/javazi"); + #undef malloc From langel at redhat.com Fri May 9 07:23:27 2008 From: langel at redhat.com (Lillian Angel) Date: Fri, 09 May 2008 14:23:27 +0000 Subject: changeset in /hg/icedtea6: 2008-05-09 Lillian Angel changeset 2c9ad97bb6ec in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=2c9ad97bb6ec description: 2008-05-09 Lillian Angel * patches/icedtea-certbundle.patch: Fixed typo. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ patches/icedtea-certbundle.patch | 2 +- diffs (23 lines): diff -r d9fa5282ccde -r 2c9ad97bb6ec ChangeLog --- a/ChangeLog Fri May 09 10:04:30 2008 -0400 +++ b/ChangeLog Fri May 09 10:23:23 2008 -0400 @@ -1,3 +1,7 @@ 2008-05-09 Lillian Angel + + * patches/icedtea-certbundle.patch: Fixed typo. + 2008-05-09 Lillian Angel * icedtea-use-system-tzdata.patch: Added missing lines to patch. diff -r d9fa5282ccde -r 2c9ad97bb6ec patches/icedtea-certbundle.patch --- a/patches/icedtea-certbundle.patch Fri May 09 10:04:30 2008 -0400 +++ b/patches/icedtea-certbundle.patch Fri May 09 10:23:23 2008 -0400 @@ -230,7 +230,7 @@ diff -urN openjdk.orig/jdk/src/share/cla "javax.net.ssl.trustStorePassword", "")); - return null; + props.put("/etc/pki/tls/certs/ca-bundle.crt", System.getProperty( -+ "javax.net.ssl.trustStore") ++ "javax.net.ssl.trustStore"); + props.put("CertBundle", System.getProperty( + "javax.net.ssl.trustStoreType", + KeyStore.getDefaultType())); From langel at redhat.com Fri May 9 07:25:48 2008 From: langel at redhat.com (Lillian Angel) Date: Fri, 09 May 2008 14:25:48 +0000 Subject: changeset in /hg/icedtea6: Fixed typo Message-ID: changeset 6d39bcf18078 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6d39bcf18078 description: Fixed typo diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) patches/icedtea-certbundle.patch | 2 +- diffs (12 lines): diff -r 2c9ad97bb6ec -r 6d39bcf18078 patches/icedtea-certbundle.patch --- a/patches/icedtea-certbundle.patch Fri May 09 10:23:23 2008 -0400 +++ b/patches/icedtea-certbundle.patch Fri May 09 10:25:45 2008 -0400 @@ -230,7 +230,7 @@ diff -urN openjdk.orig/jdk/src/share/cla "javax.net.ssl.trustStorePassword", "")); - return null; + props.put("/etc/pki/tls/certs/ca-bundle.crt", System.getProperty( -+ "javax.net.ssl.trustStore"); ++ "javax.net.ssl.trustStore")); + props.put("CertBundle", System.getProperty( + "javax.net.ssl.trustStoreType", + KeyStore.getDefaultType())); From mark at klomp.org Fri May 9 10:04:48 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 09 May 2008 17:04:48 +0000 Subject: changeset in /hg/icedtea6: New Gervill CVS import. Add AudioFloa... Message-ID: changeset 30c7450d05dc in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=30c7450d05dc description: New Gervill CVS import. Add AudioFloatFormatConverter FormatConversionProvider. 2008-05-09 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound: Import Gervill fixes from CVS. See CHANGES.txt. Check isConversionSupported() in AudioFloatFormatConverter.getTargetFormats(). * patches/icedtea-gervill.patch: Add AudioFloatFormatConverter to javax.sound.sampled.spi.FormatConversionProvider. diffstat: 9 files changed, 55 insertions(+), 33 deletions(-) ChangeLog | 9 +++++ overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java | 17 +++++---- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt | 1 overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftAudioProcessor.java | 2 - overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChorus.java | 14 +++---- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftLimiter.java | 12 +++--- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftMainMixer.java | 8 ++-- overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftReverb.java | 18 +++++----- patches/icedtea-gervill.patch | 7 +++ diffs (233 lines): diff -r 6d39bcf18078 -r 30c7450d05dc ChangeLog --- a/ChangeLog Fri May 09 10:25:45 2008 -0400 +++ b/ChangeLog Fri May 09 19:04:37 2008 +0200 @@ -1,3 +1,12 @@ 2008-05-09 Lillian Angel + + * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound: + Import Gervill fixes from CVS. See CHANGES.txt. + Check isConversionSupported() in + AudioFloatFormatConverter.getTargetFormats(). + * patches/icedtea-gervill.patch: Add AudioFloatFormatConverter to + javax.sound.sampled.spi.FormatConversionProvider. + 2008-05-09 Lillian Angel * patches/icedtea-certbundle.patch: Fixed typo. diff -r 6d39bcf18078 -r 30c7450d05dc overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java Fri May 09 10:25:45 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java Fri May 09 19:04:37 2008 +0200 @@ -366,17 +366,20 @@ public class AudioFloatFormatConverter e int in_end = ibuffer_len; while(remain > 0) { - if(ibuffer_len < 0) - { - in_end = pad2; - if(ibuffer_index > in_end) break; - } - else + if(ibuffer_len >= 0) { if(ibuffer_index >= (ibuffer_len+pad)) readNextBuffer(); in_end = ibuffer_len+pad; } + + if(ibuffer_len < 0) + { + in_end = pad2; + if(ibuffer_index >= in_end) break; + } + + if(ibuffer_index < 0) break; int preDestPos = destPos; @@ -486,7 +489,7 @@ public class AudioFloatFormatConverter e } public AudioFormat[] getTargetFormats(Encoding targetEncoding, AudioFormat sourceFormat) { - if(AudioFloatConverter.getConverter(sourceFormat) == null) return new AudioFormat[0]; + if(!isConversionSupported(targetEncoding, sourceFormat)) return new AudioFormat[0]; int channels = sourceFormat.getChannels(); ArrayList formats = new ArrayList(); formats.add(new AudioFormat(Encoding.PCM_SIGNED, AudioSystem.NOT_SPECIFIED, 8, channels, channels, AudioSystem.NOT_SPECIFIED, false)); diff -r 6d39bcf18078 -r 30c7450d05dc overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt Fri May 09 10:25:45 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt Fri May 09 19:04:37 2008 +0200 @@ -5,6 +5,7 @@ and resample using (linear/cubic/sinc...) if needed. - Added: WaveExtensibleReader, used to read WAV files using WAVE_FORMAT_EXTENSIBLE format. - Added: WaveFloatFileWriter, used to writing WAV files with PCM_FLOAT encoding. + - Change: Make SoftAudioProcessor (limiter, reverb, chorus, agc) more general. - Fix: AudioFloatConverter tests incorrectly AudioFormat frameSize against SampleSizeInBits Support for 64-byte float added, and support for 32+ bit PCM samples. SampleSizeInBits not dividable by 8 are now handled correctly. diff -r 6d39bcf18078 -r 30c7450d05dc overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftAudioProcessor.java --- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftAudioProcessor.java Fri May 09 10:25:45 2008 -0400 +++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftAudioProcessor.java Fri May