changeset 1826:27a1779cfd51

Merge.
author Andrew John Hughes <ahughes@redhat.com>
date Fri, 22 May 2009 17:47:18 +0100
parents 9e6600d4fef2 (current diff) c1469020162e (diff)
children 8070d13626fa
files ChangeLog Makefile.am overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.MidiDeviceProvider overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.MidiFileReader overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.MidiFileWriter overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.SoundbankReader overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.AudioFileReader overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.AudioFileWriter overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.FormatConversionProvider overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.MixerProvider overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/linux-i586/javax.sound.sampled.spi.MixerProvider overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/windows-i586/javax.sound.sampled.spi.MixerProvider overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/windows-ia64/javax.sound.sampled.spi.MixerProvider
diffstat 38 files changed, 649 insertions(+), 469 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 22 17:44:57 2009 +0100
+++ b/ChangeLog	Fri May 22 17:47:18 2009 +0100
@@ -5,6 +5,44 @@
 	rather than using generated as GENSRC
 	to avoid conflicts with IcedTea6.
 
+2009-05-22  Mark Wielaard  <mark@klomp.org>
+
+	* Makefile.am(ICEDTEA_PATCHES): patches/icedtea-samejvm-safe.patch
+	added.
+	* patches/icedtea-samejvm-safe.patch: Add packages that are
+	samejvm-safe to TEST.ROOT.
+	* test/jtreg/excludelist.jdk.jtx: Add java/awt/FontClass/CreateFont
+	tests. Hangs jtreg test suite.
+
+2009-05-22  Mark Wielaard  <mark@klomp.org>
+
+	* overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/*,
+	overlays/openjdk/jdk/test/com/sun/media/sound/*:
+	Import Gervill fixes from CVS. See CHANGES.txt:
+
+	6823446: Gervill SoftLowFrequencyOscillator fails when freq is
+	set to 0 cent or 8.1758 Hz.
+	6823445: Gervill SoftChannel/ResetAllControllers jtreg test
+	fails after portamento fix from last merge.
+	6821030: Merge OpenJDK Gervill with upstream sources, Q1CY2009
+
+	- Fix: Notes get stuck on when we overflow the synthesizer
+	with rapid note on /off messages.
+	JTreg test has been created:
+	test/com/sun/media/sound/SoftChannel/NoteOverFlowTest
+	- Fix: Portamento controller reset to wrong value in
+	SoftChannel.resetAllControllers.
+	This caused incorrect glider effect in some midi files.
+	For example in TuningApplet1 in TET-7 keyboard,
+	when note was pressed for first time a glider effect could be
+	heard.
+	- Fix: Delay modulation calculation in SoftChorus.LFODelay where
+	incorrect.
+	- Fix: Removed unnecessary volatile keywords in SoftChorus.
+	* fsg.sh: Don't remove (non-existing) com/sun/media/sound services.
+	* overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services:
+	removed.
+
 2009-05-21  Andrew John Hughes  <ahughes@redhat.com>
 
 	* ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp:
--- a/Makefile.am	Fri May 22 17:44:57 2009 +0100
+++ b/Makefile.am	Fri May 22 17:47:18 2009 +0100
@@ -2034,6 +2034,7 @@
 	patches/icedtea-alsa-default-device.patch \
 	patches/icedtea-linker-libs-order.patch \
 	patches/icedtea-testenv.patch \
+	patches/icedtea-samejvm-safe.patch \
 	patches/icedtea-pr261.patch \
 	patches/icedtea-doc-headers.patch \
 	patches/hotspot/$(HSBUILD)/icedtea-bytecodeInterpreter.patch \
--- a/fsg.sh	Fri May 22 17:44:57 2009 +0100
+++ b/fsg.sh	Fri May 22 17:47:18 2009 +0100
@@ -102,12 +102,5 @@
 rm -rf openjdk/jdk/src/share/classes/com/sun/jmx/snmp
 rm -rf openjdk/jdk/test/com/sun/jmx/snmp
 
-# Remove support for proprietary sound
-rm -rf openjdk/jdk/src/share/classes/com/sun/media/sound/services
-rm -f openjdk/jdk/src/share/classes/com/sun/media/sound/MixerSynthProvider.java
-rm -f openjdk/jdk/src/share/classes/com/sun/media/sound/RmfFileReader.java
-rm -f openjdk/jdk/src/share/classes/com/sun/media/sound/HsbParser.java
-rm -f openjdk/jdk/src/share/classes/com/sun/media/sound/SimpleInputDeviceProvider.java
-
 # Remove registration tests
 rm -rf openjdk/jdk/test/com/sun/servicetag
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/CHANGES.txt	Fri May 22 17:47:18 2009 +0100
@@ -1,3 +1,16 @@
+6823446: Gervill SoftLowFrequencyOscillator fails when freq is set to 0 cent or 8.1758 Hz.
+6823445: Gervill SoftChannel/ResetAllControllers jtreg test fails after portamento fix from last merge. 
+6821030: Merge OpenJDK Gervill with upstream sources, Q1CY2009
+
+  - Fix: Notes get stuck on when we overflow the synthesizer with rapid note on/off messages.
+         JTreg test has been created:
+            test/com/sun/media/sound/SoftChannel/NoteOverFlowTest
+  - Fix: Portamento controller reset to wrong value in SoftChannel.resetAllControllers.
+         This caused incorrect glider effect in some midi files.
+         For example in TuningApplet1 in TET-7 keyboard,
+         when note was pressed for first time a glider effect could be heard.
+  - Fix: Delay modulation calculation in SoftChorus.LFODelay where incorrect.
+  - Fix: Removed unnecessary volatile keywords in SoftChorus.
   - Fix: Throw IllegalArgumentException Exception on
          invalid soundbank to:
          SoftSynthesizer.unloadAllInstruments(Soundbank soundbank)
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java	Fri May 22 17:47:18 2009 +0100
@@ -1,27 +1,27 @@
 /*
-  * Copyright 2007 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.
-  *
-  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-  * CA 95054 USA or visit www.sun.com if you need additional information or
-  * have any questions.
-  */
+ * Copyright 2007 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
 
 package com.sun.media.sound;
 
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChannel.java	Fri May 22 17:47:18 2009 +0100
@@ -93,7 +93,6 @@
     protected double portamento_time = 1; // keyschanges per control buffer time
     protected int[] portamento_lastnote = new int[128];
     protected int portamento_lastnote_ix = 0;
