RESOLVED FIXED 209969
Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData
https://bugs.webkit.org/show_bug.cgi?id=209969
Summary Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::O...
youenn fablet
Reported 2020-04-03 08:56:05 PDT
Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData
Attachments
Patch (5.01 KB, patch)
2020-04-06 01:28 PDT, youenn fablet
no flags
Patch for landing (5.52 KB, patch)
2020-04-07 01:46 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-04-06 01:28:16 PDT
Eric Carlson
Comment 2 2020-04-06 09:25:38 PDT
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?
youenn fablet
Comment 3 2020-04-06 12:57:22 PDT
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.
youenn fablet
Comment 4 2020-04-07 01:46:19 PDT
Created attachment 395663 [details] Patch for landing
EWS
Comment 5 2020-04-07 04:14:06 PDT
Committed r259632: <https://trac.webkit.org/changeset/259632> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395663 [details].
Radar WebKit Bug Importer
Comment 6 2020-04-07 04:15:15 PDT
Note You need to log in before you can comment on or make changes to this bug.