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

Unified Diff: media/audio/audio_output_resampler.cc

Issue 1538563002: 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 fix. git cl format. Rebase. 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
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_output_stream_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_resampler.cc
diff --git a/media/audio/audio_output_resampler.cc b/media/audio/audio_output_resampler.cc
index 29f6d264443204183e7e8e2d6a474db0362421a9..ba338358bf8d1e3ef29dd4d89dc560b7dd1a28ab 100644
--- a/media/audio/audio_output_resampler.cc
+++ b/media/audio/audio_output_resampler.cc
@@ -28,7 +28,9 @@ class OnMoreDataConverter
~OnMoreDataConverter() override;
// AudioSourceCallback interface.
- int OnMoreData(AudioBus* dest, uint32 total_bytes_delay) override;
+ int OnMoreData(AudioBus* dest,
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) override;
void OnError(AudioOutputStream* stream) override;
// Sets |source_callback_|. If this is not a new object, then Stop() must be
@@ -370,7 +372,8 @@ void OnMoreDataConverter::Stop() {
}
int OnMoreDataConverter::OnMoreData(AudioBus* dest,
- uint32 total_bytes_delay) {
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) {
current_total_bytes_delay_ = total_bytes_delay;
audio_converter_.Convert(dest);
@@ -389,7 +392,8 @@ double OnMoreDataConverter::ProvideInput(AudioBus* dest,
buffer_delay.InSecondsF() * input_bytes_per_second_));
// Retrieve data from the original callback.
- const int frames = source_callback_->OnMoreData(dest, new_total_bytes_delay);
+ const int frames =
+ source_callback_->OnMoreData(dest, new_total_bytes_delay, 0);
// Zero any unfilled frames if anything was filled, otherwise we'll just
// return a volume of zero and let AudioConverter drop the output.
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_output_stream_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698