Mercurial > hg > svcore
changeset 1309:2e7fcdd5f627 mp3-gapless
Test fixes
author | Chris Cannam |
---|---|
date | Tue, 29 Nov 2016 14:35:27 +0000 |
parents | 80c77916fe85 |
children | aa1b1fc2d018 |
files | data/fileio/test/AudioFileReaderTest.h |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/data/fileio/test/AudioFileReaderTest.h Tue Nov 29 14:25:57 2016 +0000 +++ b/data/fileio/test/AudioFileReaderTest.h Tue Nov 29 14:35:27 2016 +0000 @@ -120,16 +120,16 @@ int edgeSize = 100; if (nominalDepth < 16) { - maxLimit *= 2; - meanLimit *= 20; + maxLimit = 0.02; + meanLimit = 0.02; } else if (extension == "ogg" || extension == "mp3") { - maxLimit *= 10; - meanLimit *= 10; + maxLimit = 0.1; + meanLimit = 0.035; edgeLimit = maxLimit * 3; } else if (extension == "aac" || extension == "m4a") { - maxLimit *= 30; // seems max diff can be quite large here + maxLimit = 0.3; // seems max diff can be quite large here // even when mean is fairly small - meanLimit *= 10; + meanLimit = 0.01; edgeLimit = maxLimit * 3; } @@ -198,9 +198,9 @@ } // check for spurious material at end - for (int i = refFrames; i + offset < read; ++i) { - int ix = i + offset; - float quiet = 1e-6; + for (sv_frame_t i = refFrames; i + offset < read; ++i) { + sv_frame_t ix = i + offset; + float quiet = 1e-6f; float mag = fabsf(test[ix * channels + c]); if (mag > quiet) { cerr << "ERROR: audiofile " << audiofile << " contains spurious data after end of reference (found sample " << test[ix * channels + c] << " at index " << ix << " of channel " << c << ")" << endl;