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

Unified Diff: media/audio/win/audio_low_latency_output_win.cc

Issue 2101303004: Pass delay and timestamp to AudioSourceCallback::OnMoreData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: 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: media/audio/win/audio_low_latency_output_win.cc
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc
index 9fa035d80ba6aec06859dfcea5c2f04202e0e1cd..b30fdbe48f4baf5f1dc3bb1ae1aec3e6bdd0ae27 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/win/scoped_propvariant.h"
#include "media/audio/audio_device_description.h"
@@ -534,8 +535,8 @@ bool WASAPIAudioOutputStream::RenderAudioFromSource(UINT64 device_frequency) {
// Read a data packet from the registered client source and
// deliver a delay estimate in the same callback to the client.
- int frames_filled =
- source_->OnMoreData(audio_bus_.get(), audio_delay_bytes, 0);
+ int frames_filled = source_->OnMoreData(audio_bus_.get(), audio_delay_bytes,
+ base::TimeDelta(), 0);
uint32_t num_filled_bytes = frames_filled * format_.Format.nBlockAlign;
DCHECK_LE(num_filled_bytes, packet_size_bytes_);
@@ -641,7 +642,7 @@ HRESULT WASAPIAudioOutputStream::ExclusiveModeInitialization(
}
void WASAPIAudioOutputStream::StopThread() {
- if (render_thread_ ) {
+ if (render_thread_) {
if (render_thread_->HasBeenStarted()) {
// Wait until the thread completes and perform cleanup.
SetEvent(stop_render_event_.Get());

Powered by Google App Engine
This is Rietveld 408576698