Bug 243651

Summary: Audio pitch changes on enabling / disabling the mic capture
Product: WebKit Reporter: asanand
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: vfarley, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   

Description asanand 2022-08-07 23:28:35 PDT
a) Open https://ashishanand26cs.github.io/lowvolume on safari
b) Press "Start" button. Audio tone will play
c) Press "MicAccess" button.
Tone stops playing while system prompt dialog is on screen. Tap "Allow" on prompt.
Tone plays for a brief moment, then stops again.  Then starts playing at a higher pitch and then after some time tone pitch becomes lower again
d) Press "MicAccessStop" button. Mic capture will stop. Tone pitch changes again
There is a noticeable "mechanical" distortion also from the iPhone's speakers.
Comment 1 Radar WebKit Bug Importer 2022-08-14 23:29:15 PDT
<rdar://problem/98655838>
Comment 2 youenn fablet 2022-08-22 00:17:47 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3523
Comment 3 youenn fablet 2022-08-22 05:09:24 PDT
With this patch, macOS is fine but iOS still deserves improvements.
Comment 4 youenn fablet 2022-08-22 05:19:05 PDT
On iOS, the remote IO that renders audio is being stopped/started twice before the VPIO unit is running:
- when category is changed to PlayAndRecord: AVAudioSessionRouteChangeReasonCategoryChange, maybe due to UIProcess listing devices
- when starting capture in GPUProcess, around the time of AVAudioSessionRouteChangeReasonOverride
Comment 5 EWS 2022-08-23 00:47:22 PDT
Committed 253673@main (65ae54bdedbb): <https://commits.webkit.org/253673@main>

Reviewed commits have been landed. Closing PR #3523 and removing active labels.
Comment 6 asanand 2022-08-23 01:37:30 PDT
(In reply to youenn fablet from comment #4)
> On iOS, the remote IO that renders audio is being stopped/started twice
> before the VPIO unit is running:
> - when category is changed to PlayAndRecord:
> AVAudioSessionRouteChangeReasonCategoryChange, maybe due to UIProcess
> listing devices
> - when starting capture in GPUProcess, around the time of
> AVAudioSessionRouteChangeReasonOverride

In which version of iOS will this change be available ?