Hi Joe, Gervill CVS has the newest code and Gervill overlays in IcedTea 6 are then copied from Gervill CVS. Any fixes that have been done in Gervill overlays in IcedTea 6 has also been done Gervill CVS. Gervill in OpenJDK 6 b10 was based on version 0.9 of Gervill as can be seen in the CHANGES file.
I have fixed the "suabject" typo in the SoftCubicResampler.java in the Gervill CVS master. Where did you find raw types in the code, there aren't supposed to be any. WaveExtensibleFileReader,WaveFloatFileWriter,WaveFloatFileReader has been moved to src.floatwav in the Gervill CVS. Because they aren't directly related with Gervill Synthesizer. They simply add support for float encoded Wave files. And WaveExtensibleFileReader is also a proposal how we should store channel mask in AudioFormat properties (used for multi-channel wave files). SoftMixingMixer is a experimental mixer to replace the functionality of the Java Sound Audio Engine mixer. It performs software audio mixing, which is useful when the audio hardware doesn't support mixing. It is not yet fully ready. And thus is disabled in the IcedTea. Those 9 regression tests fails because we aren't able to open audio device with default format. This is the code that fails: AudioFormat format = new AudioFormat(44100, 16, 2, true, false) line = AudioSystem.getSourceDataLine(getFormat()); It will be interesting to know if this code fails under those conditions which the regression tests fail in. And it will also be interesting to know if these tests also fails if you enable the SoftMixingMixerProvider mixer provider. regards, Karl ________________________________________ Frá: [EMAIL PROTECTED] [EMAIL PROTECTED] Fyrir hönd Joe Darcy [EMAIL PROTECTED] Sent: 22. júlí 2008 22:53 Viðtakandi: [EMAIL PROTECTED] Afrit: sound-dev@openjdk.java.net; [EMAIL PROTECTED]; [EMAIL PROTECTED] Efni: <Sound Dev> Updating Gervill for OpenJDK 6 build 12 Hello. With my OpenJDK 6 release manager hat on, I've been working to update the version of Gervill used to OpenJDK 6 to a newer version that passes the JCK tests, etc. and I'd like some review of my integration work. Before this exercise, I don't have any prior experience with sound code. A few comments, the copyright header in file SoftCubicResampler.java in the Gervill CVS master contains the typo "suabject" instead of "subject." From some casual examination of the code, it seems to use raw types throughout, that is "List" rather than "List<String>", etc. It would be better to covert to using generics; I think IDEs have refactorings to help this now. There are some differences between the latest Gervill CVS from the project's site and the Gervill overlays in IcedTea 6. In particular, IcedTea has changes to SoftMixingMixer.java and SoftSynthesizer.java as well as some additional files, WaveExtensibleFileReader.java and WaveFloatFileWriter.java. I'd prefer to limit future merging work between the three code bases, Gervill CVS, OpenJDK 6, and IcedTea overlays, so in the context of updating Gervill for OpenJDK 6 b12, I think it would be good to resolve these remaining few differences. The test directories are the same in all three code bases, except I don't pick up a missing newline at the end of ./SoftCubicResampler/Interpolate.java. During the update I ran into some testing issues, both with the original Gervill integration in OpenJDK 6 b10 as well as the new code for b12. Specifically, the 9 regression tests javax/sound/midi/Gervill/SoftAudioSynthesizer/Open.java javax/sound/midi/Gervill/SoftSynthesizer/GetLatency.java javax/sound/midi/Gervill/SoftSynthesizer/GetReceiver.java javax/sound/midi/Gervill/SoftSynthesizer/GetReceiver2.java javax/sound/midi/Gervill/SoftSynthesizer/GetReceivers.java javax/sound/midi/Gervill/SoftSynthesizer/GetTransmitter.java javax/sound/midi/Gervill/SoftSynthesizer/GetTransmitters.java javax/sound/midi/Gervill/SoftSynthesizer/ImplicitOpenClose.java javax/sound/midi/Gervill/SoftSynthesizer/Open.java can fail, seemingly dependent on how one logs into the machine. What are the necessary and sufficient conditions for permissions to run these tests? When they occur, the failures I see look like: Windows ========= java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian is supported. at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:476) at javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:604) at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:762) at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:744) at Open.main(Open.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:96) at java.lang.Thread.run(Thread.java:636) Linux ====== STDERR: java: conf.c:3109: snd_config_update_free: Assertion `update->count > 0 && update->finfo' failed. TEST RESULT: Failed. Unexpected exit from test [exit code: 134] Solaris ======= java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian is supported. at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:476) at javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:604) at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:762) at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:744) at Open.main(Open.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:96) at java.lang.Thread.run(Thread.java:636) These failures occur with the essentially Gervill CVS files I'm using as well as the IcedTea versions. I've uploaded my webrev compared to the OpenJDK 6 b11 sources to http://dcstaff.invokedynamic.info/index.php?title=Image:darcy-6717691.tgz Below are the diffs of between Gervill CVS and my workspace and the recent IcedTea overlays and my workspace; I just loop over the Java files in the base directory, print out the file name, and then the result of diff-ing with the corresponding files in my workspace. Thanks, -Joe Latest Gervill CVS (July 21, 2008) vs my workspace: ======================================== AudioFileSoundbankReader.java AudioFloatConverter.java AudioFloatFormatConverter.java AudioFloatInputStream.java AudioSynthesizer.java AudioSynthesizerPropertyInfo.java DLSInfo.java DLSInstrument.java DLSModulator.java DLSRegion.java DLSSample.java DLSSampleLoop.java DLSSampleOptions.java DLSSoundbank.java DLSSoundbankReader.java EmergencySoundbank.java FFT.java InvalidDataException.java InvalidFormatException.java JARSoundbankReader.java ModelAbstractChannelMixer.java ModelAbstractOscillator.java ModelByteBuffer.java ModelByteBufferWavetable.java ModelChannelMixer.java ModelConnectionBlock.java ModelDestination.java ModelDirectedPlayer.java ModelDirector.java ModelIdentifier.java ModelInstrument.java ModelInstrumentComparator.java ModelMappedInstrument.java ModelOscillator.java ModelOscillatorStream.java ModelPatch.java ModelPerformer.java ModelSource.java ModelStandardDirector.java ModelStandardTransform.java ModelTransform.java ModelWavetable.java RIFFInvalidDataException.java RIFFInvalidFormatException.java RIFFReader.java RIFFWriter.java SF2GlobalRegion.java SF2Instrument.java SF2InstrumentRegion.java SF2Layer.java SF2LayerRegion.java SF2Modulator.java SF2Region.java SF2Sample.java SF2Soundbank.java SF2SoundbankReader.java SimpleInstrument.java SimpleSoundbank.java SoftAbstractResampler.java SoftAudioBuffer.java SoftAudioProcessor.java SoftAudioPusher.java SoftChannel.java SoftChannelProxy.java SoftChorus.java SoftControl.java SoftCubicResampler.java 8c8 < * particular file as suabject to the "Classpath" exception as provided --- > * particular file as subject to the "Classpath" exception as provided SoftEnvelopeGenerator.java SoftFilter.java SoftInstrument.java SoftJitterCorrector.java SoftLanczosResampler.java SoftLimiter.java SoftLinearResampler.java SoftLinearResampler2.java SoftLowFrequencyOscillator.java SoftMainMixer.java SoftMidiAudioFileReader.java SoftMixingClip.java SoftMixingDataLine.java SoftMixingMainMixer.java SoftMixingMixer.java SoftMixingMixerProvider.java SoftMixingSourceDataLine.java SoftPerformer.java SoftPointResampler.java SoftProcess.java SoftProvider.java SoftReceiver.java SoftResampler.java SoftResamplerStreamer.java SoftReverb.java SoftShortMessage.java SoftSincResampler.java SoftSynthesizer.java SoftTuning.java SoftVoice.java IcedTea 6 58510fd936ff overlays vs my workspace ====================================== AudioFileSoundbankReader.java AudioFloatConverter.java AudioFloatFormatConverter.java AudioFloatInputStream.java AudioSynthesizer.java AudioSynthesizerPropertyInfo.java DLSInfo.java DLSInstrument.java DLSModulator.java DLSRegion.java DLSSample.java DLSSampleLoop.java DLSSampleOptions.java DLSSoundbank.java DLSSoundbankReader.java 50,51d49 < } catch(IOException ioe) { < return null; EmergencySoundbank.java FFT.java InvalidDataException.java InvalidFormatException.java JARSoundbankReader.java ModelAbstractChannelMixer.java ModelAbstractOscillator.java ModelByteBuffer.java ModelByteBufferWavetable.java ModelChannelMixer.java ModelConnectionBlock.java ModelDestination.java ModelDirectedPlayer.java ModelDirector.java ModelIdentifier.java ModelInstrument.java ModelInstrumentComparator.java ModelMappedInstrument.java ModelOscillator.java ModelOscillatorStream.java ModelPatch.java ModelPerformer.java ModelSource.java ModelStandardDirector.java ModelStandardTransform.java ModelTransform.java ModelWavetable.java RIFFInvalidDataException.java RIFFInvalidFormatException.java RIFFReader.java RIFFWriter.java SF2GlobalRegion.java SF2Instrument.java SF2InstrumentRegion.java SF2Layer.java SF2LayerRegion.java SF2Modulator.java SF2Region.java SF2Sample.java SF2Soundbank.java SF2SoundbankReader.java 49,50d48 < } catch(IOException ioe) { < return null; SimpleInstrument.java SimpleSoundbank.java SoftAbstractResampler.java SoftAudioBuffer.java SoftAudioProcessor.java SoftAudioPusher.java SoftChannel.java 1197,1199c1197 < // Should only return lower 7 bits, < // even when controller is "boosted" higher. < return this.controller[controller] & 127; --- > return this.controller[controller]; SoftChannelProxy.java SoftChorus.java SoftControl.java SoftCubicResampler.java 8c8 < * particular file as suabject to the "Classpath" exception as provided --- > * particular file as subject to the "Classpath" exception as provided SoftEnvelopeGenerator.java SoftFilter.java SoftInstrument.java SoftJitterCorrector.java SoftLanczosResampler.java SoftLimiter.java SoftLinearResampler.java SoftLinearResampler2.java SoftLowFrequencyOscillator.java SoftMainMixer.java SoftMidiAudioFileReader.java SoftMixingClip.java SoftMixingDataLine.java SoftMixingMainMixer.java SoftMixingMixer.java 357,359d356 < DataLine.Info info = new DataLine.Info( < SourceDataLine.class, format); < 368,369c365,413 < line = (SourceDataLine) defaultmixer.getLine(info); < else --- > { > // Search for suitable line > > DataLine.Info idealinfo = null; > AudioFormat idealformat = null; > > Line.Info[] lineinfos = defaultmixer.getSourceLineInfo(); > idealFound: > for (int i = 0; i < lineinfos.length; i++) { > if(lineinfos[i].getLineClass() == SourceDataLine.class) > { > DataLine.Info info = (DataLine.Info)lineinfos[i]; > AudioFormat[] formats = info.getFormats(); > for (int j = 0; j < formats.length; j++) { > AudioFormat format = formats[j]; > if(format.getChannels() == 2 || > format.getChannels() == AudioSystem.NOT_SPECIFIED) > if(format.getEncoding().equals(Encoding.PCM_SIGNED) || > format.getEncoding().equals(Encoding.PCM_UNSIGNED)) > if(format.getSampleRate() == AudioSystem.NOT_SPECIFIED || > format.getSampleRate() == 48000.0) > if(format.getSampleSizeInBits() == AudioSystem.NOT_SPECIFIED || > format.getSampleSizeInBits() == 16) > { > idealinfo = info; > int ideal_channels = format.getChannels(); > boolean ideal_signed = format.getEncoding().equals(Encoding.PCM_SIGNED); > float ideal_rate = format.getSampleRate(); > boolean ideal_endian = format.isBigEndian(); > int ideal_bits = format.getSampleSizeInBits(); > if(ideal_bits == AudioSystem.NOT_SPECIFIED) ideal_bits = 16; > if(ideal_channels == AudioSystem.NOT_SPECIFIED) ideal_channels = 2; > if(ideal_rate == AudioSystem.NOT_SPECIFIED) ideal_rate = 48000; > idealformat = new AudioFormat(ideal_rate, ideal_bits, > ideal_channels, ideal_signed, ideal_endian); > break idealFound; > } > } > } > } > > if(idealformat != null) > { > format = idealformat; > line = (SourceDataLine) defaultmixer.getLine(idealinfo); > } > } > > if(line == null) SoftMixingMixerProvider.java SoftMixingSourceDataLine.java SoftPerformer.java SoftPointResampler.java SoftProcess.java SoftProvider.java SoftReceiver.java SoftResampler.java SoftResamplerStreamer.java SoftReverb.java SoftShortMessage.java SoftSincResampler.java SoftSynthesizer.java 540a541,546 > File userhome = null; > File emg_soundbank_file = null; > > /* > * Try to load saved generated soundbank > */ 541a548,563 > userhome = new File(System.getProperty("user.home"), > ".gervill"); > emg_soundbank_file = new File(userhome, "soundbank-emg.sf2"); > Soundbank sbk = MidiSystem.getSoundbank(emg_soundbank_file); > defaultSoundBank = sbk; > return defaultSoundBank; > } catch (AccessControlException e) { > } catch (Exception e) { > //e.printStackTrace(); > } > > try { > > /* > * Generate emergency soundbank > */ 542a565,574 > > /* > * Save generated soundbank to disk for faster future use. > */ > if(defaultSoundBank != null) > { > if(!userhome.exists()) userhome.mkdirs(); > if(!emg_soundbank_file.exists()) > ((SF2Soundbank)defaultSoundBank).save(emg_soundbank_file); > } 594,596d625 < if (soundbank == null || !isSoundbankSupported(soundbank)) < throw new IllegalArgumentException("Unsupported soundbank: " + soundbank); < 621,623d649 < if (soundbank == null || !isSoundbankSupported(soundbank)) < throw new IllegalArgumentException("Unsupported soundbank: " + soundbank); < SoftTuning.java SoftVoice.java WaveExtensibleFileReader.java diff: /net/hest.sfbay/w/darcy/ws/6-open.new/jdk/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java: No such file or directory WaveFloatFileReader.java 74a75 > long framerate = 1; 89c90 < /* framerate = */chunk.readUnsignedInt(); --- > framerate = chunk.readUnsignedInt(); 106c107 < framesize, samplerate, false); --- > framesize, framerate, false); WaveFloatFileWriter.java diff: /net/hest.sfbay/w/darcy/ws/6-open.new/jdk/src/share/classes/com/sun/media/sound/WaveFloatFileWriter.java: No such file or directory No virus found in this incoming message. Checked by AVG. Version: 7.5.524 / Virus Database: 270.5.4/1566 - Release Date: 22.7.2008 06:00