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

Unified Diff: content/browser/renderer_host/media/audio_sync_reader.cc

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementation of 'AudioContext.getOutputTimestamp' method Created 4 years, 6 months 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 943cedb4d0b6a839e1e1f82a95c77a3f9cce4e58..d614f9e1331658814243c3904aafaf4f32208d24 100644
--- a/content/browser/renderer_host/media/audio_sync_reader.cc
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc
@@ -106,8 +106,10 @@ AudioSyncReader::~AudioSyncReader() {
}
// media::AudioOutputController::SyncReader implementations.
-void AudioSyncReader::UpdatePendingBytes(uint32_t bytes,
- uint32_t frames_skipped) {
+void AudioSyncReader::UpdatePendingBytes(
+ uint32_t bytes,
+ uint32_t frames_skipped,
+ const media::AudioTimestamp& output_timestamp) {
// Increase the number of skipped frames stored in shared memory. We don't
// send it over the socket since sending more than 4 bytes might lead to being
// descheduled. The reading side will zero it when consumed.
@@ -120,6 +122,7 @@ void AudioSyncReader::UpdatePendingBytes(uint32_t bytes,
output_bus_->Zero();
socket_->Send(&bytes, sizeof(bytes));
+ socket_->Send(&output_timestamp, sizeof(output_timestamp));
++buffer_index_;
}

Powered by Google App Engine
This is Rietveld 408576698