Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: content/renderer/media/webrtc_audio_renderer.cc

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_renderer.cc
diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc
index a36914a4e386f96066de345ce80c0727799ee79f..9714b237abb44442f927dc712cb4b43f9362bf0b 100644
--- a/content/renderer/media/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc_audio_renderer.cc
@@ -418,7 +418,8 @@ media::OutputDeviceStatus WebRtcAudioRenderer::GetDeviceStatus() {
}
int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus,
- int audio_delay_milliseconds) {
+ uint32_t audio_delay_milliseconds,
+ uint32_t frames_skipped) {
DCHECK(audio_renderer_thread_checker_.CalledOnValidThread());
base::AutoLock auto_lock(lock_);
if (!source_)
@@ -427,7 +428,8 @@ int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus,
DVLOG(2) << "WebRtcAudioRenderer::Render()";
DVLOG(2) << "audio_delay_milliseconds: " << audio_delay_milliseconds;
- audio_delay_milliseconds_ = audio_delay_milliseconds;
+ DCHECK_LE(audio_delay_milliseconds, static_cast<uint32_t>(INT_MAX));
+ audio_delay_milliseconds_ = static_cast<int>(audio_delay_milliseconds);
if (audio_fifo_)
audio_fifo_->Consume(audio_bus, audio_bus->frames());
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.h ('k') | content/renderer/media/webrtc_local_audio_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698