# HG changeset patch # User Chris Cannam # Date 1548858649 0 # Node ID 6d9881e59cc20d3898405db09aea049c856f60e4 # Parent 08a389e9658207b0ae4eac061b8d5e576ace59ad WMA test cases diff -r 08a389e96582 -r 6d9881e59cc2 data/fileio/test/AudioFileReaderTest.h --- a/data/fileio/test/AudioFileReaderTest.h Wed Jan 30 11:00:54 2019 +0000 +++ b/data/fileio/test/AudioFileReaderTest.h Wed Jan 30 14:30:49 2019 +0000 @@ -114,6 +114,11 @@ maxLimit = 0.2; rmsLimit = 0.1; + } else if (format == "wma") { + + maxLimit = 0.05; + rmsLimit = 0.01; + } else if (format == "mp3") { if (resampled && !gapless) { @@ -160,9 +165,14 @@ } else if (format == "aac") { - maxLimit = 0.1; + maxLimit = 0.2; rmsLimit = 0.1; + } else if (format == "wma") { + + maxLimit = 0.05; + rmsLimit = 0.01; + } else if (format == "mp3") { // all mp3 figures are worse when not normalising @@ -227,9 +237,35 @@ for (bool norm: norms) { for (bool gapless: gaplesses) { - if (format != "mp3" && !gapless) { - continue; +#ifdef Q_OS_WIN + if (format == "aac") { + if (gapless) { + // Apparently no support for AAC + // encoder delay compensation in + // MediaFoundation, so these tests + // are only available non-gapless + continue; + } + } else if (format != "mp3") { + if (!gapless) { + // All other formats but mp3 are + // intrinsically gapless, so we + // can skip the non-gapless option + continue; + } } +#else + if (format != "mp3") { + if (!gapless) { + // All other formats but mp3 are + // intrinsically gapless + // everywhere except for Windows + // (see above), so we can skip the + // non-gapless option + continue; + } + } +#endif QString desc = testName (format, filename, rate, norm, gapless); @@ -306,6 +342,7 @@ bool perceptual = (extension == "mp3" || extension == "aac" || extension == "m4a" || + extension == "wma" || extension == "opus"); if (perceptual && !gapless) { @@ -383,7 +420,11 @@ // "something else" otherwise. if (gapless) { - if (format == "aac") { + if (format == "aac" +#ifdef Q_OS_WIN + || (format == "mp3" && (readRate != fileRate)) +#endif + ) { // ouch! if (offset == -1) offset = 0; } diff -r 08a389e96582 -r 6d9881e59cc2 data/fileio/test/audio/wma/44100-2.wma Binary file data/fileio/test/audio/wma/44100-2.wma has changed diff -r 08a389e96582 -r 6d9881e59cc2 data/fileio/test/encodings/Tëmple of Spörks.wma Binary file data/fileio/test/encodings/Tëmple of Spörks.wma has changed