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

Side by Side Diff: chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc

Issue 922663002: Moved the fake input stream's processing onto the audio worker thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved flag logic from provider to input stream, added unit test Created 5 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <ctime> 5 #include <ctime>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 if (!base::GetAppOutput(command_line, &result)) { 259 if (!base::GetAppOutput(command_line, &result)) {
260 LOG(ERROR) << "Failed to set source volume: output was " << result; 260 LOG(ERROR) << "Failed to set source volume: output was " << result;
261 return false; 261 return false;
262 } 262 }
263 #elif defined(OS_MACOSX) 263 #elif defined(OS_MACOSX)
264 base::CommandLine command_line( 264 base::CommandLine command_line(
265 base::FilePath(FILE_PATH_LITERAL("osascript"))); 265 base::FilePath(FILE_PATH_LITERAL("osascript")));
266 command_line.AppendArg("-e"); 266 command_line.AppendArg("-e");
267 command_line.AppendArg("set volume input volume 100"); 267 command_line.AppendArg("set volume input volume 100");
268 command_line.AppendArg("-e"); 268 command_line.AppendArg("-e");
269 command_line.AppendArg("set volume output volume 100"); 269 command_line.AppendArg("set volume output volume 85");
270 270
271 std::string result; 271 std::string result;
272 if (!base::GetAppOutput(command_line, &result)) { 272 if (!base::GetAppOutput(command_line, &result)) {
273 LOG(ERROR) << "Failed to set source volume: output was " << result; 273 LOG(ERROR) << "Failed to set source volume: output was " << result;
274 return false; 274 return false;
275 } 275 }
276 #else 276 #else
277 // Just force the volume of, say the first 5 devices. A machine will rarely 277 // Just force the volume of, say the first 5 devices. A machine will rarely
278 // have more input sources than that. This is way easier than finding the 278 // have more input sources than that. This is way easier than finding the
279 // input device we happen to be using. 279 // input device we happen to be using.
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 #endif 774 #endif
775 775
776 // Since the AGC is off here there should be no gain at all. 776 // Since the AGC is off here there should be no gain at all.
777 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, 777 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
778 MAYBE_MANUAL_TestAutoGainIsOffWithAudioProcessingOff) { 778 MAYBE_MANUAL_TestAutoGainIsOffWithAudioProcessingOff) {
779 const char* kAudioCallWithoutAudioProcessing = 779 const char* kAudioCallWithoutAudioProcessing =
780 "{audio: { mandatory: { echoCancellation: false } } }"; 780 "{audio: { mandatory: { echoCancellation: false } } }";
781 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( 781 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
782 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc")); 782 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc"));
783 } 783 }
OLDNEW
« no previous file with comments | « no previous file | media/audio/fake_audio_consumer_unittest.cc » ('j') | media/audio/fake_audio_provider_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698