OLD | NEW |
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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/environment.h" | 7 #include "base/environment.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 media::AudioHardwareConfig* hardware_config = | 114 media::AudioHardwareConfig* hardware_config = |
115 RenderThreadImpl::current()->GetAudioHardwareConfig(); | 115 RenderThreadImpl::current()->GetAudioHardwareConfig(); |
116 | 116 |
117 // Use native capture sample rate and channel configuration to get some | 117 // Use native capture sample rate and channel configuration to get some |
118 // action in this test. | 118 // action in this test. |
119 int sample_rate = hardware_config->GetInputSampleRate(); | 119 int sample_rate = hardware_config->GetInputSampleRate(); |
120 media::ChannelLayout channel_layout = | 120 media::ChannelLayout channel_layout = |
121 hardware_config->GetInputChannelLayout(); | 121 hardware_config->GetInputChannelLayout(); |
122 if (!capturer->Initialize(kRenderViewId, channel_layout, sample_rate, 0, 1, | 122 if (!capturer->Initialize(kRenderViewId, channel_layout, sample_rate, 0, 1, |
123 media::AudioManagerBase::kDefaultDeviceId, 0 ,0)) { | 123 media::AudioManagerBase::kDefaultDeviceId, 0, 0, |
| 124 media::AudioParameters::NO_EFFECTS)) { |
124 return false; | 125 return false; |
125 } | 126 } |
126 | 127 |
127 // Add the capturer to the WebRtcAudioDeviceImpl. | 128 // Add the capturer to the WebRtcAudioDeviceImpl. |
128 webrtc_audio_device->AddAudioCapturer(capturer); | 129 webrtc_audio_device->AddAudioCapturer(capturer); |
129 | 130 |
130 return true; | 131 return true; |
131 } | 132 } |
132 | 133 |
133 // Create and start a local audio track. Starting the audio track will connect | 134 // Create and start a local audio track. Starting the audio track will connect |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 LOG(WARNING) << "Test disabled due to the test hangs on WinXP."; | 970 LOG(WARNING) << "Test disabled due to the test hangs on WinXP."; |
970 return; | 971 return; |
971 } | 972 } |
972 #endif | 973 #endif |
973 int latency = RunWebRtcLoopbackTimeTest(audio_manager_.get(), true); | 974 int latency = RunWebRtcLoopbackTimeTest(audio_manager_.get(), true); |
974 PrintPerfResultMs("webrtc_loopback_with_signal_processing (100 packets)", | 975 PrintPerfResultMs("webrtc_loopback_with_signal_processing (100 packets)", |
975 "t", latency); | 976 "t", latency); |
976 } | 977 } |
977 | 978 |
978 } // namespace content | 979 } // namespace content |
OLD | NEW |