From javasound-dev at bome.com Thu Dec 3 16:51:01 2015 From: javasound-dev at bome.com (Florian Bomers) Date: Thu, 3 Dec 2015 17:51:01 +0100 Subject: [9] Review Request: 8143909 Behavior of null arguments not specified in javax.sound.midi.spi In-Reply-To: <56584D84.4030607@oracle.com> References: <56584D84.4030607@oracle.com> Message-ID: <56607228.1000302@bome.com> looks good to me, too. Florian On 27.11.2015 13:33, Sergey Bylokhov wrote: > Hello Audio Guru. > > Please review the fix for jdk9. This issue is a subtask of: > 4912693: Behavior of null arguments not specified in Java Sound > > In this patch I cover the whole javax.sound.midi.spi package. And the > patch is quite similar to the: > http://mail.openjdk.java.net/pipermail/sound-dev/2015-September/000330.html > > > The small description of the fix: > - Part of the fix for JDK-8058115(integrated to jdk9 only) was > reverted and its test was removed, because I decided to specify the > NPE instead. > https://bugs.openjdk.java.net/browse/JDK-8058115 > - I have checked all methods in the spi package and all related > methods in MidiSystem class. > - I have moved related tests to the folder corresponding the package > and class name. > - I have written a tests for every method and class which I changed. > Note that these classes related to the different service providers, so > I have covered all installed implementations of each provider. > > requireNonNull in the MidiSystem is necessary only when the list of > related providers is empty, in a general case these methods already > throw npe. > > I have done all related regression/jck/sqe tests. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8143909 > Webrev can be found at: > http://cr.openjdk.java.net/~serb/8143909/webrev.01 > -- Florian Bomers Bome Software everything sounds. http://www.bome.com __________________________________________________________________ Bome Software GmbH & Co KG Gesellschafterin: Dachauer Str.187 Bome Komplement?r GmbH 80637 M?nchen, Germany Gesch?ftsf?hrung: Florian B?mers Amtsgericht M?nchen HRA95502 Amtsgericht M?nchen HRB185574 From Sergey.Bylokhov at oracle.com Wed Dec 16 13:16:52 2015 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Wed, 16 Dec 2015 16:16:52 +0300 Subject: [9] Review Request: 8135088 Typo in AuFileReader Message-ID: <56716444.5080500@oracle.com> Hello, Audio Guru. Please review the fix for jdk9. Long long time ago support of AU format was implemented with assumption to support a few standards: - ".snd"(official SUN standard) - "\0ds." (extension DEC) Also we support both big/little-endian. But later we removed support of little-endian from the writer in the https://bugs.openjdk.java.net/browse/JDK-4297100 And now after a manual code review I found that we actually never supported little-endian/DEC, because of the typo in AuFileReader.java As a fix I suggest to drop support of non standard extensions, and work only in case of ".snd" + big-endian. Description of AU standard: https://en.wikipedia.org/wiki/Au_file_format Bug: https://bugs.openjdk.java.net/browse/JDK-8135088 Webrev can be found at: http://cr.openjdk.java.net/~serb/8135088/webrev.00 -- Best regards, Sergey. From danrollo at gmail.com Wed Dec 16 15:03:15 2015 From: danrollo at gmail.com (Dan Rollo) Date: Wed, 16 Dec 2015 10:03:15 -0500 Subject: [9] Review Request: 8135088 Typo in AuFileReader In-Reply-To: <56716444.5080500@oracle.com> References: <56716444.5080500@oracle.com> Message-ID: Could you add unit tests for the surviving AU format? > On Dec 16, 2015, at 8:16 AM, Sergey Bylokhov wrote: > > Hello, Audio Guru. > > Please review the fix for jdk9. > > Long long time ago support of AU format was implemented with assumption to support a few standards: > - ".snd"(official SUN standard) > - "\0ds." (extension DEC) > Also we support both big/little-endian. > > But later we removed support of little-endian from the writer in the https://bugs.openjdk.java.net/browse/JDK-4297100 > > And now after a manual code review I found that we actually never supported little-endian/DEC, because of the typo in AuFileReader.java > > As a fix I suggest to drop support of non standard extensions, and work only in case of ".snd" + big-endian. > > Description of AU standard: https://en.wikipedia.org/wiki/Au_file_format > > Bug: https://bugs.openjdk.java.net/browse/JDK-8135088 > Webrev can be found at: http://cr.openjdk.java.net/~serb/8135088/webrev.00 > > -- > Best regards, Sergey. From Sergey.Bylokhov at oracle.com Wed Dec 16 15:28:21 2015 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Wed, 16 Dec 2015 18:28:21 +0300 Subject: [9] Review Request: 8135088 Typo in AuFileReader In-Reply-To: References: <56716444.5080500@oracle.com> Message-ID: <56718315.6090603@oracle.com> On 16/12/15 18:03, Dan Rollo wrote: > Could you add unit tests for the surviving AU format? We already have a tests in the closed repo, and some tests from our sqe team, which cover different supported audio files. Since the adding of binary files to our ws is not easy, I plan to do this at once in one separate fix for: JDK-8044817: Migrate Sound functional tests https://bugs.openjdk.java.net/browse/JDK-8044817 > > >> On Dec 16, 2015, at 8:16 AM, Sergey Bylokhov wrote: >> >> Hello, Audio Guru. >> >> Please review the fix for jdk9. >> >> Long long time ago support of AU format was implemented with assumption to support a few standards: >> - ".snd"(official SUN standard) >> - "\0ds." (extension DEC) >> Also we support both big/little-endian. >> >> But later we removed support of little-endian from the writer in the https://bugs.openjdk.java.net/browse/JDK-4297100 >> >> And now after a manual code review I found that we actually never supported little-endian/DEC, because of the typo in AuFileReader.java >> >> As a fix I suggest to drop support of non standard extensions, and work only in case of ".snd" + big-endian. >> >> Description of AU standard: https://en.wikipedia.org/wiki/Au_file_format >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8135088 >> Webrev can be found at: http://cr.openjdk.java.net/~serb/8135088/webrev.00 >> >> -- >> Best regards, Sergey. > -- Best regards, Sergey. From alexey.menkov at oracle.com Wed Dec 16 18:26:56 2015 From: alexey.menkov at oracle.com (Alex Menkov) Date: Wed, 16 Dec 2015 21:26:56 +0300 Subject: [9] Review Request: 8135088 Typo in AuFileReader In-Reply-To: <56716444.5080500@oracle.com> References: <56716444.5080500@oracle.com> Message-ID: <5671ACF0.1090909@oracle.com> The fix looks good. --alex On 16.12.2015 16:16, Sergey Bylokhov wrote: > Hello, Audio Guru. > > Please review the fix for jdk9. > > Long long time ago support of AU format was implemented with assumption > to support a few standards: > - ".snd"(official SUN standard) > - "\0ds." (extension DEC) > Also we support both big/little-endian. > > But later we removed support of little-endian from the writer in the > https://bugs.openjdk.java.net/browse/JDK-4297100 > > And now after a manual code review I found that we actually never > supported little-endian/DEC, because of the typo in AuFileReader.java > > As a fix I suggest to drop support of non standard extensions, and work > only in case of ".snd" + big-endian. > > Description of AU standard: https://en.wikipedia.org/wiki/Au_file_format > > Bug: https://bugs.openjdk.java.net/browse/JDK-8135088 > Webrev can be found at: http://cr.openjdk.java.net/~serb/8135088/webrev.00 > From Sergey.Bylokhov at oracle.com Sat Dec 19 00:05:18 2015 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Sat, 19 Dec 2015 03:05:18 +0300 Subject: [9] Review Request: 8135088 Typo in AuFileReader In-Reply-To: <5671ACF0.1090909@oracle.com> References: <56716444.5080500@oracle.com> <5671ACF0.1090909@oracle.com> Message-ID: <56749F3E.4030105@oracle.com> Thanks Alex. Any volunteers for a second reviewer? FYI - I just found that our audio_writers still incorrectly handle the "new" PCM_FLOAT format which was added in jdk7. I will fix it in my next review request. - Also I found that "AudioFileFormat.Type.SND" is not used, probably someone know why? On 16/12/15 21:26, Alex Menkov wrote: > The fix looks good. > > --alex > > On 16.12.2015 16:16, Sergey Bylokhov wrote: >> Hello, Audio Guru. >> >> Please review the fix for jdk9. >> >> Long long time ago support of AU format was implemented with assumption >> to support a few standards: >> - ".snd"(official SUN standard) >> - "\0ds." (extension DEC) >> Also we support both big/little-endian. >> >> But later we removed support of little-endian from the writer in the >> https://bugs.openjdk.java.net/browse/JDK-4297100 >> >> And now after a manual code review I found that we actually never >> supported little-endian/DEC, because of the typo in AuFileReader.java >> >> As a fix I suggest to drop support of non standard extensions, and work >> only in case of ".snd" + big-endian. >> >> Description of AU standard: https://en.wikipedia.org/wiki/Au_file_format >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8135088 >> Webrev can be found at: >> http://cr.openjdk.java.net/~serb/8135088/webrev.00 >> -- Best regards, Sergey. From philip.race at oracle.com Tue Dec 22 20:00:03 2015 From: philip.race at oracle.com (Phil Race) Date: Tue, 22 Dec 2015 12:00:03 -0800 Subject: [9] Review Request: 8135088 Typo in AuFileReader In-Reply-To: <56749F3E.4030105@oracle.com> References: <56716444.5080500@oracle.com> <5671ACF0.1090909@oracle.com> <56749F3E.4030105@oracle.com> Message-ID: <5679ABC3.8040707@oracle.com> +1 .. the change was a bit more than I was expecting for bug described as a typo ;-) -phil. On 12/18/2015 04:05 PM, Sergey Bylokhov wrote: > Thanks Alex. > Any volunteers for a second reviewer? > > FYI > - I just found that our audio_writers still incorrectly handle the > "new" PCM_FLOAT format which was added in jdk7. I will fix it in my > next review request. > - Also I found that "AudioFileFormat.Type.SND" is not used, probably > someone know why? > > > On 16/12/15 21:26, Alex Menkov wrote: >> The fix looks good. >> >> --alex >> >> On 16.12.2015 16:16, Sergey Bylokhov wrote: >>> Hello, Audio Guru. >>> >>> Please review the fix for jdk9. >>> >>> Long long time ago support of AU format was implemented with assumption >>> to support a few standards: >>> - ".snd"(official SUN standard) >>> - "\0ds." (extension DEC) >>> Also we support both big/little-endian. >>> >>> But later we removed support of little-endian from the writer in the >>> https://bugs.openjdk.java.net/browse/JDK-4297100 >>> >>> And now after a manual code review I found that we actually never >>> supported little-endian/DEC, because of the typo in AuFileReader.java >>> >>> As a fix I suggest to drop support of non standard extensions, and work >>> only in case of ".snd" + big-endian. >>> >>> Description of AU standard: >>> https://en.wikipedia.org/wiki/Au_file_format >>> >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8135088 >>> Webrev can be found at: >>> http://cr.openjdk.java.net/~serb/8135088/webrev.00 >>> > > From Sergey.Bylokhov at oracle.com Mon Dec 28 12:37:21 2015 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Mon, 28 Dec 2015 15:37:21 +0300 Subject: [9] Review Request: 8146144 Incorrect behaviour of AudioSystem.getTargetFormats/getTargetEncodings/isConversionSupported Message-ID: <56812D01.2070200@oracle.com> Hello, Audio Guru. Please review the fix for jdk9. The change contains the fixes for two quite similar issues: - A few methods in AudioSystem class should work uniformly. For example AudioSystem.getAudioInputStream() does not throw an exception if the source/target formats are unsupported by our converters. The reason is simple, this method has such code: if (sourceStream.getFormat().matches(targetFormat)) { return sourceStream; } So it returns the source stream without check of our converters. But if an exception was not thrown, means that AudioSystem.isConversionSupported() should return true for such formats, AudioSystem.getTargetFormats() should contain format which the matchs to the source format, and AudioSystem.getTargetEncodings() should contain the source encoding. All this were fixed in AudioSystem.java - Some of the methods in our converters also should work uniformly. Like getTargetFormats(encoding, sourceFormat) and getTargetEncodings(format) should have the same source checks, otherwise some of these methods can return encoding/format which are not present in the second method. For example PCMtoPCMCodec.java: getTargetEncodings() returns the list of PCM_SIGNED and PCM_UNSIGNED for any source formats of type PCM_SIG/UNSIG, but the getTargetFormats() returns some formats only for a specific sampleSize(8/16). As a fix an the checks are unified everywhere. - Another problem in the converters is that getAudioInputStream() do not throw an exception if the source and target encoding are the same. As a fix the isConversionSupported is added at the beginning of each method. So each converter will be responsible only for formats it know. Bug: https://bugs.openjdk.java.net/browse/JDK-8146144 Webrev can be found at: http://cr.openjdk.java.net/~serb/8146144/webrev.01 -- Best regards, Sergey.