Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 08ffa75952b7294029da4efd21197d6b697623ca
https://github.com/WebKit/WebKit/commit/08ffa75952b7294029da4efd21197d6b697623ca
Author: Jer Noble <[email protected]>
Date: 2026-03-27 (Fri, 27 Mar 2026)
Changed paths:
A
LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-playbackrate-expected.txt
A
LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-playbackrate.html
M Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp
M Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.h
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Log Message:
-----------
tHTMLMediaElement preservesPitch=false and playbackRate aren't correctly
handled when hooked up to AudioContext
rdar://93275149
https://bugs.webkit.org/show_bug.cgi?id=240405
Reviewed by Andy Estes.
Use the existing MultiChannelResampler in MediaElementAudioSourceNode to
perform a sample rate
conversion when the playback rate of the attached HTMLMediaElement is non-1x.
Additionally, have
the media element notify the audio node when the reported rate changes.
Test:
webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-playbackrate.html
* Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
(WebCore::MediaElementAudioSourceNode::setFormat):
(WebCore::MediaElementAudioSourceNode::setPlaybackRate):
(WebCore::MediaElementAudioSourceNode::updateResamplerIfNeeded):
(WebCore::MediaElementAudioSourceNode::process):
* Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.h:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
* Source/WebCore/html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::reportedPlaybackRate const):
Canonical link: https://commits.webkit.org/310098@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications