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

Unified Diff: media/base/audio_renderer_mixer_unittest.cc

Issue 2067863003: Mixing audio with different latency requirements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing bot redness 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/base/audio_renderer_mixer_unittest.cc
diff --git a/media/base/audio_renderer_mixer_unittest.cc b/media/base/audio_renderer_mixer_unittest.cc
index 7af2b829b068cc298b6e2b830887f900d4469e97..890f96925b4a674b4ea7937c07fbaf57cd5878a8 100644
--- a/media/base/audio_renderer_mixer_unittest.cc
+++ b/media/base/audio_renderer_mixer_unittest.cc
@@ -25,6 +25,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace {
+void LogUma(int){};
tommi (sloooow) - chröme 2016/06/29 12:26:52 same here
o1ka 2016/06/29 13:57:32 Done.
+}
+
namespace media {
// Parameters which control the many input case tests.
@@ -74,7 +78,8 @@ class AudioRendererMixerTest
EXPECT_CALL(*sink_.get(), Start());
EXPECT_CALL(*sink_.get(), Stop());
- mixer_.reset(new AudioRendererMixer(output_parameters_, sink_));
+ mixer_.reset(
+ new AudioRendererMixer(output_parameters_, sink_, base::Bind(LogUma)));
mixer_callback_ = sink_->callback();
audio_bus_ = AudioBus::Create(output_parameters_);
@@ -88,22 +93,21 @@ class AudioRendererMixerTest
AudioRendererMixer* GetMixer(int owner_id,
const AudioParameters& params,
+ AudioLatency::LatencyType latency,
const std::string& device_id,
const url::Origin& security_origin,
OutputDeviceStatus* device_status) final {
return mixer_.get();
};
- MOCK_METHOD4(ReturnMixer,
- void(int,
- const AudioParameters&,
- const std::string&,
- const url::Origin&));
+ MOCK_METHOD1(ReturnMixer, void(AudioRendererMixer*));
MOCK_METHOD4(
GetOutputDeviceInfo,
OutputDeviceInfo(int, int, const std::string&, const url::Origin&));
+ MOCK_METHOD1(LogUmaCallback, void(int));
+
void InitializeInputs(int inputs_per_sample_rate) {
mixer_inputs_.reserve(inputs_per_sample_rate * input_parameters_.size());
fake_callbacks_.reserve(inputs_per_sample_rate * input_parameters_.size());
@@ -333,7 +337,7 @@ class AudioRendererMixerTest
return new AudioRendererMixerInput(
this,
// Zero frame id, default device ID and security origin.
- 0, std::string(), url::Origin());
+ 0, std::string(), url::Origin(), AudioLatency::LATENCY_PLAYBACK);
}
protected:

Powered by Google App Engine
This is Rietveld 408576698