Summary: | Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||
Component: | WebRTC | Assignee: | youenn fablet <youennf> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
youenn fablet
2020-04-03 08:56:05 PDT
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]. |