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

Unified Diff: media/audio/android/audio_android_unittest.cc

Issue 1538463002: Revert of 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: 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/alsa/alsa_output_unittest.cc ('k') | media/audio/android/opensles_output.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/android/audio_android_unittest.cc
diff --git a/media/audio/android/audio_android_unittest.cc b/media/audio/android/audio_android_unittest.cc
index 68b53ed051c54901baba7bc182872378d17d6f8a..9140f2243be1a46e7f0bb964ad1e3ed0086bd5af 100644
--- a/media/audio/android/audio_android_unittest.cc
+++ b/media/audio/android/audio_android_unittest.cc
@@ -121,9 +121,7 @@
}
// We clear the data bus to ensure that the test does not cause noise.
-int RealOnMoreData(AudioBus* dest,
- uint32_t total_bytes_delay,
- uint32_t frames_skipped) {
+int RealOnMoreData(AudioBus* dest, uint32 total_bytes_delay) {
dest->Zero();
return dest->frames();
}
@@ -179,9 +177,7 @@
// Use samples read from a data file and fill up the audio buffer
// provided to us in the callback.
- int OnMoreData(AudioBus* audio_bus,
- uint32_t total_bytes_delay,
- uint32_t frames_skipped) override {
+ int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override {
bool stop_playing = false;
int max_size =
audio_bus->frames() * audio_bus->channels() * kBytesPerSample;
@@ -356,9 +352,7 @@
void OnError(AudioInputStream* stream) override {}
// AudioOutputStream::AudioSourceCallback implementation
- int OnMoreData(AudioBus* dest,
- uint32_t total_bytes_delay,
- uint32_t frames_skipped) override {
+ int OnMoreData(AudioBus* dest, uint32 total_bytes_delay) override {
const int size_in_bytes =
(params_.bits_per_sample() / 8) * dest->frames() * dest->channels();
EXPECT_EQ(size_in_bytes, params_.GetBytesPerBuffer());
@@ -497,11 +491,11 @@
int count = 0;
MockAudioSourceCallback source;
- EXPECT_CALL(source, OnMoreData(NotNull(), _, 0))
+ EXPECT_CALL(source, OnMoreData(NotNull(), _))
.Times(AtLeast(num_callbacks))
.WillRepeatedly(
- DoAll(CheckCountAndPostQuitTask(&count, num_callbacks, loop()),
- Invoke(RealOnMoreData)));
+ DoAll(CheckCountAndPostQuitTask(&count, num_callbacks, loop()),
+ Invoke(RealOnMoreData)));
EXPECT_CALL(source, OnError(audio_output_stream_)).Times(0);
OpenAndStartAudioOutputStreamOnAudioThread(&source);
@@ -901,7 +895,7 @@
FileAudioSink sink(&event, in_params, file_name);
MockAudioSourceCallback source;
- EXPECT_CALL(source, OnMoreData(NotNull(), _, 0))
+ EXPECT_CALL(source, OnMoreData(NotNull(), _))
.WillRepeatedly(Invoke(RealOnMoreData));
EXPECT_CALL(source, OnError(audio_output_stream_)).Times(0);
« no previous file with comments | « media/audio/alsa/alsa_output_unittest.cc ('k') | media/audio/android/opensles_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698