Title: [266491] trunk
- Revision
- 266491
- Author
- cdu...@apple.com
- Date
- 2020-09-02 15:07:25 -0700 (Wed, 02 Sep 2020)
Log Message
Fix rounding for DelayDSPKernel's buffer size calculation
https://bugs.webkit.org/show_bug.cgi?id=216091
Reviewed by Geoffrey Garen.
LayoutTests/imported/w3c:
Rebaseline WPT test that is now passing.
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/maxdelay-rounding-expected.txt:
Source/WebCore:
Fix rounding for DelayDSPKernel's buffer size calculation. The DelayNode needs to buffer
|maxDelayTime| sample frames, plus one frame for interpolation. If |maxDelayTime| isn't
an integer, we have to round it up or the buffer would end up one frame short.
No new tests, rebaselined existing test.
* Modules/webaudio/DelayDSPKernel.cpp:
(WebCore::DelayDSPKernel::bufferLengthForDelay const):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266490 => 266491)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-09-02 21:25:25 UTC (rev 266490)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-09-02 22:07:25 UTC (rev 266491)
@@ -1,5 +1,16 @@
2020-09-02 Chris Dumez <cdu...@apple.com>
+ Fix rounding for DelayDSPKernel's buffer size calculation
+ https://bugs.webkit.org/show_bug.cgi?id=216091
+
+ Reviewed by Geoffrey Garen.
+
+ Rebaseline WPT test that is now passing.
+
+ * web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/maxdelay-rounding-expected.txt:
+
+2020-09-02 Chris Dumez <cdu...@apple.com>
+
New AutoParam timeline events should have their startTime adjusted when they are in the past
https://bugs.webkit.org/show_bug.cgi?id=216080
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/maxdelay-rounding-expected.txt (266490 => 266491)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/maxdelay-rounding-expected.txt 2020-09-02 21:25:25 UTC (rev 266490)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/maxdelay-rounding-expected.txt 2020-09-02 22:07:25 UTC (rev 266491)
@@ -3,14 +3,8 @@
PASS Executing "maxdelay-rounding"
PASS Audit report
PASS > [maxdelay-rounding] Test DelayNode when maxDelayTime requires rounding
-FAIL X output[0:44099]: Expected 0 for all values but found 44100 unexpected values:
- Index Actual
- [0] 0.39954185485839844
- [1] 0.39954185485839844
- [2] 0.39954185485839844
- [3] 0.39954185485839844
- ...and 44096 more errors. assert_true: expected true got false
+PASS output[0:44099] contains only the constant 0.
PASS output[44100:] is not constantly 0 (contains 44100 different values).
-FAIL < [maxdelay-rounding] 1 out of 2 assertions were failed. assert_true: expected true got false
-FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false
+PASS < [maxdelay-rounding] All assertions passed. (total 2 assertions)
+PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
Modified: trunk/Source/WebCore/ChangeLog (266490 => 266491)
--- trunk/Source/WebCore/ChangeLog 2020-09-02 21:25:25 UTC (rev 266490)
+++ trunk/Source/WebCore/ChangeLog 2020-09-02 22:07:25 UTC (rev 266491)
@@ -1,3 +1,19 @@
+2020-09-02 Chris Dumez <cdu...@apple.com>
+
+ Fix rounding for DelayDSPKernel's buffer size calculation
+ https://bugs.webkit.org/show_bug.cgi?id=216091
+
+ Reviewed by Geoffrey Garen.
+
+ Fix rounding for DelayDSPKernel's buffer size calculation. The DelayNode needs to buffer
+ |maxDelayTime| sample frames, plus one frame for interpolation. If |maxDelayTime| isn't
+ an integer, we have to round it up or the buffer would end up one frame short.
+
+ No new tests, rebaselined existing test.
+
+ * Modules/webaudio/DelayDSPKernel.cpp:
+ (WebCore::DelayDSPKernel::bufferLengthForDelay const):
+
2020-09-02 Darin Adler <da...@apple.com>
Change Affinity into an enum class
Modified: trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp (266490 => 266491)
--- trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp 2020-09-02 21:25:25 UTC (rev 266490)
+++ trunk/Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp 2020-09-02 22:07:25 UTC (rev 266491)
@@ -81,7 +81,7 @@
{
// Compute the length of the buffer needed to handle a max delay of |maxDelayTime|. One is
// added to handle the case where the actual delay equals the maximum delay.
- return 1 + AudioUtilities::timeToSampleFrame(maxDelayTime, sampleRate);
+ return 1 + AudioUtilities::timeToSampleFrame(maxDelayTime, sampleRate, AudioUtilities::SampleFrameRounding::Up);
}
void DelayDSPKernel::process(const float* source, float* destination, size_t framesToProcess)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes