[webkit-changes] [WebKit/WebKit] f35686: Web Audio glitches when hardware buffer size is no...
mwyrzykowski
noreply at github.com
Wed Aug 9 17:11:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f35686d638221a75d5450d3251031dce9a9a8192
https://github.com/WebKit/WebKit/commit/f35686d638221a75d5450d3251031dce9a9a8192
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2023-08-09 (Wed, 09 Aug 2023)
Changed paths:
M Source/WebKit/GPUProcess/media/RemoteAudioDestinationManager.cpp
M Source/WebKit/GPUProcess/media/RemoteAudioDestinationManager.h
M Source/WebKit/GPUProcess/media/RemoteAudioDestinationManager.messages.in
M Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp
M Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h
Log Message:
-----------
Web Audio glitches when hardware buffer size is not divisible by 128
https://bugs.webkit.org/show_bug.cgi?id=259899
<radar://112621241>
Reviewed by Chris Dumez.
Whenever the buffer size of the hardware was not a multiple of 128, the
audio would not be in sync with the client leading to audible artifacts.
We can fix this by passing the number of frames from AURemoteIO to the
web process and rendering all of the frames that AURemoteIO asked us to render.
* Source/WebKit/GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestinationManager::createAudioDestination):
Create a shared memory member variable which we can write the frame count from
AURemoteUI to.
* Source/WebKit/GPUProcess/media/RemoteAudioDestinationManager.h:
Update member function parameters.
* Source/WebKit/GPUProcess/media/RemoteAudioDestinationManager.messages.in:
Pass the shared memory handle to the web process.
* Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::startRenderingThread):
Get the number of frames to render from the shared memory with the GPU process.
(WebKit::RemoteAudioDestinationProxy::connection):
Create the shared memory handle in the web process and pass it to the GPU process.
We could create it the other way around, but it would require adding another IPC
message, which seems uncessary for this purpose.
* Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
Add shared memory member variable.
Canonical link: https://commits.webkit.org/266747@main
More information about the webkit-changes
mailing list