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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host_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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bind.h" 5 #include "base/bind.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _)) 194 EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _))
195 .WillOnce(QuitMessageLoop(message_loop_.get())); 195 .WillOnce(QuitMessageLoop(message_loop_.get()));
196 196
197 media::AudioParameters::Format format; 197 media::AudioParameters::Format format;
198 if (mock_stream_) 198 if (mock_stream_)
199 format = media::AudioParameters::AUDIO_MOCK; 199 format = media::AudioParameters::AUDIO_MOCK;
200 else 200 else
201 format = media::AudioParameters::AUDIO_PCM_LINEAR; 201 format = media::AudioParameters::AUDIO_PCM_LINEAR;
202 202
203 media::AudioParameters params( 203 media::AudioParameters params(
204 format, CHANNEL_LAYOUT_STEREO, 204 format, media::CHANNEL_LAYOUT_STEREO,
205 media::AudioParameters::kAudioCDSampleRate, 16, 205 media::AudioParameters::kAudioCDSampleRate, 16,
206 media::AudioParameters::kAudioCDSampleRate / 10); 206 media::AudioParameters::kAudioCDSampleRate / 10);
207 207
208 // Send a create stream message to the audio output stream and wait until 208 // Send a create stream message to the audio output stream and wait until
209 // we receive the created message. 209 // we receive the created message.
210 host_->OnCreateStream(kStreamId, params, 0); 210 host_->OnCreateStream(kStreamId, params, 0);
211 message_loop_->Run(); 211 message_loop_->Run();
212 } 212 }
213 213
214 void Close() { 214 void Close() {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 EnableRealDevice(); 392 EnableRealDevice();
393 393
394 Create(); 394 Create();
395 Play(); 395 Play();
396 SimulateError(); 396 SimulateError();
397 Close(); 397 Close();
398 } 398 }
399 399
400 400
401 // TODO(hclam): Add tests for data conversation in low latency mode. 401 // TODO(hclam): Add tests for data conversation in low latency mode.
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698