-    private int portamento_control_note = -1;
     private boolean portamento = false;
     private boolean mono = false;
     private boolean mute = false;
@@ -369,12 +368,12 @@
         voice.setSoloMute(solomute);
         if (releaseTriggered)
             return;
-        if (portamento_control_note != -1) {
+        if (controller[84] != 0) {
             voice.co_noteon_keynumber[0]
-                    = (tuning.getTuning(portamento_control_note) / 100.0)
+                    = (tuning.getTuning(controller[84]) / 100.0)
                     * (1f / 128f);
             voice.portamento = true;
-            portamento_control_note = -1;
+            controlChange(84, 0);
         } else if (portamento) {
             if (mono) {
                 if (portamento_lastnote[0] != -1) {
@@ -382,7 +381,7 @@
                             = (tuning.getTuning(portamento_lastnote[0]) / 100.0)
                             * (1f / 128f);
                     voice.portamento = true;
-                    portamento_control_note = -1;
+                    controlChange(84, 0);
                 }
                 portamento_lastnote[0] = noteNumber;
             } else {
@@ -449,19 +448,19 @@
                     }
                 }
 
-                if (portamento_control_note != -1) {
+                if (controller[84] != 0) {
                     boolean n_found = false;
                     for (int i = 0; i < voices.length; i++) {
                         if (voices[i].on && voices[i].channel == channel
                                 && voices[i].active
-                                && voices[i].note == portamento_control_note
+                                && voices[i].note == controller[84]
                                 && voices[i].releaseTriggered == false) {
                             voices[i].portamento = true;
                             voices[i].setNote(noteNumber);
                             n_found = true;
                         }
                     }
-                    portamento_control_note = -1;
+                    controlChange(84, 0);
                     if (n_found)
                         return;
                 }
@@ -556,6 +555,18 @@
                         && voices[i].releaseTriggered == false) {
                     voices[i].noteOff(velocity);
                 }
+                // We must also check stolen voices
+                if (voices[i].stealer_channel == this && voices[i].stealer_noteNumber == noteNumber) {
+                    SoftVoice v = voices[i];
+                    v.stealer_releaseTriggered = false;
+                    v.stealer_channel = null;
+                    v.stealer_performer = null;
+                    v.stealer_voiceID = -1;
+                    v.stealer_noteNumber = 0;
+                    v.stealer_velocity = 0;
+                    v.stealer_extendedConnectionBlocks = null;
+                    v.stealer_channelmixer = null;
+                }                            
             }
 
             // Try play back note-off triggered voices,
@@ -1141,9 +1152,6 @@
                     }
                 }
                 break;
-            case 84:
-                portamento_control_note = value;
-                break;
             case 98:
                 nrpn_control = (nrpn_control & (127 << 7)) + value;
                 rpn_control = RPN_NULL_VALUE;
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChorus.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftChorus.java	Fri May 22 17:47:18 2009 +0100
@@ -38,11 +38,11 @@
 
         private float[] delaybuffer;
         private int rovepos = 0;
-        private volatile float gain = 1;
-        private volatile float rgain = 0;
-        private volatile float delay = 0;
+        private float gain = 1;
+        private float rgain = 0;
+        private float delay = 0;
         private float lastdelay = 0;
-        private volatile float feedback = 0;
+        private float feedback = 0;
 
         public VariableDelay(int maxbuffersize) {
             delaybuffer = new float[maxbuffersize];
@@ -115,10 +115,8 @@
 
     private static class LFODelay {
 
-        private volatile double c_cos_delta;
-        private volatile double c_sin_delta;
-        private double c_cos = 1;
-        private double c_sin = 0;
+        private double phase = 1;
+        private double phase_step = 0;
         private double depth = 0;
         private VariableDelay vdelay;
         private double samplerate;
@@ -139,13 +137,11 @@
 
         public void setRate(double rate) {
             double g = (Math.PI * 2) * (rate / controlrate);
-            c_cos_delta = Math.cos(g);
-            c_sin_delta = Math.sin(g);
+            phase_step = g;
         }
 
         public void setPhase(double phase) {
-            c_cos = Math.cos(phase);
-            c_sin = Math.sin(phase);
+            this.phase = phase;
         }
 
         public void setFeedBack(float feedback) {
@@ -161,16 +157,16 @@
         }
 
         public void processMix(float[] in, float[] out, float[] rout) {
-            c_cos = c_cos * c_cos_delta - c_sin * c_sin_delta;
-            c_sin = c_cos * c_sin_delta + c_sin * c_cos_delta;
-            vdelay.setDelay((float) (depth * 0.5 * (c_cos + 2)));
+            phase += phase_step; 
+            while(phase > (Math.PI * 2)) phase -= (Math.PI * 2);
+            vdelay.setDelay((float) (depth * 0.5 * (Math.cos(phase) + 2)));
             vdelay.processMix(in, out, rout);
         }
 
         public void processReplace(float[] in, float[] out, float[] rout) {
-            c_cos = c_cos * c_cos_delta - c_sin * c_sin_delta;
-            c_sin = c_cos * c_sin_delta + c_sin * c_cos_delta;
-            vdelay.setDelay((float) (depth * 0.5 * (c_cos + 2)));
+            phase += phase_step; 
+            while(phase > (Math.PI * 2)) phase -= (Math.PI * 2);
+            vdelay.setDelay((float) (depth * 0.5 * (Math.cos(phase) + 2)));
             vdelay.processReplace(in, out, rout);
 
         }
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftFilter.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftFilter.java	Fri May 22 17:47:18 2009 +0100
@@ -613,4 +613,4 @@
         this.last_gain = this.gain;
         this.last_wet = this.wet;
     }
-}
\ No newline at end of file
+}
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftLowFrequencyOscillator.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftLowFrequencyOscillator.java	Fri May 22 17:47:18 2009 +0100
@@ -45,6 +45,13 @@
     private double sin_factor = 0;
     private static double PI2 = 2.0 * Math.PI;
 
