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

Unified Diff: content/browser/renderer_host/media/audio_sync_reader.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: Code review fixes. Loads of files updated due to interface changes. 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/browser/renderer_host/media/audio_sync_reader.cc
diff --git a/content/browser/renderer_host/media/audio_sync_reader.cc b/content/browser/renderer_host/media/audio_sync_reader.cc
index f6b3d6cef3f7db4a593402a2b355381fc8180f6a..f4e9e701c40a9c79c2128f7a267d2fc444357fdf 100644
--- a/content/browser/renderer_host/media/audio_sync_reader.cc
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc
@@ -81,11 +81,13 @@ AudioSyncReader::~AudioSyncReader() {
}
// media::AudioOutputController::SyncReader implementations.
-void AudioSyncReader::UpdatePendingBytes(uint32 bytes) {
+void AudioSyncReader::UpdatePendingBytes(uint32_t bytes,
+ uint32_t frames_skipped) {
// Zero out the entire output buffer to avoid stuttering/repeating-buffers
// in the anomalous case if the renderer is unable to keep up with real-time.
output_bus_->Zero();
- socket_->Send(&bytes, sizeof(bytes));
+ uint32_t data[2] = {bytes, frames_skipped};
+ socket_->Send(&data, sizeof(data));
++buffer_index_;
}

Powered by Google App Engine
This is Rietveld 408576698