Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit c4b44c8

Browse files
committed
Bug 1694085 - Smooth the FFT analysis to make the test more robust.
Differential Revision: https://phabricator.services.mozilla.com/D129145
1 parent 19f9516 commit c4b44c8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

dom/media/mediasource/test/test_HEAAC_extradata.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
await ac.resume();
3434
const mediaElementSource = ac.createMediaElementSource(element);
3535
const analyser = new AnalyserNode(ac);
36-
analyser.smoothingTimeConstant = 0.0;
3736

3837
// Undo the volume scaling applied globally during test. This is fine because
3938
// the audio isn't routed to an actual audio output device in this test, it's
@@ -55,7 +54,7 @@
5554
analyser.getFloatFrequencyData(spectrum);
5655
const indexFor15kHz =
5756
binIndexForFrequency(15000, analyser.fftSize, ac.sampleRate);
58-
ok(spectrum[indexFor15kHz] > -50,
57+
ok(spectrum[indexFor15kHz] > -60,
5958
`Energy present at 15kHz (bin index: ${indexFor15kHz}) when playing white
6059
noise encoded in HE-AAC ${spectrum[indexFor15kHz]}`);
6160
}

0 commit comments

Comments
 (0)