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..f909a58b7b6803540fdb5b6d1f9431ab642fd900 100644 |
--- a/content/browser/renderer_host/media/audio_sync_reader.cc |
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc |
@@ -13,10 +13,12 @@ |
#include "build/build_config.h" |
#include "content/browser/renderer_host/media/media_stream_manager.h" |
#include "content/public/common/content_switches.h" |
+#include "media/audio/audio_device_thread.h" |
#include "media/base/audio_parameters.h" |
using media::AudioBus; |
using media::AudioOutputBuffer; |
+using Packet = media::AudioDeviceThread::Packet; |
namespace { |
@@ -106,8 +108,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. |
@@ -119,7 +123,8 @@ void AudioSyncReader::UpdatePendingBytes(uint32_t bytes, |
// in the anomalous case if the renderer is unable to keep up with real-time. |
output_bus_->Zero(); |
- socket_->Send(&bytes, sizeof(bytes)); |
+ Packet packet = {bytes, output_timestamp}; |
+ socket_->Send(&packet, sizeof(packet)); |
++buffer_index_; |
} |