Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData
Created attachment 395554 [details] Patch
Comment on attachment 395554 [details] 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?
Comment on attachment 395554 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395554&action=review > Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:71 > + ALWAYS_LOG_IF(loggerPtr() && !(++m_chunksReceived % 200), LOGIDENTIFIER, "chunk ", m_chunksReceived); Will also dispatch that logging to the main thread since that might disrupt the audio pipeline otherwise.
Created attachment 395663 [details] Patch for landing
Committed r259632: <https://trac.webkit.org/changeset/259632> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395663 [details].
<rdar://problem/61387440>