mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=938450 test lengths of decoded audio and change 48k wav files to 48k f=padenot
New wave files differ from those generated from ogg files using sox 14.4.1 and libvorbis 1.3.3 by being one quantum less on about half of the samples. --HG-- extra : transplant_source : B%27%8F%2B%40%22%C5%25%0CS%22%28%40%C0%C3%0EM%87%87%A7
This commit is contained in:
parent
9a16789950
commit
29b88874bc
@ -149,8 +149,8 @@ var files = [
|
||||
frames: 33297,
|
||||
sampleRate: 48000,
|
||||
duration: 0.693,
|
||||
fuzzTolerance: 7,
|
||||
fuzzToleranceMobile: 7070
|
||||
fuzzTolerance: 3,
|
||||
fuzzToleranceMobile: 1388
|
||||
},
|
||||
// An ogg file, 48khz, stereo
|
||||
{
|
||||
@ -161,8 +161,8 @@ var files = [
|
||||
frames: 33297,
|
||||
sampleRate: 48000,
|
||||
duration: 0.693,
|
||||
fuzzTolerance: 12,
|
||||
fuzzToleranceMobile: 13982
|
||||
fuzzTolerance: 14,
|
||||
fuzzToleranceMobile: 2752
|
||||
},
|
||||
// Make sure decoding a wave file results in the same buffer (for both the
|
||||
// resampling and non-resampling cases)
|
||||
@ -239,8 +239,8 @@ function checkAudioBuffer(buffer, test, callback, monoTest) {
|
||||
}
|
||||
is(buffer.sampleRate, cx.sampleRate, "Correct sample rate");
|
||||
// Take into account the resampling when checking the size
|
||||
var SRCRate = test.sampleRate / cx.sampleRate;
|
||||
ok(Math.abs(buffer.length * SRCRate - test.frames) < test.frames * 0.01, "Correct length");
|
||||
var expectedLength = test.frames * cx.sampleRate / test.sampleRate;
|
||||
ok(Math.abs(buffer.length - expectedLength) < 1.0, "Correct length", "got " + buffer.length + ", expected about " + expectedLength);
|
||||
|
||||
var wave = createWaveFileData(buffer);
|
||||
|
||||
@ -272,7 +272,7 @@ function runTest(test, callback) {
|
||||
}, false);
|
||||
}, function onFailure() {
|
||||
ok(expectCallback, "Failure callback should fire asynchronously");
|
||||
ok(!test.valid, "Did not expect failure for test " + test.url);
|
||||
ok(!test.valid, "Did expect failure for test " + test.url);
|
||||
callback();
|
||||
});
|
||||
expectCallback = true;
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user