+    public SoftLowFrequencyOscillator() {
+        // If sin_step is 0 then sin_stepfreq must be -INF
+        for (int i = 0; i < sin_stepfreq.length; i++) {
+            sin_stepfreq[i] = Double.NEGATIVE_INFINITY;
+        }
+    }
+
     public void reset() {
         for (int i = 0; i < used_count; i++) {
             out[i][0] = 0;
@@ -53,7 +60,8 @@
             freq[i][0] = 0;
             delay_counter[i] = 0;
             sin_phase[i] = 0;
-            sin_stepfreq[i] = 0;
+            // If sin_step is 0 then sin_stepfreq must be -INF
+            sin_stepfreq[i] = Double.NEGATIVE_INFINITY;
             sin_step[i] = 0;
         }
         used_count = 0;
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftMainMixer.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftMainMixer.java	Fri May 22 17:47:18 2009 +0100
@@ -521,7 +521,7 @@
                         cur_registeredMixers = null;
                     }
                 }
-                
+
                 if(!buffers[CHANNEL_MONO].isSilent())
                 {
                     float[] mono = buffers[CHANNEL_MONO].array();
@@ -572,7 +572,7 @@
             if (voicestatus[i].active)
                 if (voicestatus[i].channelmixer == null)
                     voicestatus[i].processAudioLogic(buffers);
-        
+
         if(!buffers[CHANNEL_MONO].isSilent())
         {
             float[] mono = buffers[CHANNEL_MONO].array();
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftVoice.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftVoice.java	Fri May 22 17:47:18 2009 +0100
@@ -803,7 +803,7 @@
             if (rightdry != null)
                 mixAudioStream(rightdry, left, last_out_mixer_left,
                         out_mixer_left);
-        } else {            
+        } else {
             if(rightdry == null && 
                     last_out_mixer_left == last_out_mixer_right &&
                     out_mixer_left == out_mixer_right)
@@ -822,7 +822,7 @@
             }
         }
 
