comparison data/fileio/test/AudioFileReaderTest.h @ 1598:d2555df635ec bqaudiostream

Adjust limits for Opus test
author Chris Cannam
date Wed, 23 Jan 2019 10:31:40 +0000
parents 48e9f538e6e9
children 6d9881e59cc2
comparison
equal deleted inserted replaced
1597:ae9849c0815f 1598:d2555df635ec
96 // actually further from the original if normalised 96 // actually further from the original if normalised
97 97
98 maxLimit = 0.1; 98 maxLimit = 0.1;
99 rmsLimit = 0.03; 99 rmsLimit = 0.03;
100 100
101 } else if (format == "opus") {
102
103 maxLimit = 0.06;
104 rmsLimit = 0.015;
105
101 } else if (format == "aac") { 106 } else if (format == "aac") {
102 107
103 // Terrible performance for this test, load of spill 108 // Terrible performance for this test, load of spill
104 // from one channel to the other. I guess they know 109 // from one channel to the other. I guess they know
105 // what they're doing, it's perceptual after all, but 110 // what they're doing, it's perceptual after all, but
145 150
146 if (format == "ogg") { 151 if (format == "ogg") {
147 152
148 maxLimit = 0.06; 153 maxLimit = 0.06;
149 rmsLimit = 0.03; 154 rmsLimit = 0.03;
155
156 } else if (format == "opus") {
157
158 maxLimit = 0.06;
159 rmsLimit = 0.015;
150 160
151 } else if (format == "aac") { 161 } else if (format == "aac") {
152 162
153 maxLimit = 0.1; 163 maxLimit = 0.1;
154 rmsLimit = 0.1; 164 rmsLimit = 0.1;
293 303
294 sv_frame_t read = test.size() / channels; 304 sv_frame_t read = test.size() / channels;
295 305
296 bool perceptual = (extension == "mp3" || 306 bool perceptual = (extension == "mp3" ||
297 extension == "aac" || 307 extension == "aac" ||
298 extension == "m4a"); 308 extension == "m4a" ||
309 extension == "opus");
299 310
300 if (perceptual && !gapless) { 311 if (perceptual && !gapless) {
301 // allow silence at start and end 312 // allow silence at start and end
302 QVERIFY(read >= refFrames); 313 QVERIFY(read >= refFrames);
303 } else { 314 } else {