Changeset 252960 in webkit
- Timestamp:
- Nov 30, 2019 11:07:31 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252957 r252960 1 2019-11-30 youenn fablet <youenn@apple.com> 2 3 Update RealtimeOutgoingAudioSourceCocoa::m_writeCount when sampleRate changes 4 https://bugs.webkit.org/show_bug.cgi?id=204606 5 6 Reviewed by Eric Carlson. 7 8 * webrtc/audio-samplerate-change-expected.txt: Added. 9 * webrtc/audio-samplerate-change.html: Added. 10 1 11 2019-11-30 Antoine Quint <graouts@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r252959 r252960 1 2019-11-30 youenn fablet <youenn@apple.com> 2 3 Update RealtimeOutgoingAudioSourceCocoa::m_writeCount when sampleRate changes 4 https://bugs.webkit.org/show_bug.cgi?id=204606 5 6 Reviewed by Eric Carlson. 7 8 Update m_writeCount to make sure our high/low buffer computation is done right. 9 10 Test: webrtc/audio-samplerate-change.html 11 12 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp: 13 (WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable): 14 1 15 2019-11-30 Antti Koivisto <antti@apple.com> 2 16 -
trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp
r247522 r252960 92 92 { 93 93 if (m_inputStreamDescription != streamDescription) { 94 if (m_writeCount && m_inputStreamDescription.sampleRate()) { 95 // Update m_writeCount to be valid according the new sampleRate. 96 m_writeCount = (m_writeCount * streamDescription.sampleRate()) / m_inputStreamDescription.sampleRate(); 97 } 98 94 99 m_inputStreamDescription = toCAAudioStreamDescription(streamDescription); 95 100 auto status = m_sampleConverter->setInputFormat(m_inputStreamDescription); … … 111 116 } 112 117 113 // If we change the audio track or its sample rate changes, the timestamp based on m_writeCount may be wrong.114 // FIXME: We should update m_writeCount to be valid according the new sampleRate.115 118 m_sampleConverter->pushSamples(MediaTime(m_writeCount, static_cast<uint32_t>(m_inputStreamDescription.sampleRate())), audioData, sampleCount); 116 119 m_writeCount += sampleCount;
Note: See TracChangeset
for help on using the changeset viewer.