You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AnalyserNode's getByteFrequencyData() / getFloatFrequencyData() should only do FFT analysis once per render quantum
https://bugs.webkit.org/show_bug.cgi?id=216735
Reviewed by Darin Adler.
Source/WebCore:
AnalyserNode's getByteFrequencyData() / getFloatFrequencyData() should only do FFT analysis once per render quantum:
- https://www.w3.org/TR/webaudio/#dom-analysernode-getbytefrequencydata
"""
If another call to getByteFrequencyData() or getFloatFrequencyData() occurs within the same render quantum as a
previous call, the current frequency data is not updated with the same data. Instead, the previously computed data
is returned.
"""
No new tests, rebaselined existing test.
* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::writeInput):
(WebCore::RealtimeAnalyser::doFFTAnalysisIfNecessary):
(WebCore::RealtimeAnalyser::getFloatFrequencyData):
(WebCore::RealtimeAnalyser::getByteFrequencyData):
* Modules/webaudio/RealtimeAnalyser.h:
LayoutTests:
Rebaseline webaudio tests now that more checks are passing.
* webaudio/Analyser/realtimeanalyser-freq-data-smoothing-expected.txt:
* webaudio/Analyser/realtimeanalyser-multiple-calls-expected.txt:
Canonical link: https://commits.webkit.org/229568@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Copy file name to clipboardExpand all lines: LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data-smoothing-expected.txt
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -17,39 +17,39 @@ FAIL X First 512-point FFT at frame 512 does not equal [-100,-100,-96.0621261596
17
17
assert_true: expected true got false
18
18
FAIL X 512-point byte FFT does not equal [0,0,14,28,43,209,255,255,252,186,37,53,197,242,250,225...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
19
19
Index Actual Expected AbsError RelError Test threshold
Max AbsError of 2.2000000000000000e+1 at index of 2.
27
+
Max RelError of Infinity at index of 1.
28
28
assert_true: expected true got false
29
29
FAIL X Smoothed 512-point FFT at frame 1536 does not equal [-94.55278778076172,-93.13629150390625,-90.07610321044922,-87.21340942382812,-85.55162048339844,-38.930355072021484,-24.825944900512695,-21.471542358398438,-27.15943145751953,-45.10898971557617,-87.53993225097656,-78.7408447265625,-42.376895904541016,-29.92169761657715,-27.697038650512695,-34.60657501220703...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0.000025332}.
30
30
Index Actual Expected AbsError RelError Test threshold
FAIL X 512-point byte FFT does not equal [19,25,36,46,52,222,255,255,255,199,45,77,209,255,255,238...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
43
43
Index Actual Expected AbsError RelError Test threshold
FAIL X Second call to getFloatFrequencyData expected to be equal to the array [-52.5184440612793,-35.278839111328125,-27.40174102783203,-29.20952796936035,-35.99977493286133,-33.581512451171875,-40.76682662963867,-36.675636291503906,-41.62258529663086,-40.120052337646484,-41.18754959106445,-44.266780853271484,-41.43907165527344,-47.687599182128906,-42.71406173706055,-47.281829833984375...] but differs in 128 places:
7
-
Index Actual Expected
8
-
[0] -4.7412990570068359e+1 -5.2518444061279297e+1
9
-
[1] -3.0173389434814453e+1 -3.5278839111328125e+1
10
-
[2] -2.2296291351318359e+1 -2.7401741027832031e+1
11
-
[3] -2.4104078292846680e+1 -2.9209527969360352e+1
12
-
...and 124 more errors. assert_true: expected true got false
13
-
FAIL X Second call to getByteFrequencyData expected to be equal to the array [199,255,255,255,255,255,252,255,246,248,244,236,242,226,237,225...] but differs in 114 places:
14
-
Index Actual Expected
15
-
[0] 2.0500000000000000e+2 1.9900000000000000e+2
16
-
[6] 2.5500000000000000e+2 2.5200000000000000e+2
17
-
[8] 2.5400000000000000e+2 2.4600000000000000e+2
18
-
[9] 2.5500000000000000e+2 2.4800000000000000e+2
19
-
...and 110 more errors. assert_true: expected true got false
20
-
FAIL X Output of getByteFrequencyData after getFloatFrequencyData expected to be equal to the array [195,255,255,255,255,255,255,255,255,255,255,255,255,248,252,245...] but differs in 110 places:
21
-
Index Actual Expected
22
-
[0] 2.0000000000000000e+2 1.9500000000000000e+2
23
-
[11] 2.5000000000000000e+2 2.5500000000000000e+2
24
-
[12] 2.5300000000000000e+2 2.5500000000000000e+2
25
-
[13] 2.4300000000000000e+2 2.4800000000000000e+2
26
-
...and 106 more errors. assert_true: expected true got false
27
-
FAIL X Output of getFloatFrequenycData (converted to byte) after getByteFrequencyData expected to be equal to the array [209,255,255,255,255,255,255,255,255,255,255,255,255,251,255,248...] but differs in 108 places:
28
-
Index Actual Expected
29
-
[0] 2.0300000000000000e+2 2.0900000000000000e+2
30
-
[13] 2.5000000000000000e+2 2.5100000000000000e+2
31
-
[14] 2.5400000000000000e+2 2.5500000000000000e+2
32
-
[15] 2.4700000000000000e+2 2.4800000000000000e+2
33
-
...and 104 more errors. assert_true: expected true got false
34
-
FAIL < [test] 4 out of 4 assertions were failed. assert_true: expected true got false
35
-
FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false
6
+
PASS Second call to getFloatFrequencyData is identical to the array [expected array].
7
+
PASS Second call to getByteFrequencyData is identical to the array [189,254,255,255,255,255,245,250,238,239,236,228,233,219,228,218...].
8
+
PASS Output of getByteFrequencyData after getFloatFrequencyData is identical to the array [185,255,255,255,255,255,255,255,251,250,247,241,243,234,238,231...].
9
+
PASS Output of getFloatFrequenycData (converted to byte) after getByteFrequencyData is identical to the array [198,255,255,255,255,255,255,255,255,255,253,247,249,239,244,237...].
10
+
PASS < [test] All assertions passed. (total 4 assertions)
11
+
PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
0 commit comments