[webkit-changes] [WebKit/WebKit] 703601: AudioBufferSourceNode.start with duration fails so...

Chris Dumez noreply at github.com
Mon Jan 23 13:16:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 703601b447f8e4b1b26265e13e5941f4916d3526
      https://github.com/WebKit/WebKit/commit/703601b447f8e4b1b26265e13e5941f4916d3526
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    A LayoutTests/webaudio/audiobuffersource-start-when-in-past-expected.txt
    A LayoutTests/webaudio/audiobuffersource-start-when-in-past.html
    M Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp

  Log Message:
  -----------
  AudioBufferSourceNode.start with duration fails sometimes
https://bugs.webkit.org/show_bug.cgi?id=248658
rdar://103178030

Reviewed by Eric Carlson and Jer Noble.

Per the specification [1], if you call AudioBufferNode.start() with a `when`
value that is less than the AudioContext's currentTime, it should start
immediately.

Previously, we were missing this logic, causing the AudioBufferNode to not
start if the `when` value was in the past.

[1] https://webaudio.github.io/web-audio-api/#dom-audiobuffersourcenode-start-when-offset-duration-when

* LayoutTests/webaudio/audiobuffersource-start-when-in-past-expected.txt: Added.
* LayoutTests/webaudio/audiobuffersource-start-when-in-past.html: Added.
* Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startPlaying):

Canonical link: https://commits.webkit.org/259234@main




More information about the webkit-changes mailing list