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

Side by Side Diff: trunk/src/content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 110303003: Revert 240548 "Enable platform echo cancellation through the Aud..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/sync_socket.h" 8 #include "base/sync_socket.h"
9 #include "content/browser/media/media_internals.h" 9 #include "content/browser/media/media_internals.h"
10 #include "content/browser/renderer_host/media/audio_input_device_manager.h" 10 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 media::AudioParameters params; 191 media::AudioParameters params;
192 if (unified_stream) { 192 if (unified_stream) {
193 // Use AudioInputDeviceManager::kFakeOpenSessionId as the session id to 193 // Use AudioInputDeviceManager::kFakeOpenSessionId as the session id to
194 // pass the permission check. 194 // pass the permission check.
195 session_id = AudioInputDeviceManager::kFakeOpenSessionId; 195 session_id = AudioInputDeviceManager::kFakeOpenSessionId;
196 params = media::AudioParameters( 196 params = media::AudioParameters(
197 media::AudioParameters::AUDIO_FAKE, 197 media::AudioParameters::AUDIO_FAKE,
198 media::CHANNEL_LAYOUT_STEREO, 198 media::CHANNEL_LAYOUT_STEREO,
199 2, 199 2,
200 media::AudioParameters::kAudioCDSampleRate, 16, 200 media::AudioParameters::kAudioCDSampleRate, 16,
201 media::AudioParameters::kAudioCDSampleRate / 10, 201 media::AudioParameters::kAudioCDSampleRate / 10);
202 media::AudioParameters::NO_EFFECTS);
203 } else { 202 } else {
204 session_id = 0; 203 session_id = 0;
205 params = media::AudioParameters( 204 params = media::AudioParameters(
206 media::AudioParameters::AUDIO_FAKE, 205 media::AudioParameters::AUDIO_FAKE,
207 media::CHANNEL_LAYOUT_STEREO, 206 media::CHANNEL_LAYOUT_STEREO,
208 media::AudioParameters::kAudioCDSampleRate, 16, 207 media::AudioParameters::kAudioCDSampleRate, 16,
209 media::AudioParameters::kAudioCDSampleRate / 10); 208 media::AudioParameters::kAudioCDSampleRate / 10);
210 } 209 }
211 host_->OnCreateStream(kStreamId, kRenderViewId, session_id, params); 210 host_->OnCreateStream(kStreamId, kRenderViewId, session_id, params);
212 211
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 342 }
344 343
345 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 344 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
346 Create(true); 345 Create(true);
347 Close(); 346 Close();
348 } 347 }
349 348
350 // TODO(hclam): Add tests for data conversation in low latency mode. 349 // TODO(hclam): Add tests for data conversation in low latency mode.
351 350
352 } // namespace content 351 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698