Title: [266219] trunk
Revision
266219
Author
[email protected]
Date
2020-08-26 20:43:34 -0700 (Wed, 26 Aug 2020)

Log Message

Update DynamicsCompressorNode::process() to use AudioParam::finalValue()
https://bugs.webkit.org/show_bug.cgi?id=215874

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT test now that more checks are passing.

* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt:

Source/WebCore:

Update DynamicsCompressorNode::process() to use AudioParam::finalValue(). All of DynamicsCompressorNode
use k-rate (in fixed mode) so we should be using AudioParam::finalValue() unconditionally.

No new tests, rebaselined existing test.

* Modules/webaudio/DynamicsCompressorNode.cpp:
(WebCore::DynamicsCompressorNode::process):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266218 => 266219)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-08-27 03:35:18 UTC (rev 266218)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-08-27 03:43:34 UTC (rev 266219)
@@ -1,3 +1,14 @@
+2020-08-26  Chris Dumez  <[email protected]>
+
+        Update DynamicsCompressorNode::process() to use AudioParam::finalValue()
+        https://bugs.webkit.org/show_bug.cgi?id=215874
+
+        Reviewed by Darin Adler.
+
+        Rebaseline WPT test now that more checks are passing.
+
+        * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt:
+
 2020-08-26  Ryan Haddad  <[email protected]>
 
         Unreviewed, reverting r266200.

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt (266218 => 266219)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt	2020-08-27 03:35:18 UTC (rev 266218)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-dynamics-compressor-connections-expected.txt	2020-08-27 03:43:34 UTC (rev 266219)
@@ -15,20 +15,8 @@
 PASS   attack: mod.offset.setValueAtTime(0, 0) did not throw an exception. 
 PASS   attack: mod.offset.linearRampToValueAtTime(1, 0.25) did not throw an exception. 
 PASS   attack: mod.connect(tstNode[attack]) did not throw an exception. 
