WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
274507
REGRESSION (iPadOS 17.5): Audio distortion occurs when using AudioContext with a sample rate of 44100Hz and an AudioWorklet
https://bugs.webkit.org/show_bug.cgi?id=274507
Summary
REGRESSION (iPadOS 17.5): Audio distortion occurs when using AudioContext wit...
tamaru
Reported
2024-05-22 00:19:23 PDT
Created
attachment 471468
[details]
A video sample demonstrating the distortion and the source code of the demo page There is a bug in Safari on iPadOS 17.5.1 where audio becomes distorted when an AudioContext is created with a sample rate of 44100Hz, and an AudioWorklet is used within that context. This distortion affects any audio played within the AudioContext, regardless of whether the audio is processed by the AudioWorklet. Steps to Reproduce: 1. Create a new AudioContext with a sample rate of 44100Hz. const ctx = new (window.AudioContext || window.webkitAudioContext)({ sampleRate: 44100 }); 2. Add an AudioWorklet module to the AudioContext. 3. Play any audio through the AudioContext. const playSound = () => { const oscillator = ctx.createOscillator(); oscillator.connect(ctx.destination); oscillator.start(); } ctx.audioWorklet.addModule("AudioWorkletProcessor.js").then(() => { playSound(); }) Expected Results: The audio should play without distortion. Actual Results: The audio is distorted when played through the AudioContext. Additional Information: -This issue does not occur on iPadOS 17.4.1 but is present on iPadOS 17.5.1. -The device model used for testing is iPad Air (5th generation). -The distortion occurs regardless of the specific operations performed within the AudioWorklet. The distortion occurs even if no AudioWorkletNode is created. -The issue is reproducible almost every time under the given conditions. However, reloading or reopening the Safari tab can change whether the distortion occurs, even with the same code. -The audio sometimes becomes distorted just by adding an AudioWorklet, even without specifying a sample rate at 44100Hz. This distortion always occurs when first opening a new tab without reloading. -A demo web page has been created to reproduce this bug. The URL is
https://safari-44100hz-audioworklet-bug-demo.netlify.app/
-A video sample demonstrating the distortion and the source code of the demo page are attached for reference.
Attachments
A video sample demonstrating the distortion and the source code of the demo page
(547.75 KB, application/x-zip-compressed)
2024-05-22 00:19 PDT
,
tamaru
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-05-22 10:53:51 PDT
<
rdar://problem/128551401
>
Jer Noble
Comment 2
2024-05-22 11:29:16 PDT
I can reproduce the behavior on macOS as well as iPadOS. This may have regressed via
275262@main
, which introduced ShareAudioDestination.
Jean-Yves Avenard [:jya]
Comment 3
2024-05-24 06:25:58 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/29048
Jer Noble
Comment 4
2024-05-28 14:52:23 PDT
***
Bug 274647
has been marked as a duplicate of this bug. ***
EWS
Comment 5
2024-05-28 16:28:52 PDT
Committed
279409@main
(d72323075072): <
https://commits.webkit.org/279409@main
> Reviewed commits have been landed. Closing PR #29048 and removing active labels.
EWS
Comment 6
2024-05-31 09:18:18 PDT
Committed
272448.1053@safari-7618-branch
(01cc3500a26e): <
https://commits.webkit.org/272448.1053@safari-7618-branch
> Reviewed commits have been landed. Closing PR #1311 and removing active labels.
Alexey Proskuryakov
Comment 7
2024-06-24 09:02:40 PDT
***
Bug 275726
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 8
2024-06-25 08:52:04 PDT
***
Bug 275801
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug