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

Unified Diff: media/base/audio_renderer_mixer_input_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_input_unittest.cc
diff --git a/media/base/audio_renderer_mixer_input_unittest.cc b/media/base/audio_renderer_mixer_input_unittest.cc
index 9d2345d60beb71018c7ea9c0fe48443eb16105c3..26a5533d8dc3a36a14fc27294ccb0bb5c028013f 100644
--- a/media/base/audio_renderer_mixer_input_unittest.cc
+++ b/media/base/audio_renderer_mixer_input_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/run_loop.h"
+#include "media/base/audio_latency.h"
#include "media/base/audio_renderer_mixer.h"
#include "media/base/audio_renderer_mixer_input.h"
#include "media/base/audio_renderer_mixer_pool.h"
@@ -17,6 +18,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 no ; space before { variable name for int argument
o1ka 2016/06/29 13:57:32 Done.
+}
+
namespace media {
static const int kBitsPerChannel = 16;
@@ -44,11 +49,13 @@ class AudioRendererMixerInputTest : public testing::Test,
void CreateMixerInput(const std::string& device_id) {
mixer_input_ = new AudioRendererMixerInput(this, kRenderFrameId, device_id,
- url::Origin());
+ url::Origin(),
+ AudioLatency::LATENCY_PLAYBACK);
}
AudioRendererMixer* GetMixer(int owner_id,
const AudioParameters& params,
+ AudioLatency::LatencyType latency,
const std::string& device_id,
const url::Origin& security_origin,
OutputDeviceStatus* device_status) {
@@ -71,11 +78,10 @@ class AudioRendererMixerInputTest : public testing::Test,
EXPECT_CALL(*(sinks_[idx].get()), Start());
EXPECT_CALL(*(sinks_[idx].get()), Stop());
- mixers_[idx].reset(
- new AudioRendererMixer(audio_parameters_, sinks_[idx].get()));
+ mixers_[idx].reset(new AudioRendererMixer(
+ audio_parameters_, sinks_[idx].get(), base::Bind(LogUma)));
tommi (sloooow) - chröme 2016/06/29 12:26:52 &LogUma
o1ka 2016/06/29 13:57:32 Done.
}
- EXPECT_CALL(*this,
- ReturnMixer(kRenderFrameId, testing::_, device_id, testing::_));
+ EXPECT_CALL(*this, ReturnMixer(mixers_[idx].get()));
if (device_status)
*device_status = OUTPUT_DEVICE_STATUS_OK;
@@ -86,11 +92,7 @@ class AudioRendererMixerInputTest : public testing::Test,
return mixer_input_->ProvideInput(audio_bus_.get(), 0);
}
- MOCK_METHOD4(ReturnMixer,
- void(int,
- const AudioParameters&,
- const std::string&,
- const url::Origin&));
+ MOCK_METHOD1(ReturnMixer, void(AudioRendererMixer*));
MOCK_METHOD4(
GetOutputDeviceInfo,

Powered by Google App Engine
This is Rietveld 408576698