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

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

Issue 115413002: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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);
202 } else { 203 } else {
203 session_id = 0; 204 session_id = 0;
204 params = media::AudioParameters( 205 params = media::AudioParameters(
205 media::AudioParameters::AUDIO_FAKE, 206 media::AudioParameters::AUDIO_FAKE,
206 media::CHANNEL_LAYOUT_STEREO, 207 media::CHANNEL_LAYOUT_STEREO,
207 media::AudioParameters::kAudioCDSampleRate, 16, 208 media::AudioParameters::kAudioCDSampleRate, 16,
208 media::AudioParameters::kAudioCDSampleRate / 10); 209 media::AudioParameters::kAudioCDSampleRate / 10);
209 } 210 }
210 host_->OnCreateStream(kStreamId, kRenderViewId, session_id, params); 211 host_->OnCreateStream(kStreamId, kRenderViewId, session_id, params);
211 212
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 343 }
343 344
344 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) { 345 TEST_F(AudioRendererHostTest, CreateUnifiedStreamAndClose) {
345 Create(true); 346 Create(true);
346 Close(); 347 Close();
347 } 348 }
348 349
349 // TODO(hclam): Add tests for data conversation in low latency mode. 350 // TODO(hclam): Add tests for data conversation in low latency mode.
350 351
351 } // namespace content 352 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_input_device_manager.cc ('k') | content/common/media/media_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698