[Request for review and bugid] A collection of fixes for gervill (2010-04)

joe.darcy at oracle.com joe.darcy at oracle.com
Mon Apr 5 19:20:37 PDT 2010


Hello.

I've filed bug 6941027 "Gervill update, April 2010" for this work.  
However, I will leave Alexey to do the actual code reviewing for OpenJDK 
6 and JDK 7.

Note that 
test/javax/sound/midi/Gervill/AudioFloatFormatConverter/SkipTest.java 
doesn't have a newline at the end of the file.

-Joe

On 4/5/2010 1:29 PM, Karl Helgason wrote:
> Hi,
>
> I need code review and bugid for the fix:
>    http://cr.openjdk.java.net/~kalli/gervill-update/webrev.01/
>
> Major fixes this webrev includes are:
>
> * Allow access to cached emergency soundbank using AccessController.doPrivileged
>    This fix allows using cached emergency soundbank in applets
>    which speeds up loading of applets especially on slow computers.
>    And also using AccessController.doPrivileged we can use user-installed
>    soundfonts in applets e.g. soundfonts found in audio folder of JRE.
>
> * Support for user config file.
>    Default settings for Gervill don't always suit everybody,
>    some needed lower latency, different samplerate and e.t.c
>    To fix that a support to allow user to change default settings using
>    Preferences API was added.
>
> * Fixed how getAvailableInstruments and getLoadedInstruments worked.
>    SoftSynthesizer.getAvailableInstruments now always returns instruments
>    from default soundbank. And getLoadedInstruments now always returns
>    loaded instruments. The behavior of these methods where not correct.
>
> * Improved support for large soundbanks
>    a)  Indexed version of ModelStandardDirector added which speeds up
>         looking up notes in instruments with many layers.
>    b)  Allow unused instrument to be garbage collected more easily,
>         we now put null value to unused variable.
>    c) Prevent unnecessary lookup of instrument object
>        on pseudo program change (when bank and program is unchanged)
>
> * Enable user to disable loading default soundbank.
>    Some users wanted to be able to open the synthesizer
>    without the synthesizer loading the default soundbank.
>
> And then there was several other bug fixes:
> * Fix: Synchronization bug in n SoftSynthesizer.getDefaultSoundbank
> * Fix: AudioFloatInputStreamResampler.skip broken
> * Fix: RealTime scale/octave tuning doesn't affect sounding notes.
> * Fix: ModelByteBufferWaveTable.openStream().getFrameLength()
>           returns incorrect values in some cases.
>
> Heres complete list of changes made:
>   - Fix: Use AccessController.doPrivileged to access user settings
>          and cached emergency soundbank.
>            Affected File/Method: SoftSynthesizer.getDefaultSoundbank
>   - Add: Support for user config file.
>            Affected File/Method: SoftSynthesizer.getPropertyInfo
>   - Add: Let SoftSynthesizer.getPropertyInfo use type conversion when needed.
>            JTreg test added:
>              /test/SoftSynthesizer/GetPropertyInfo
>   - Add: Enable user to disable loading default soundbank.
>            Affected File/Method: SoftSynthesizer.getPropertyInfo
>                                  SoftSynthesizer.processPropertyInfo
>                                  SoftSynthesizer.openStream
>            JTreg test added:
>              /test/SoftSynthesizer/TestDisableLoadDefaultSoundbank
>   - Fix: SoftSynthesizer.getAvailableInstruments should
>          always return instruments from default soundbank.
>            Affected File/Method: SoftSynthesizer.getAvailableInstruments
>            JTreg test added:
>              /test/SoftSynthesizer/GetAvailableInstruments2
>   - Fix: SoftSynthesizer.getLoadedInstruments should always
>          return loaded instrument.
>            Affected File/Method: SoftSynthesizer.getLoadedInstruments
>            JTreg test added:
>              /test/SoftSynthesizer/GetLoadedInstruments2
>            JTreg tests fixed:
>              /test/SoftSynthesizer/LoadAllInstruments
>              /test/SoftSynthesizer/LoadInstrument
>              /test/SoftSynthesizer/LoadInstruments
>              /test/SoftSynthesizer/RemapInstrument
>                * this test never worked correctly
>              /test/SoftSynthesizer/UnloadAllInstruments
>              /test/SoftSynthesizer/UnloadInstrument
>              /test/SoftSynthesizer/UnloadInstruments
>   - Fix: SoftSynthesizer.getDefaultSoundbank is not properly synchronized.
>            Affected File/Method: SoftSynthesizer.getDefaultSoundbank
>   - Optimization: Indexed version of ModelStandardDirector added.
>   - Optimization: Fully unload instruments by setting null to unused values.
>            Affected Files: SoftVoice, SoftChannel, SoftSynthesizer
>   - Optimization: Prevent unnecessary lookup of instrument object
>                 on pseudo program change (when bank and program is unchanged)
>            Affected File/Method: SoftChannel.programChange
>   - Fix: AudioFloatInputStreamResampler.skip broken.
>            (Gervill Bug Issues 5)
>            see: https://gervill.dev.java.net/issues/show_bug.cgi?id=5
>            Affected File/Method:
>              AudioFloatFormatConverter.AudioFloatInputStreamResampler.skip
>            JTreg test added:
>            /test/AudioFloatFormatConverter/SkipTest
>   - Fix: ModelByteBufferWaveTable.openStream().getFrameLength()
>          returns incorrect values in some cases.
>            (Gervill Bug Issues 4)
>            see: https://gervill.dev.java.net/issues/show_bug.cgi?id=4
>            Affected File/Method: ModelByteBufferWaveTable.openStream
>            JTreg test added:
>              /test/ModelByteBufferWavetable/OpenStream
>   - Fix: RealTime scale/octave tuning doesn't affect sounding notes.
>            Affected File/Method: SoftVoice.updateTuning
>            JTreg test added:
>              /test/ModelByteBufferWavetable/OpenStream
>   


More information about the jdk6-dev mailing list