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

Side by Side Diff: content/renderer/media/audio_renderer_mixer_manager_unittest.cc

Issue 11198018: Move ChannelLayout into media namespace. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixes. Created 8 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "content/renderer/media/audio_device_factory.h" 6 #include "content/renderer/media/audio_device_factory.h"
7 #include "content/renderer/media/audio_renderer_mixer_manager.h" 7 #include "content/renderer/media/audio_renderer_mixer_manager.h"
8 #include "media/base/audio_renderer_mixer.h" 8 #include "media/base/audio_renderer_mixer.h"
9 #include "media/base/audio_renderer_mixer_input.h" 9 #include "media/base/audio_renderer_mixer_input.h"
10 #include "media/base/fake_audio_render_callback.h" 10 #include "media/base/fake_audio_render_callback.h"
11 #include "media/base/mock_audio_renderer_sink.h" 11 #include "media/base/mock_audio_renderer_sink.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 static const int kBitsPerChannel = 16; 17 static const int kBitsPerChannel = 16;
18 static const int kSampleRate = 48000; 18 static const int kSampleRate = 48000;
19 static const int kBufferSize = 8192; 19 static const int kBufferSize = 8192;
20 static const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO; 20 static const media::ChannelLayout kChannelLayout = media::CHANNEL_LAYOUT_STEREO;
21 21
22 // By sub-classing AudioDeviceFactory we've overridden the factory to use our 22 // By sub-classing AudioDeviceFactory we've overridden the factory to use our
23 // CreateAudioDevice() method globally. 23 // CreateAudioDevice() method globally.
24 class MockAudioRenderSinkFactory : public AudioDeviceFactory { 24 class MockAudioRenderSinkFactory : public AudioDeviceFactory {
25 public: 25 public:
26 MockAudioRenderSinkFactory() {} 26 MockAudioRenderSinkFactory() {}
27 virtual ~MockAudioRenderSinkFactory() {} 27 virtual ~MockAudioRenderSinkFactory() {}
28 28
29 protected: 29 protected:
30 virtual media::MockAudioRendererSink* CreateOutputDevice() OVERRIDE { 30 virtual media::MockAudioRendererSink* CreateOutputDevice() OVERRIDE {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 media::FakeAudioRenderCallback callback(0); 127 media::FakeAudioRenderCallback callback(0);
128 input->Initialize(params, &callback); 128 input->Initialize(params, &callback);
129 EXPECT_EQ(mixer_count(), 1); 129 EXPECT_EQ(mixer_count(), 1);
130 130
131 // Destroying the input should destroy the mixer. 131 // Destroying the input should destroy the mixer.
132 input = NULL; 132 input = NULL;
133 EXPECT_EQ(mixer_count(), 0); 133 EXPECT_EQ(mixer_count(), 0);
134 } 134 }
135 135
136 } // namespace content 136 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/audio_hardware.cc ('k') | content/renderer/media/webrtc_audio_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698