Closed Bug 2034270 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 59420 - Fix bug in AudioBufferSourceNode with empty buffer

Categories

(Core :: Web Audio, task, P4)

task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 59420 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/59420
Details from upstream follow.

Mahesh Bharadwaj Kannan <kmaheshb@google.com> wrote:

Fix bug in AudioBufferSourceNode with empty buffer

This change addresses a bug in AudioBufferSourceNode that is
triggered by not attaching a source buffer but calling the start()
method on the node. According to the spec, the process() should
return immediately and this change ensures compliance with the spec.

Bug: 489001123
Change-Id: I4f326a18ad0faf85647656501fcecbc61be448a3
Reviewed-on: https://chromium-review.googlesource.com/7635543
WPT-Export-Revision: 8cfccded914b938b39daed5d2b477b268f338ca9

Component: web-platform-tests → Web Audio
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 22 tests and 51 subtests

Status Summary

Firefox

OK : 1[GitHub] 21[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 269
FAIL: 1[GitHub] 21[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html [wpt.fyi]: SKIP
  • /webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-playbackrate-zero.html [wpt.fyi]
    • Synthesize and verify sample-and-hold behavior when playbackRate is set to zero halfway: FAIL
    • Subsample start with playbackRate 0 should produce sample-and-hold from exact start frame: FAIL
  • /webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start-null-buffer.html [wpt.fyi]
    • start() with null buffer fires ended event immediately and ignores subsequent buffer assignment: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiosource-time-limits.html [wpt.fyi]
    • buffersource: huge stop time: FAIL
    • oscillator: huge stop time: FAIL
  • /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html [wpt.fyi]
    • X output0[0:33]: Expected 0 for all values but found 1 unexpected values:
      Index Actual
      [33] 1: FAIL
    • X output0[34:8190] does not equal [1.899999976158142,2.9000000953674316,3.9000000953674316,4.900000095367432,5.900000095367432,6.900000095367432,7.900000095367432,8.899999618530273,9.899999618530273,10.899999618530273,11.899999618530273,12.899999618530273,13.899999618530273,14.899999618530273,15.899999618530273,16.899999618530273...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
      Index Actual Expected AbsError RelError Test threshold
      [0] 2.0000000000000000e+0 1.8999999761581421e+0 1.0000002384185791e-1 5.2631592156154129e-2 0.0000000000000000e+0
      [1] 3.0000000000000000e+0 2.9000000953674316e+0 9.9999904632568359e-2 3.4482724601392921e-2 0.0000000000000000e+0
      [2] 4.0000000000000000e+0 3.9000000953674316e+0 9.9999904632568359e-2 2.5641000560833845e-2 0.0000000000000000e+0
      [3] 5.0000000000000000e+0 4.9000000953674316e+0 9.9999904632568359e-2 2.0408143405366560e-2 0.0000000000000000e+0
      [4] 6.0000000000000000e+0 5.9000000953674316e+0 9.9999904632568359e-2 1.6949136104436064e-2 0.0000000000000000e+0
      ...and 8152 more errors.
      Max AbsError of 1.0009765625000000e-1 at index of 2047.
      [2047] 2.0490000000000000e+3 2.0488999023437500e+3 1.0009765625000000e-1 4.8854341852180105e-5 0.0000000000000000e+0
      Max RelError of 5.2631592156154129e-2 at index of 0.
      : FAIL
    • X output1[34:8190] does not equal [1.100000023841858,2.0999999046325684,3.0999999046325684,4.099999904632568,5.099999904632568,6.099999904632568,7.099999904632568,8.100000381469727,9.100000381469727,10.100000381469727,11.100000381469727,12.100000381469727,13.100000381469727,14.100000381469727,15.100000381469727,16.100000381469727...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
      Index Actual Expected AbsError RelError Test threshold
      [0] 1.0000000000000000e+0 1.1000000238418579e+0 1.0000002384185791e-1 9.0909110613105290e-2 0.0000000000000000e+0
      [1] 2.0000000000000000e+0 2.0999999046325684e+0 9.9999904632568359e-2 4.7619004368509764e-2 0.0000000000000000e+0
      [2] 3.0000000000000000e+0 3.0999999046325684e+0 9.9999904632568359e-2 3.2258034744817511e-2 0.0000000000000000e+0
      [3] 4.0000000000000000e+0 4.0999999046325684e+0 9.9999904632568359e-2 2.4390221209414906e-2 0.0000000000000000e+0
      [4] 5.0000000000000000e+0 5.0999999046325684e+0 9.9999904632568359e-2 1.9607824804414951e-2 0.0000000000000000e+0
      ...and 8152 more errors.
      Max AbsError of 1.0009765625000000e-1 at index of 2047.
      [2047] 2.0480000000000000e+3 2.0481000976562500e+3 1.0009765625000000e-1 4.8873419987893697e-5 0.0000000000000000e+0
      Max RelError of 9.0909110613105290e-2 at index of 0.
      : FAIL
    • < [sub-sample accurate start] 3 out of 6 assertions were failed.: FAIL
    • X output1[33] should not be equal to 0. Got 0.: FAIL
    • < [sub-sample accurate stop] 1 out of 9 assertions were failed.: FAIL
    • X output0 expected to be equal to the array [0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1...] but differs in 2 places:
      Index Actual Expected
      [3] 1.0000000000000000e+0 0.0000000000000000e+0
      [37] 0.0000000000000000e+0 1.0000000000000000e+0: FAIL
    • X output0[3] is not equal to 0. Got 1.: FAIL
    • X output0[37] should not be equal to 0. Got 0.: FAIL
    • < [sub-sample-grain] 3 out of 16 assertions were failed.: FAIL
    • X With playbackRate 0.25: output0[17] is not equal to 0. Got 0.6892558932304382.: FAIL
    • X With playbackRate 0.25: output0[18] is not close to 1.0499999999999998 within a relative error of 4.542e-8 (RelErr=0.07462642306373217). Got 0.971642255783081.: FAIL
    • X With playbackRate 4: output1[17] is not equal to 0. Got -0.09868232905864716.: FAIL
    • X With playbackRate 4: output1[18] is not close to 1.7999999999999972 within a relative error of 4.542e-8 (RelErr=0.05661286248101295). Got 1.9019031524658203.: FAIL
    • < [sub-sample accurate start with playbackRate] 4 out of 5 assertions were failed.: FAIL
    • AUDIT TASK RUNNER FINISHED: 4 out of 4 tasks were failed.: FAIL

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
You need to log in before you can comment on or make changes to this bug.