[webkit-reviews] review granted: [Bug 209969] Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData : [Attachment 395554] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 6 09:25:38 PDT 2020


Eric Carlson <eric.carlson at apple.com> has granted  review:
Bug 209969: Remove unnecessary memory allocation from
RealtimeIncomingAudioSourceCocoa::OnData
https://bugs.webkit.org/show_bug.cgi?id=209969

Attachment 395554: Patch

https://bugs.webkit.org/attachment.cgi?id=395554&action=review




--- Comment #2 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 395554
  --> https://bugs.webkit.org/attachment.cgi?id=395554
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395554&action=review

> Source/WebCore/ChangeLog:9
> +	   Create a WebAudioBufferList once (without any buffer allocation) and
set the audio buffer pointer

s/Create/create/

>
Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:81
> +    if (!m_audioBufferList || m_sampleRate != sampleRate ||
m_numberOfChannels != numberOfChannels) {
> +	   m_streamDescription = streamDescription(sampleRate,
numberOfChannels);
> +	   m_audioBufferList =
makeUnique<WebAudioBufferList>(m_streamDescription);
> +    }

Don't you need to set m_sampleRate and m_numberOfChannels?


More information about the webkit-reviews mailing list