[webkit-reviews] review granted: [Bug 224672] Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer : [Attachment 426223] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 16 18:02:57 PDT 2021


Eric Carlson <eric.carlson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 224672: Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
https://bugs.webkit.org/show_bug.cgi?id=224672

Attachment 426223: Patch

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




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

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

>
Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:66
> +    , m_numberOfChannels(1)

One channel is the most common configuration?

>
Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:76
> +    if (sampleRate != m_sampleRate)
> +	   return;
> +

Why do we bail if the sample rate changes, but not the number of channels?

You can remove the sample rate check in `if (!m_audioBufferList || m_sampleRate
!= sampleRate || m_numberOfChannels != numberOfChannels)`


More information about the webkit-reviews mailing list