WebAudio rendering quantum is 15 instead of 128 when the GPU Process is enabled. This generates a lot more IPC unnecessarily, not to mention how WebAudio code expects a rendering quantum of 128 and could potentially do bad things with a lower value.
Created attachment 416025 [details] Patch
Comment on attachment 416025 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416025&action=review > Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:108 > + if (otherProxy.preferredBufferSize() && otherProxy.preferredBufferSize() < preferredBufferSize) Do we need to consider the case that "otherProxy.preferredBufferSize()" returns a different value such as -1 if not set? I mean potentially.
(In reply to Peng Liu from comment #2) > Comment on attachment 416025 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416025&action=review > > > Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:108 > > + if (otherProxy.preferredBufferSize() && otherProxy.preferredBufferSize() < preferredBufferSize) > > Do we need to consider the case that "otherProxy.preferredBufferSize()" > returns a different value such as -1 if not set? I mean potentially. size_t m_preferredBufferSize { 0 }; It is initialized to 0 by default. Also, it is unsigned.
Comment on attachment 416025 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416025&action=review >>> Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:108 >>> + if (otherProxy.preferredBufferSize() && otherProxy.preferredBufferSize() < preferredBufferSize) >> >> Do we need to consider the case that "otherProxy.preferredBufferSize()" returns a different value such as -1 if not set? I mean potentially. > > size_t m_preferredBufferSize { 0 }; > > It is initialized to 0 by default. Also, it is unsigned. Oh that's right! I looked AudioSession::preferredBufferSize() by mistake. :-)
Committed r270705: <https://trac.webkit.org/changeset/270705> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416025 [details].
<rdar://problem/72235555>