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

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

Issue 1487983002: 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: Fix in Windows unit test. 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 f61147e29c5f6435963c650f2fffe65b10846ef6..0df8b70fcfa484c9302936e3ef0a22be4d280c55 100644
--- a/content/renderer/media/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc_audio_renderer.cc
@@ -417,7 +417,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_)
@@ -426,7 +427,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