RESOLVED FIXED 224672
Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
https://bugs.webkit.org/show_bug.cgi?id=224672
Summary Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
youenn fablet
Reported 2021-04-16 07:09:06 PDT
Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
Attachments
Patch (3.06 KB, patch)
2021-04-16 07:27 PDT, youenn fablet
no flags
Patch for landing (3.73 KB, patch)
2021-04-19 02:52 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2021-04-16 07:27:17 PDT
Eric Carlson
Comment 2 2021-04-16 18:02:57 PDT
Comment on attachment 426223 [details] 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)`
youenn fablet
Comment 3 2021-04-19 02:49:17 PDT
Comment on attachment 426223 [details] 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? Yes, as of now, codecs usually encode in mono. I guess we could try to improve for stereo in the future. >> Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:76 >> + > > 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)` LibWebRTC initially sends 16KHz data a few times before switching to 48KHz, not sure why. I will remove below sample check.
youenn fablet
Comment 4 2021-04-19 02:52:52 PDT
Created attachment 426403 [details] Patch for landing
EWS
Comment 5 2021-04-19 03:29:04 PDT
Committed r276245 (236727@main): <https://commits.webkit.org/236727@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426403 [details].
Radar WebKit Bug Importer
Comment 6 2021-04-24 15:05:17 PDT
Note You need to log in before you can comment on or make changes to this bug.