-        if (rightdry == null) {            
+        if (rightdry == null) {
             mixAudioStream(leftdry, eff1, last_out_mixer_effect1,
                     out_mixer_effect1);
             mixAudioStream(leftdry, eff2, last_out_mixer_effect2,
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.MidiDeviceProvider	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# Providers for midi devices
-com.sun.media.sound.RealTimeSequencerProvider
-com.sun.media.sound.MidiOutDeviceProvider
-com.sun.media.sound.MidiInDeviceProvider
-com.sun.media.sound.SoftProvider
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.MidiFileReader	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-# Providers for midi sequences
-com.sun.media.sound.StandardMidiFileReader
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.MidiFileWriter	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-# Providers for Midi file writing
-com.sun.media.sound.StandardMidiFileWriter
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.midi.spi.SoundbankReader	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# Providers for Soundbanks
-com.sun.media.sound.SF2SoundbankReader
-com.sun.media.sound.DLSSoundbankReader
-com.sun.media.sound.AudioFileSoundbankReader
-com.sun.media.sound.JARSoundbankReader
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.AudioFileReader	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# Providers for audio file reading
-com.sun.media.sound.AuFileReader
-com.sun.media.sound.AiffFileReader
-com.sun.media.sound.WaveFileReader
-com.sun.media.sound.WaveFloatFileReader
-com.sun.media.sound.SoftMidiAudioFileReader
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.AudioFileWriter	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-# Providers for writing audio files
-com.sun.media.sound.AuFileWriter
-com.sun.media.sound.AiffFileWriter
-com.sun.media.sound.WaveFileWriter
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.FormatConversionProvider	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# Providers for FormatConversion
-com.sun.media.sound.UlawCodec
-com.sun.media.sound.AlawCodec
-com.sun.media.sound.PCMtoPCMCodec
-com.sun.media.sound.AudioFloatFormatConverter
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/javax.sound.sampled.spi.MixerProvider	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# last mixer is default mixer
-com.sun.media.sound.PortMixerProvider
-com.sun.media.sound.DirectAudioDeviceProvider
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/linux-i586/javax.sound.sampled.spi.MixerProvider	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# service provider file for Linux: with DirectAudioDeviceProvider
-# last mixer is default mixer
-com.sun.media.sound.PortMixerProvider
-com.sun.media.sound.SimpleInputDeviceProvider
-com.sun.media.sound.DirectAudioDeviceProvider
-com.sun.media.sound.HeadspaceMixerProvider
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/windows-i586/javax.sound.sampled.spi.MixerProvider	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# service provider file for Windows: with DirectAudioDeviceProvider
-# last mixer is default mixer
-com.sun.media.sound.PortMixerProvider
-com.sun.media.sound.SimpleInputDeviceProvider
-com.sun.media.sound.DirectAudioDeviceProvider
-com.sun.media.sound.HeadspaceMixerProvider
--- a/overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/services/windows-ia64/javax.sound.sampled.spi.MixerProvider	Fri May 22 17:44:57 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# service provider file for Windows IA64: with DirectAudioDeviceProvider
-# last mixer is default mixer
-com.sun.media.sound.PortMixerProvider
-com.sun.media.sound.SimpleInputDeviceProvider
-com.sun.media.sound.DirectAudioDeviceProvider
-com.sun.media.sound.HeadspaceMixerProvider
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankFile.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankFile.java	Fri May 22 17:47:18 2009 +0100
@@ -1,10 +1,3 @@
-import java.io.File;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.DLSSoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,20 +26,27 @@
 /* @test
  @summary Test DLSSoundbankReader getSoundbank(File) method */
 
+import java.io.File;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.DLSSoundbankReader;
+
 public class TestGetSoundbankFile {
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.dls");
-		Soundbank dls = new DLSSoundbankReader().getSoundbank(file);
-		assertTrue(dls.getInstruments().length == 1);
-		Patch patch = dls.getInstruments()[0].getPatch();
-		assertTrue(patch.getProgram() == 0);
-		assertTrue(patch.getBank() == 0);
-	}	
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
+
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.dls");
+        Soundbank dls = new DLSSoundbankReader().getSoundbank(file);
+        assertTrue(dls.getInstruments().length == 1);
+        Patch patch = dls.getInstruments()[0].getPatch();
+        assertTrue(patch.getProgram() == 0);
+        assertTrue(patch.getBank() == 0);
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankInputStream.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankInputStream.java	Fri May 22 17:47:18 2009 +0100
@@ -1,12 +1,3 @@
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.DLSSoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,29 +26,38 @@
 /* @test
  @summary Test DLSSoundbankReader getSoundbank(InputStream) method */
 
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.DLSSoundbankReader;
+
 public class TestGetSoundbankInputStream {
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.dls");
-		FileInputStream fis = new FileInputStream(file);
-		BufferedInputStream bis = new BufferedInputStream(fis);
-		try
-		{
-			Soundbank dls = new DLSSoundbankReader().getSoundbank(bis);
-			assertTrue(dls.getInstruments().length == 1);
-			Patch patch = dls.getInstruments()[0].getPatch();
-			assertTrue(patch.getProgram() == 0);
-			assertTrue(patch.getBank() == 0);
-		}
-		finally
-		{
-			bis.close();
-		}
-	}	
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
+
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.dls");
+        FileInputStream fis = new FileInputStream(file);
+        BufferedInputStream bis = new BufferedInputStream(fis);
+        try
+        {
+            Soundbank dls = new DLSSoundbankReader().getSoundbank(bis);
+            assertTrue(dls.getInstruments().length == 1);
+            Patch patch = dls.getInstruments()[0].getPatch();
+            assertTrue(patch.getProgram() == 0);
+            assertTrue(patch.getBank() == 0);
+        }
+        finally
+        {
+            bis.close();
+        }
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankInputStream2.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankInputStream2.java	Fri May 22 17:47:18 2009 +0100
@@ -1,14 +1,3 @@
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.DLSSoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,85 +24,96 @@
  */
 
 /* @test
- @summary Test DLSSoundbankReader getSoundbank(InputStream) method using 
+ @summary Test DLSSoundbankReader getSoundbank(InputStream) method using
      very bad InputStream which can only read 1 byte at time */
 
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.DLSSoundbankReader;
+
 public class TestGetSoundbankInputStream2 {
-	
-	private static class BadInputStream extends InputStream
-	{
+
+    private static class BadInputStream extends InputStream
+    {
+
+        InputStream is;
 
-		InputStream is;
-		
-		public BadInputStream(InputStream is)
-		{
-			this.is = is;
-		}
-		
-		public int read() throws IOException {
-			return is.read();
-		}
+        public BadInputStream(InputStream is)
+        {
+            this.is = is;
+        }
+
+        public int read() throws IOException {
+            return is.read();
+        }
 
-		public int read(byte[] b, int off, int len) throws IOException {
-			if(len > 1) len = 1;
-			return is.read(b, off, len);
-		}
+        public int read(byte[] b, int off, int len) throws IOException {
+            if(len > 1) len = 1;
+            return is.read(b, off, len);
+        }
 
-		public int read(byte[] b) throws IOException {			
-			return read(b, 0, b.length);
-		}
+        public int read(byte[] b) throws IOException {
+            return read(b, 0, b.length);
+        }
 
-		public long skip(long n) throws IOException {
-			if(n > 1) n = 1;
-			return is.skip(n);
-		}
+        public long skip(long n) throws IOException {
+            if(n > 1) n = 1;
+            return is.skip(n);
+        }
 
-		public int available() throws IOException {
-			int avail = is.available();
-			if(avail > 1) avail = 1;
-			return avail;
-		}
+        public int available() throws IOException {
+            int avail = is.available();
+            if(avail > 1) avail = 1;
+            return avail;
+        }
 
-		public void close() throws IOException {
-			is.close();
-		}
+        public void close() throws IOException {
+            is.close();
+        }
 
-		public synchronized void mark(int readlimit) {
-			is.mark(readlimit);
-		}
+        public synchronized void mark(int readlimit) {
+            is.mark(readlimit);
+        }
+
+        public boolean markSupported() {
+            return is.markSupported();
+        }
 
-		public boolean markSupported() {
-			return is.markSupported();
-		}
+        public synchronized void reset() throws IOException {
+            is.reset();
+        }
+
+    }
 
-		public synchronized void reset() throws IOException {
-			is.reset();
-		}
-		
-	}
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.dls");
-		FileInputStream fis = new FileInputStream(file);
-		BufferedInputStream bis = new BufferedInputStream(fis);
-		try
-		{
-			InputStream badis = new BadInputStream(bis); 
-			Soundbank dls = new DLSSoundbankReader().getSoundbank(badis);
-			assertTrue(dls.getInstruments().length == 1);
-			Patch patch = dls.getInstruments()[0].getPatch();
-			assertTrue(patch.getProgram() == 0);
-			assertTrue(patch.getBank() == 0);
-		}
-		finally
-		{
-			bis.close();
-		}
-	}	
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.dls");
+        FileInputStream fis = new FileInputStream(file);
+        BufferedInputStream bis = new BufferedInputStream(fis);
+        try
+        {
+            InputStream badis = new BadInputStream(bis);
+            Soundbank dls = new DLSSoundbankReader().getSoundbank(badis);
+            assertTrue(dls.getInstruments().length == 1);
+            Patch patch = dls.getInstruments()[0].getPatch();
+            assertTrue(patch.getProgram() == 0);
+            assertTrue(patch.getBank() == 0);
+        }
+        finally
+        {
+            bis.close();
+        }
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankUrl.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/DLSSoundbankReader/TestGetSoundbankUrl.java	Fri May 22 17:47:18 2009 +0100
@@ -1,11 +1,3 @@
-import java.io.File;
-import java.net.URL;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.DLSSoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,21 +26,29 @@
 /* @test
  @summary Test DLSSoundbankReader getSoundbank(File) method */
 
+import java.io.File;
+import java.net.URL;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.DLSSoundbankReader;
+
 public class TestGetSoundbankUrl {
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.dls");
-		URL url = file.toURI().toURL();
-		Soundbank dls = new DLSSoundbankReader().getSoundbank(url);
-		assertTrue(dls.getInstruments().length == 1);
-		Patch patch = dls.getInstruments()[0].getPatch();
-		assertTrue(patch.getProgram() == 0);
-		assertTrue(patch.getBank() == 0);
-	}	
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
+
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.dls");
+        URL url = file.toURI().toURL();
+        Soundbank dls = new DLSSoundbankReader().getSoundbank(url);
+        assertTrue(dls.getInstruments().length == 1);
+        Patch patch = dls.getInstruments()[0].getPatch();
+        assertTrue(patch.getProgram() == 0);
+        assertTrue(patch.getBank() == 0);
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/EmergencySoundbank/TestCreateSoundbank.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/EmergencySoundbank/TestCreateSoundbank.java	Fri May 22 17:47:18 2009 +0100
@@ -1,13 +1,3 @@
-import java.io.File;
-
-import javax.sound.midi.Instrument;
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.EmergencySoundbank;
-import com.sun.media.sound.ModelInstrument;
-import com.sun.media.sound.ModelPatch;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,10 +26,20 @@
 /* @test
  @summary Test EmergencySoundbank createSoundbank() method */
 
+import java.io.File;
+
+import javax.sound.midi.Instrument;
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.EmergencySoundbank;
+import com.sun.media.sound.ModelInstrument;
+import com.sun.media.sound.ModelPatch;
+
 public class TestCreateSoundbank {
 
     public static void main(String[] args) throws Exception {
-        
+
         Soundbank soundbank = EmergencySoundbank.createSoundbank();
         for (int i = 0; i < 128; i++) {
             Patch patch = new ModelPatch(0, i, false);
@@ -55,5 +55,5 @@
             throw new Exception("Drumkit instrument is missing!");
         if(ins.getPerformers().length == 0)
             throw new Exception("Drumkit instrument doesn't have any performers!");
-    }   
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankFile.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankFile.java	Fri May 22 17:47:18 2009 +0100
@@ -1,10 +1,3 @@
-import java.io.File;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.SF2SoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,20 +26,27 @@
 /* @test
  @summary Test SF2SoundbankReader getSoundbank(File) method */
 
+import java.io.File;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.SF2SoundbankReader;
+
 public class TestGetSoundbankFile {
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.sf2");
-		Soundbank sf2 = new SF2SoundbankReader().getSoundbank(file);
-		assertTrue(sf2.getInstruments().length == 1);
-		Patch patch = sf2.getInstruments()[0].getPatch();
-		assertTrue(patch.getProgram() == 0);
-		assertTrue(patch.getBank() == 0);
-	}	
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
+
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.sf2");
+        Soundbank sf2 = new SF2SoundbankReader().getSoundbank(file);
+        assertTrue(sf2.getInstruments().length == 1);
+        Patch patch = sf2.getInstruments()[0].getPatch();
+        assertTrue(patch.getProgram() == 0);
+        assertTrue(patch.getBank() == 0);
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankInputStream.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankInputStream.java	Fri May 22 17:47:18 2009 +0100
@@ -1,12 +1,3 @@
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.SF2SoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,29 +26,38 @@
 /* @test
  @summary Test SF2SoundbankReader getSoundbank(InputStream) method */
 
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.SF2SoundbankReader;
+
 public class TestGetSoundbankInputStream {
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.sf2");
-		FileInputStream fis = new FileInputStream(file);
-		BufferedInputStream bis = new BufferedInputStream(fis);
-		try
-		{
-			Soundbank sf2 = new SF2SoundbankReader().getSoundbank(bis);
-			assertTrue(sf2.getInstruments().length == 1);
-			Patch patch = sf2.getInstruments()[0].getPatch();
-			assertTrue(patch.getProgram() == 0);
-			assertTrue(patch.getBank() == 0);
-		}
-		finally
-		{
-			bis.close();
-		}
-	}	
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
+
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.sf2");
+        FileInputStream fis = new FileInputStream(file);
+        BufferedInputStream bis = new BufferedInputStream(fis);
+        try
+        {
+            Soundbank sf2 = new SF2SoundbankReader().getSoundbank(bis);
+            assertTrue(sf2.getInstruments().length == 1);
+            Patch patch = sf2.getInstruments()[0].getPatch();
+            assertTrue(patch.getProgram() == 0);
+            assertTrue(patch.getBank() == 0);
+        }
+        finally
+        {
+            bis.close();
+        }
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankInputStream2.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankInputStream2.java	Fri May 22 17:47:18 2009 +0100
@@ -1,14 +1,3 @@
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.SF2SoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,85 +24,96 @@
  */
 
 /* @test
- @summary Test SF2SoundbankReader getSoundbank(InputStream) method using 
+ @summary Test SF2SoundbankReader getSoundbank(InputStream) method using
      very bad InputStream which can only read 1 byte at time */
 
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.SF2SoundbankReader;
+
 public class TestGetSoundbankInputStream2 {
-	
-	private static class BadInputStream extends InputStream
-	{
+
+    private static class BadInputStream extends InputStream
+    {
+
+        InputStream is;
 
-		InputStream is;
-		
-		public BadInputStream(InputStream is)
-		{
-			this.is = is;
-		}
-		
-		public int read() throws IOException {
-			return is.read();
-		}
+        public BadInputStream(InputStream is)
+        {
+            this.is = is;
+        }
+
+        public int read() throws IOException {
+            return is.read();
+        }
 
-		public int read(byte[] b, int off, int len) throws IOException {
-			if(len > 1) len = 1;
-			return is.read(b, off, len);
-		}
+        public int read(byte[] b, int off, int len) throws IOException {
+            if(len > 1) len = 1;
+            return is.read(b, off, len);
+        }
 
-		public int read(byte[] b) throws IOException {			
-			return read(b, 0, b.length);
-		}
+        public int read(byte[] b) throws IOException {
+            return read(b, 0, b.length);
+        }
 
-		public long skip(long n) throws IOException {
-			if(n > 1) n = 1;
-			return is.skip(n);
-		}
+        public long skip(long n) throws IOException {
+            if(n > 1) n = 1;
+            return is.skip(n);
+        }
 
-		public int available() throws IOException {
-			int avail = is.available();
-			if(avail > 1) avail = 1;
-			return avail;
-		}
+        public int available() throws IOException {
+            int avail = is.available();
+            if(avail > 1) avail = 1;
+            return avail;
+        }
 
-		public void close() throws IOException {
-			is.close();
-		}
+        public void close() throws IOException {
+            is.close();
+        }
 
-		public synchronized void mark(int readlimit) {
-			is.mark(readlimit);
-		}
+        public synchronized void mark(int readlimit) {
+            is.mark(readlimit);
+        }
+
+        public boolean markSupported() {
+            return is.markSupported();
+        }
 
-		public boolean markSupported() {
-			return is.markSupported();
-		}
+        public synchronized void reset() throws IOException {
+            is.reset();
+        }
+
+    }
 
-		public synchronized void reset() throws IOException {
-			is.reset();
-		}
-		
-	}
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.sf2");
-		FileInputStream fis = new FileInputStream(file);
-		BufferedInputStream bis = new BufferedInputStream(fis);
-		try
-		{
-			InputStream badis = new BadInputStream(bis); 
-			Soundbank sf2 = new SF2SoundbankReader().getSoundbank(badis);
-			assertTrue(sf2.getInstruments().length == 1);
-			Patch patch = sf2.getInstruments()[0].getPatch();
-			assertTrue(patch.getProgram() == 0);
-			assertTrue(patch.getBank() == 0);
-		}
-		finally
-		{
-			bis.close();
-		}
-	}	
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.sf2");
+        FileInputStream fis = new FileInputStream(file);
+        BufferedInputStream bis = new BufferedInputStream(fis);
+        try
+        {
+            InputStream badis = new BadInputStream(bis);
+            Soundbank sf2 = new SF2SoundbankReader().getSoundbank(badis);
+            assertTrue(sf2.getInstruments().length == 1);
+            Patch patch = sf2.getInstruments()[0].getPatch();
+            assertTrue(patch.getProgram() == 0);
+            assertTrue(patch.getBank() == 0);
+        }
+        finally
+        {
+            bis.close();
+        }
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankUrl.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SF2SoundbankReader/TestGetSoundbankUrl.java	Fri May 22 17:47:18 2009 +0100
@@ -1,11 +1,3 @@
-import java.io.File;
-import java.net.URL;
-
-import javax.sound.midi.Patch;
-import javax.sound.midi.Soundbank;
-
-import com.sun.media.sound.SF2SoundbankReader;
-
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,21 +26,29 @@
 /* @test
  @summary Test SF2SoundbankReader getSoundbank(File) method */
 
+import java.io.File;
+import java.net.URL;
+
+import javax.sound.midi.Patch;
+import javax.sound.midi.Soundbank;
+
+import com.sun.media.sound.SF2SoundbankReader;
+
 public class TestGetSoundbankUrl {
 
-	private static void assertTrue(boolean value) throws Exception
-	{
-		if(!value)
-			throw new RuntimeException("assertTrue fails!");
-	}
-		
-	public static void main(String[] args) throws Exception {
-		File file = new File(System.getProperty("test.src", "."), "ding.sf2");
-		URL url = file.toURI().toURL();
-		Soundbank sf2 = new SF2SoundbankReader().getSoundbank(url);
-		assertTrue(sf2.getInstruments().length == 1);
-		Patch patch = sf2.getInstruments()[0].getPatch();
-		assertTrue(patch.getProgram() == 0);
-		assertTrue(patch.getBank() == 0);
-	}	
+    private static void assertTrue(boolean value) throws Exception
+    {
+        if(!value)
+            throw new RuntimeException("assertTrue fails!");
+    }
+
+    public static void main(String[] args) throws Exception {
+        File file = new File(System.getProperty("test.src", "."), "ding.sf2");
+        URL url = file.toURI().toURL();
+        Soundbank sf2 = new SF2SoundbankReader().getSoundbank(url);
+        assertTrue(sf2.getInstruments().length == 1);
+        Patch patch = sf2.getInstruments()[0].getPatch();
+        assertTrue(patch.getProgram() == 0);
+        assertTrue(patch.getBank() == 0);
+    }
 }
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SoftAudioSynthesizer/DummySourceDataLine.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SoftAudioSynthesizer/DummySourceDataLine.java	Fri May 22 17:47:18 2009 +0100
@@ -1,3 +1,28 @@
+/*
+ * Copyright 2007 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
 import java.util.ArrayList;
 
 import javax.sound.sampled.AudioFormat;
@@ -14,8 +39,8 @@
 
 /**
  * This is a SourceDataLine simulator used for testing SoftSynthesizer
- * without using real SourceDataLine / Audio Device. 
- * 
+ * without using real SourceDataLine / Audio Device.
+ *
  * @author Karl Helgason
  */
 
@@ -24,17 +49,17 @@
     private int bufferSize = -1;
 
     private AudioFormat format = new AudioFormat(44100.0f, 16, 2, true, false);
-    
+
     private DataLine.Info sourceLineInfo;
-    
+
     private boolean active = false;
-    
+
     private long framepos = 0;
-    
+
     private boolean opened = false;
-    
+
     private int framesize = 0;
-    
+
     public DummySourceDataLine()
     {
         ArrayList<AudioFormat> formats = new ArrayList<AudioFormat>();
@@ -77,7 +102,7 @@
         sourceLineInfo = new DataLine.Info(SourceDataLine.class,
                 formats_array, AudioSystem.NOT_SPECIFIED,
                 AudioSystem.NOT_SPECIFIED);
-        
+
     }
 
     public void open() throws LineUnavailableException {
@@ -95,10 +120,10 @@
             throws LineUnavailableException {
         this.format = format;
         this.bufferSize = bufferSize;
-        this.framesize = format.getFrameSize();        
+        this.framesize = format.getFrameSize();
         opened = true;
     }
-    
+
     public boolean isOpen() {
         return opened;
     }
@@ -113,7 +138,7 @@
 
         int flen = len / framesize;
         framepos += flen;
-        
+
         long time =  (long) (flen * (1000.0 / (double) getFormat()
                 .getSampleRate()));
         try {
@@ -122,7 +147,7 @@
             e.printStackTrace();
             return 0;
         }
-        
+
         return len;
     }
 
@@ -178,7 +203,7 @@
     }
 
     public void close() {
-        stop(); 
+        stop();
     }
 
     public Control getControl(Type control) {
@@ -197,7 +222,7 @@
     public boolean isControlSupported(Type control) {
         return false;
     }
-    
+
     public void addLineListener(LineListener listener) {
     }
 
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SoftCubicResampler/Interpolate.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SoftCubicResampler/Interpolate.java	Fri May 22 17:47:18 2009 +0100
@@ -110,4 +110,4 @@
 		if(max > 0.005)
 			fail("Interpolation failed, error="+max);
 	}
-}
\ No newline at end of file
+}
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SoftFilter/TestProcessAudio.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SoftFilter/TestProcessAudio.java	Fri May 22 17:47:18 2009 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2009 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SoftLowFrequencyOscillator/TestProcessControlLogic.java	Fri May 22 17:47:18 2009 +0100
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2009 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @summary Test SoftLowFrequencyOscillator processControlLogic method */
+
+import com.sun.media.sound.AudioSynthesizerPropertyInfo;
+import com.sun.media.sound.SoftLowFrequencyOscillator;
+import com.sun.media.sound.SoftSynthesizer;
+
+public class TestProcessControlLogic {
+
+    private static float control_rate = 147f;
+    private static SoftSynthesizer synth = new SoftSynthesizer();
+    private static SoftLowFrequencyOscillator lfo = new SoftLowFrequencyOscillator();
+
+    private static void testLFO(boolean shared, int instance, float freq, float delay,
+            float delay2) throws Exception {
+        SoftLowFrequencyOscillator lfo = 
+            shared?TestProcessControlLogic.lfo:new SoftLowFrequencyOscillator();
+        lfo.reset();
+        double[] lfo_freq = lfo.get(instance, "freq");
+        double[] lfo_delay = lfo.get(instance, "delay");
+        double[] lfo_delay2 = lfo.get(instance, "delay2");
+        double[] lfo_output = lfo.get(instance, null);
+        lfo_freq[0] = freq;
+        lfo_delay[0] = delay;
+        lfo_delay2[0] = delay2;
+        lfo.init(synth);
+
+        // For delayCount amount time, the output LFO should be 0.5
+        int delayCount = (int) ((Math.pow(2, delay / 1200.0) * control_rate));
+        delayCount += (int) ((delay2 * control_rate) / 1000.0);
+        for (int i = 0; i < delayCount; i++) {
+            if (Math.abs(0.5 - lfo_output[0]) > 0.000001)
+                throw new Exception("Incorrect LFO output ("
+                        +"0.5 != "+lfo_output[0]+")!");
+            lfo.processControlLogic();
+        }
+
+        // After the delay the LFO should start oscillate
+        // Let make sure output is accurate enough
+        double p_step = (440.0 / control_rate)
+        * Math.exp((freq - 6900.0) * (Math.log(2) / 1200.0));
+        double p = 0;
+        for (int i = 0; i < 30; i++) {
+            p += p_step;
+            double predicted_output = 0.5 + Math.sin(p * 2 * Math.PI) * 0.5;
+            if (Math.abs(predicted_output - lfo_output[0]) > 0.001)
+                throw new Exception("Incorrect LFO output ("
+                        +predicted_output+" != "+lfo_output[0]+")!");
+            lfo.processControlLogic();
+        }
+
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        // Get default control rate from synthesizer
+        AudioSynthesizerPropertyInfo[] p = synth.getPropertyInfo(null);
+        for (int i = 0; i < p.length; i++) {
+            if (p[i].name.equals("control rate")) {
+                control_rate = ((Float) p[i].value).floatValue();
+                break;
+            }
+        }
+
+        // Test LFO under various configurations
+        for (int instance = 0; instance < 3; instance++)
+            for (int d1 = -3000; d1 < 0; d1 += 1000)
+                for (int d2 = 0; d2 < 5000; d2 += 1000)
+                    for (int fr = -1000; fr < 1000; fr += 100) {
+                        testLFO(true, instance,
+                                (fr == -1000) ? Float.NEGATIVE_INFINITY : fr,
+                                (d1 == -3000) ? Float.NEGATIVE_INFINITY : d1,
+                                d2);
+                        testLFO(false, instance,
+                                (fr == -1000) ? Float.NEGATIVE_INFINITY : fr,
+                                (d1 == -3000) ? Float.NEGATIVE_INFINITY : d1,
+                                d2);
+                    }
+
+    }
+}
--- a/overlays/openjdk/jdk/test/com/sun/media/sound/SoftSynthesizer/DummySourceDataLine.java	Fri May 22 17:44:57 2009 +0100
+++ b/overlays/openjdk/jdk/test/com/sun/media/sound/SoftSynthesizer/DummySourceDataLine.java	Fri May 22 17:47:18 2009 +0100
@@ -1,3 +1,28 @@
+/*
+ * Copyright 2007 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.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
 import java.util.ArrayList;
 
 import javax.sound.sampled.AudioFormat;
@@ -14,8 +39,8 @@
 
 /**
  * This is a SourceDataLine simulator used for testing SoftSynthesizer
- * without using real SourceDataLine / Audio Device. 
- * 
+ * without using real SourceDataLine / Audio Device.
+ *
  * @author Karl Helgason
  */
 
@@ -24,17 +49,17 @@
     private int bufferSize = -1;
 
     private AudioFormat format = new AudioFormat(44100.0f, 16, 2, true, false);
-    
+
     private DataLine.Info sourceLineInfo;
-    
+
     private boolean active = false;
-    
+
     private long framepos = 0;
-    
+
     private boolean opened = false;
-    
+
     private int framesize = 0;
-    
+
     public DummySourceDataLine()
     {
         ArrayList<AudioFormat> formats = new ArrayList<AudioFormat>();
@@ -77,7 +102,7 @@
         sourceLineInfo = new DataLine.Info(SourceDataLine.class,
                 formats_array, AudioSystem.NOT_SPECIFIED,
                 AudioSystem.NOT_SPECIFIED);
-        
+
     }
 
     public void open() throws LineUnavailableException {
@@ -95,10 +120,10 @@
             throws LineUnavailableException {
         this.format = format;
         this.bufferSize = bufferSize;
-        this.framesize = format.getFrameSize();        
+        this.framesize = format.getFrameSize();
         opened = true;
     }
-    
+
     public boolean isOpen() {
         return opened;
     }
@@ -113,7 +138,7 @@
 
         int flen = len / framesize;
         framepos += flen;
-        
+
         long time =  (long) (flen * (1000.0 / (double) getFormat()
                 .getSampleRate()));
         try {
@@ -122,7 +147,7 @@
             e.printStackTrace();
             return 0;
         }
-        
+
         return len;
     }
 
@@ -178,7 +203,7 @@
     }
 
     public void close() {
-        stop(); 
+        stop();
     }
 
     public Control getControl(Type control) {
@@ -197,7 +222,7 @@
     public boolean isControlSupported(Type control) {
         return false;
     }
-    
+
     public void addLineListener(LineListener listener) {
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-samejvm-safe.patch	Fri May 22 17:47:18 2009 +0100
@@ -0,0 +1,12 @@
+--- openjdk.orig/jdk/test/TEST.ROOT	2008-11-06 09:44:52.000000000 +0100
++++ openjdk/jdk/test/TEST.ROOT	2008-11-23 16:15:53.000000000 +0100
+@@ -4,3 +4,9 @@
+ 
+ # The list of keywords supported in the entire test suite
+ keys=2d dnd i18n
++
++# List if directory (prefixes) that contain test that are safe to run in
++# -samejvm mode. Only used if the test root (dir containing this file) is
++# given to jtreg and the -samejvm argument is used, ignored otherwise
++# (meaning all tests are assumed to be same jvm safe).
++samejvmsafe=com/sun/crypto com/sun/management com/sun/media com/sun/security java/beans/beancontext java/beans/PropertyChangeSupport java/beans/Statement java/beans/VetoableChangeSupport java/lang/Boolean java/lang/Byte java/lang/Double java/lang/Float java/lang/Integer java/lang/Long java/lang/Short java/lang/Math java/lang/StrictMath java/lang/String java/lang/Throwable java/lang/instrument java/math java/net/URI java/net/URLDecoder java/net/URLEncoder java/nio/Buffer java/nio/ByteOrder java/nio/MappedByteBuffer java/nio/channels/Channels java/nio/channels/DatagramChannel java/nio/channels/spi java/security/cert java/security/Provider java/text java/util/jar java/util/zip java/util/Array java/util/BitSet java/util/Collection java/util/List javax/imageio javax/management/openmbean javax/rmi javax/sound sun/net/www/protocol sun/misc sun/nio sun/security/pkcs11 sun/security/rsa sun/util
--- a/test/jtreg/excludelist.jdk.jtx	Fri May 22 17:44:57 2009 +0100
+++ b/test/jtreg/excludelist.jdk.jtx	Fri May 22 17:47:18 2009 +0100
@@ -192,3 +192,8 @@
 sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java
 # java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class NotBound with modifiers "public static"
 java/nio/channels/DatagramChannel/NotBound.java
+
+# Something fishy going on here...
+java/awt/FontClass/CreateFont/fileaccess/FontFile.java
+java/awt/FontClass/CreateFont/DeleteFont.sh
+java/awt/FontClass/CreateFont/bigfont.html