-FAIL X k-rate attack AudioParam with input does not equal [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
-	Index	Actual			Expected		AbsError		RelError		Test threshold
-	[3552]	-3.1927242875099182e-2	-3.1927388161420822e-2	1.4528632164001465e-7	4.5505232343298940e-6	0.0000000000000000e+0
-	[3553]	-3.0432760715484619e-2	-3.0433313921093941e-2	5.5320560932159424e-7	1.8177632930673261e-5	0.0000000000000000e+0
-	[3554]	-2.5303896516561508e-2	-2.5304509326815605e-2	6.1281025409698486e-7	2.4217432797544102e-5	0.0000000000000000e+0
-	[3555]	-2.1301783621311188e-2	-2.1302459761500359e-2	6.7614018917083740e-7	3.1740005461379454e-5	0.0000000000000000e+0
-	[3556]	-1.8743157386779785e-2	-1.8744025379419327e-2	8.6799263954162598e-7	4.6307696557787933e-5	0.0000000000000000e+0
-	...and 8443 more errors.
-	Max AbsError of 1.2182706594467163e-1 at index of 11905.
-	[11905]	2.3663640022277832e-1	3.5846346616744995e-1	1.2182706594467163e-1	3.3985908591243225e-1	0.0000000000000000e+0
-	Max RelError of 2.5864712210866059e+0 at index of 5197.
-	[5197]	2.7467031031847000e-6	-1.7313286662101746e-6	4.4780317693948746e-6	2.5864712210866059e+0	0.0000000000000000e+0
- assert_true: expected true got false
-FAIL < [attack] 1 out of 9 assertions were failed. assert_true: expected true got false
+PASS   k-rate attack AudioParam with input equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 
+PASS < [attack] All assertions passed. (total 9 assertions) 
 PASS > [knee] Dynamics compressor knee 
 PASS   knee: refNode = new DynamicsCompressorNode(context) did not throw an exception. 
 PASS   knee: tstNode = new DynamicsCompressorNode(context, {"knee":0}) did not throw an exception. 
@@ -38,20 +26,8 @@
 PASS   knee: mod.offset.setValueAtTime(0, 0) did not throw an exception. 
 PASS   knee: mod.offset.linearRampToValueAtTime(40, 0.25) did not throw an exception. 
 PASS   knee: mod.connect(tstNode[knee]) did not throw an exception. 
-FAIL X k-rate knee AudioParam with input does not equal [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
-	Index	Actual			Expected		AbsError		RelError		Test threshold
-	[289]	4.7600879333913326e-3	4.7204997390508652e-3	3.9588194340467453e-5	8.3864413788586108e-3	0.0000000000000000e+0
-	[290]	1.4531426131725311e-2	1.4413412660360336e-2	1.1801347136497498e-4	8.1877535976982597e-3	0.0000000000000000e+0
-	[291]	1.6859998926520348e-2	1.6725307330489159e-2	1.3469159603118896e-4	8.0531611987574581e-3	0.0000000000000000e+0
-	[292]	2.4769283831119537e-2	2.4576477706432343e-2	1.9280612468719482e-4	7.8451488040831886e-3	0.0000000000000000e+0
-	[293]	3.1092880293726921e-2	3.0856588855385780e-2	2.3629143834114075e-4	7.6577303942622259e-3	0.0000000000000000e+0
-	...and 11706 more errors.
-	Max AbsError of 9.3768537044525146e-2 at index of 11905.
-	[11905]	1.4695483446121216e-1	2.4072337150573730e-1	9.3768537044525146e-2	3.8952818107356185e-1	0.0000000000000000e+0
-	Max RelError of 7.1668468997942995e+1 at index of 7597.
-	[7597]	-2.7996115386486053e-4	3.9616134017705917e-6	2.8392276726663113e-4	7.1668468997942995e+1	0.0000000000000000e+0
- assert_true: expected true got false
-FAIL < [knee] 1 out of 9 assertions were failed. assert_true: expected true got false
+PASS   k-rate knee AudioParam with input equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 
+PASS < [knee] All assertions passed. (total 9 assertions) 
 PASS > [ratio] Dynamics compressor ratio 
 PASS   ratio: refNode = new DynamicsCompressorNode(context) did not throw an exception. 
 PASS   ratio: tstNode = new DynamicsCompressorNode(context, {"ratio":1}) did not throw an exception. 
@@ -61,20 +37,8 @@
 PASS   ratio: mod.offset.setValueAtTime(0, 0) did not throw an exception. 
 PASS   ratio: mod.offset.linearRampToValueAtTime(19, 0.25) did not throw an exception. 
 PASS   ratio: mod.connect(tstNode[ratio]) did not throw an exception. 
-FAIL X k-rate ratio AudioParam with input does not equal [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
-	Index	Actual			Expected		AbsError		RelError		Test threshold
-	[289]	2.3430627770721912e-3	2.4788479786366224e-3	1.3578520156443119e-4	5.4777542929080172e-2	0.0000000000000000e+0
-	[290]	7.2183664888143539e-3	7.6366346329450607e-3	4.1826814413070679e-4	5.4771265647077592e-2	0.0000000000000000e+0
-	[291]	8.4270080551505089e-3	8.9152716100215912e-3	4.8826355487108231e-4	5.4767098101893931e-2	0.0000000000000000e+0
-	[292]	1.2498751282691956e-2	1.3222845271229744e-2	7.2409398853778839e-4	5.4760830493363749e-2	0.0000000000000000e+0
-	[293]	1.5824524685740471e-2	1.6741188243031502e-2	9.1666355729103088e-4	5.4754987757370858e-2	0.0000000000000000e+0
-	...and 11706 more errors.
-	Max AbsError of 6.7706638574600220e-1 at index of 11905.
-	[11905]	9.1523957252502441e-1	2.3817318677902222e-1	6.7706638574600220e-1	2.8427481485318764e+0	0.0000000000000000e+0
-	Max RelError of 8.6412680577849119e+2 at index of 10761.
-	[10761]	3.1299889087677002e-4	-3.6263372749090195e-7	3.1336152460426092e-4	8.6412680577849119e+2	0.0000000000000000e+0
- assert_true: expected true got false
-FAIL < [ratio] 1 out of 9 assertions were failed. assert_true: expected true got false
+PASS   k-rate ratio AudioParam with input equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 
+PASS < [ratio] All assertions passed. (total 9 assertions) 
 PASS > [release] Dynamics compressor release 
 PASS   release: refNode = new DynamicsCompressorNode(context) did not throw an exception. 
 PASS   release: tstNode = new DynamicsCompressorNode(context, {"release":0}) did not throw an exception. 
@@ -84,20 +48,8 @@
 PASS   release: mod.offset.setValueAtTime(0, 0) did not throw an exception. 
 PASS   release: mod.offset.linearRampToValueAtTime(1, 0.25) did not throw an exception. 
 PASS   release: mod.connect(tstNode[release]) did not throw an exception. 
-FAIL X k-rate release AudioParam with input does not equal [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
-	Index	Actual			Expected		AbsError		RelError		Test threshold
-	[289]	5.3376271389424801e-3	4.1271108202636242e-3	1.2105163186788559e-3	2.9330841147646547e-1	0.0000000000000000e+0
-	[290]	1.6317982226610184e-2	1.2697115540504456e-2	3.6208666861057281e-3	2.8517238222767810e-1	0.0000000000000000e+0
-	[291]	1.8951904028654099e-2	1.4809282496571541e-2	4.1426215320825577e-3	2.7973141393187723e-1	0.0000000000000000e+0
-	[292]	2.7886869385838509e-2	2.1933156996965408e-2	5.9537123888731003e-3	2.7144803594379208e-1	0.0000000000000000e+0
-	[293]	3.5057999193668365e-2	2.7733284980058670e-2	7.3247142136096954e-3	2.6411275183868249e-1	0.0000000000000000e+0
-	...and 11706 more errors.
-	Max AbsError of 1.2466221153736115e+0 at index of 11471.
-	[11471]	-1.5019645690917969e+0	-2.5534245371818542e-1	1.2466221153736115e+0	4.8821576562018736e+0	0.0000000000000000e+0
-	Max RelError of 1.4548486486486487e+4 at index of 11197.
-	[11197]	-1.2532272376120090e-3	8.6147338151931763e-8	1.2533133849501610e-3	1.4548486486486487e+4	0.0000000000000000e+0
- assert_true: expected true got false
-FAIL < [release] 1 out of 9 assertions were failed. assert_true: expected true got false
+PASS   k-rate release AudioParam with input equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}. 
+PASS < [release] All assertions passed. (total 9 assertions) 
 PASS > [threshold] Dynamics compressor threshold 
 PASS   threshold: refNode = new DynamicsCompressorNode(context) did not throw an exception. 
 PASS   threshold: tstNode = new DynamicsCompressorNode(context, {"threshold":-100}) did not throw an exception. 
@@ -109,17 +61,17 @@
 PASS   threshold: mod.connect(tstNode[threshold]) did not throw an exception. 
 FAIL X k-rate threshold AudioParam with input does not equal [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
 	Index	Actual			Expected		AbsError		RelError		Test threshold
-	[289]	1.1037987424060702e-3	1.0713161900639534e-3	3.2482552342116833e-5	3.0320229119451422e-2	0.0000000000000000e+0
-	[290]	3.3547636121511459e-3	3.2575032673776150e-3	9.7260344773530960e-5	2.9857328386297635e-2	0.0000000000000000e+0
-	[291]	3.8806758821010590e-3	3.7693267222493887e-3	1.1134915985167027e-4	2.9540861818744484e-2	0.0000000000000000e+0
-	[292]	5.6747486814856529e-3	5.5145630612969398e-3	1.6018562018871307e-4	2.9047744745716971e-2	0.0000000000000000e+0
-	[293]	7.0937499403953552e-3	6.8965111859142780e-3	1.9723875448107719e-4	2.8599787510520659e-2	0.0000000000000000e+0
-	...and 11706 more errors.
-	Max AbsError of 3.9762811735272408e-2 at index of 11905.
-	[11905]	1.7836606130003929e-2	5.7599417865276337e-2	3.9762811735272408e-2	6.9033356948635616e-1	0.0000000000000000e+0
-	Max RelError of 8.7561855251401184e+1 at index of 1706.
-	[1706]	-6.3462939579039812e-5	-7.1659451350569725e-7	6.2746345065534115e-5	8.7561855251401184e+1	0.0000000000000000e+0
+	[512]	2.5821279268711805e-3	2.5818899739533663e-3	2.3795291781425476e-7	9.2162299793861248e-5	0.0000000000000000e+0
+	[513]	3.0495987739413977e-3	3.0491708312183619e-3	4.2794272303581238e-7	1.4034724412761702e-4	0.0000000000000000e+0
+	[514]	3.5930690355598927e-3	3.5924615804105997e-3	6.0745514929294586e-7	1.6909162024316400e-4	0.0000000000000000e+0
+	[515]	3.7539361510425806e-3	3.7532504647970200e-3	6.8568624556064606e-7	1.8269131037001784e-4	0.0000000000000000e+0
+	[516]	4.4603729620575905e-3	4.4594961218535900e-3	8.7684020400047302e-7	1.9662315652738236e-4	0.0000000000000000e+0
+	...and 11482 more errors.
+	Max AbsError of 1.6735866665840149e-5 at index of 1323.
+	[1323]	2.1656326949596405e-2	2.1673062816262245e-2	1.6735866665840149e-5	7.7219665756159291e-4	0.0000000000000000e+0
+	Max RelError of 6.6227941484679545e-3 at index of 9997.
+	[9997]	-3.4486583899706602e-6	-3.4716504160314798e-6	2.2992026060819626e-8	6.6227941484679545e-3	0.0000000000000000e+0
  assert_true: expected true got false
 FAIL < [threshold] 1 out of 9 assertions were failed. assert_true: expected true got false
-FAIL # AUDIT TASK RUNNER FINISHED: 5 out of 5 tasks were failed. assert_true: expected true got false
+FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 5 tasks were failed. assert_true: expected true got false
 

Modified: trunk/Source/WebCore/ChangeLog (266218 => 266219)


--- trunk/Source/WebCore/ChangeLog	2020-08-27 03:35:18 UTC (rev 266218)
+++ trunk/Source/WebCore/ChangeLog	2020-08-27 03:43:34 UTC (rev 266219)
@@ -1,3 +1,18 @@
+2020-08-26  Chris Dumez  <[email protected]>
+
+        Update DynamicsCompressorNode::process() to use AudioParam::finalValue()
+        https://bugs.webkit.org/show_bug.cgi?id=215874
+
+        Reviewed by Darin Adler.
+
+        Update DynamicsCompressorNode::process() to use AudioParam::finalValue(). All of DynamicsCompressorNode
+        use k-rate (in fixed mode) so we should be using AudioParam::finalValue() unconditionally.
+
+        No new tests, rebaselined existing test.
+
+        * Modules/webaudio/DynamicsCompressorNode.cpp:
+        (WebCore::DynamicsCompressorNode::process):
+
 2020-08-26  Devin Rousso  <[email protected]>
 
         REGRESSION: touchbar controls don't reflect video state in fullscreen

Modified: trunk/Source/WebCore/Modules/webaudio/DynamicsCompressorNode.cpp (266218 => 266219)


--- trunk/Source/WebCore/Modules/webaudio/DynamicsCompressorNode.cpp	2020-08-27 03:35:18 UTC (rev 266218)
+++ trunk/Source/WebCore/Modules/webaudio/DynamicsCompressorNode.cpp	2020-08-27 03:43:34 UTC (rev 266219)
@@ -86,11 +86,11 @@
     AudioBus* outputBus = output(0)->bus();
     ASSERT(outputBus);
 
-    float threshold = m_threshold->value();
-    float knee = m_knee->value();
-    float ratio = m_ratio->value();
-    float attack = m_attack->value();
-    float release = m_release->value();
+    float threshold = m_threshold->finalValue();
+    float knee = m_knee->finalValue();
+    float ratio = m_ratio->finalValue();
+    float attack = m_attack->finalValue();
+    float release = m_release->finalValue();
 
     m_dynamicsCompressor->setParameterValue(DynamicsCompressor::ParamThreshold, threshold);
     m_dynamicsCompressor->setParameterValue(DynamicsCompressor::ParamKnee, knee);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to