Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 bool enable_agc = false; | 227 bool enable_agc = false; |
| 228 bool enable_rx_agc = false; | 228 bool enable_rx_agc = false; |
| 229 bool enable_cng = false; | 229 bool enable_cng = false; |
| 230 bool enable_ns = false; | 230 bool enable_ns = false; |
| 231 bool enable_rx_ns = false; | 231 bool enable_rx_ns = false; |
| 232 bool typing_detection = false; | 232 bool typing_detection = false; |
| 233 bool muted = false; | 233 bool muted = false; |
| 234 bool opus_stereo = false; | 234 bool opus_stereo = false; |
| 235 bool opus_dtx = false; | 235 bool opus_dtx = false; |
| 236 bool experimental_ns_enabled = false; | 236 bool experimental_ns_enabled = false; |
| 237 bool intelligibility_enabled = false; | |
|
Andrew MacDonald
2015/07/24 23:50:40
Revert changes to this file now that SetExtraOptio
ekm
2015/07/29 00:37:19
Done.
| |
| 237 bool debug_recording_started = false; | 238 bool debug_recording_started = false; |
| 238 | 239 |
| 239 #if defined(WEBRTC_ANDROID) | 240 #if defined(WEBRTC_ANDROID) |
| 240 std::string resource_path = "/sdcard/"; | 241 std::string resource_path = "/sdcard/"; |
| 241 #else | 242 #else |
| 242 std::string resource_path = webrtc::test::ProjectRootPath(); | 243 std::string resource_path = webrtc::test::ProjectRootPath(); |
| 243 if (resource_path == webrtc::test::kCannotFindProjectRootDir) { | 244 if (resource_path == webrtc::test::kCannotFindProjectRootDir) { |
| 244 printf("*** Unable to get project root directory. " | 245 printf("*** Unable to get project root directory. " |
| 245 "File playing may fail. ***\n"); | 246 "File playing may fail. ***\n"); |
| 246 // Fall back to the current directory. | 247 // Fall back to the current directory. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 414 while (forever) { | 415 while (forever) { |
| 415 printf("\nSelect codec\n"); | 416 printf("\nSelect codec\n"); |
| 416 PrintCodecs(opus_stereo); | 417 PrintCodecs(opus_stereo); |
| 417 printf("\nOther actions\n"); | 418 printf("\nOther actions\n"); |
| 418 const int num_codecs = codec->NumOfCodecs(); | 419 const int num_codecs = codec->NumOfCodecs(); |
| 419 int option_index = num_codecs; | 420 int option_index = num_codecs; |
| 420 printf("%i. Toggle CNG\n", option_index++); | 421 printf("%i. Toggle CNG\n", option_index++); |
| 421 printf("%i. Toggle AGC\n", option_index++); | 422 printf("%i. Toggle AGC\n", option_index++); |
| 422 printf("%i. Toggle NS\n", option_index++); | 423 printf("%i. Toggle NS\n", option_index++); |
| 423 printf("%i. Toggle experimental NS\n", option_index++); | 424 printf("%i. Toggle experimental NS\n", option_index++); |
| 425 printf("%i. Toggle intelligibility enhancer\n", option_index++); | |
| 424 printf("%i. Toggle EC\n", option_index++); | 426 printf("%i. Toggle EC\n", option_index++); |
| 425 printf("%i. Select AEC\n", option_index++); | 427 printf("%i. Select AEC\n", option_index++); |
| 426 printf("%i. Select AECM\n", option_index++); | 428 printf("%i. Select AECM\n", option_index++); |
| 427 printf("%i. Get speaker volume\n", option_index++); | 429 printf("%i. Get speaker volume\n", option_index++); |
| 428 printf("%i. Set speaker volume\n", option_index++); | 430 printf("%i. Set speaker volume\n", option_index++); |
| 429 printf("%i. Get microphone volume\n", option_index++); | 431 printf("%i. Get microphone volume\n", option_index++); |
| 430 printf("%i. Set microphone volume\n", option_index++); | 432 printf("%i. Set microphone volume\n", option_index++); |
| 431 printf("%i. Play local file (audio_long16.pcm) \n", option_index++); | 433 printf("%i. Play local file (audio_long16.pcm) \n", option_index++); |
| 432 printf("%i. Change playout device \n", option_index++); | 434 printf("%i. Change playout device \n", option_index++); |
| 433 printf("%i. Change recording device \n", option_index++); | 435 printf("%i. Change recording device \n", option_index++); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 res = apm->SetNsStatus(enable_ns); | 493 res = apm->SetNsStatus(enable_ns); |
| 492 VALIDATE; | 494 VALIDATE; |
| 493 if (enable_ns) | 495 if (enable_ns) |
| 494 printf("\n NS is now on! \n"); | 496 printf("\n NS is now on! \n"); |
| 495 else | 497 else |
| 496 printf("\n NS is now off! \n"); | 498 printf("\n NS is now off! \n"); |
| 497 } else if (option_selection == option_index++) { | 499 } else if (option_selection == option_index++) { |
| 498 experimental_ns_enabled = !experimental_ns_enabled; | 500 experimental_ns_enabled = !experimental_ns_enabled; |
| 499 Config config; | 501 Config config; |
| 500 config.Set<ExperimentalNs>(new ExperimentalNs(experimental_ns_enabled)); | 502 config.Set<ExperimentalNs>(new ExperimentalNs(experimental_ns_enabled)); |
| 503 config.Set<Intelligibility>( | |
| 504 new Intelligibility(intelligibility_enabled)); | |
| 501 base1->audio_processing()->SetExtraOptions(config); | 505 base1->audio_processing()->SetExtraOptions(config); |
| 502 if (experimental_ns_enabled) { | 506 if (experimental_ns_enabled) { |
| 503 printf("\n Experimental NS is now on!\n"); | 507 printf("\n Experimental NS is now on!\n"); |
| 504 } else { | 508 } else { |
| 505 printf("\n Experimental NS is now off!\n"); | 509 printf("\n Experimental NS is now off!\n"); |
| 506 } | 510 } |
| 507 } else if (option_selection == option_index++) { | 511 } else if (option_selection == option_index++) { |
| 512 intelligibility_enabled = !intelligibility_enabled; | |
| 513 Config config; | |
| 514 config.Set<ExperimentalNs>(new ExperimentalNs(experimental_ns_enabled)); | |
| 515 config.Set<Intelligibility>( | |
| 516 new Intelligibility(intelligibility_enabled)); | |
| 517 base1->audio_processing()->SetExtraOptions(config); | |
| 518 if (intelligibility_enabled) { | |
| 519 printf("\n Intelligibility Enhancement is now on!\n"); | |
| 520 } else { | |
| 521 printf("\n Intelligibility Enhancement is now off!\n"); | |
| 522 } | |
| 523 } else if (option_selection == option_index++) { | |
| 508 enable_aec = !enable_aec; | 524 enable_aec = !enable_aec; |
| 509 res = apm->SetEcStatus(enable_aec, kEcUnchanged); | 525 res = apm->SetEcStatus(enable_aec, kEcUnchanged); |
| 510 VALIDATE; | 526 VALIDATE; |
| 511 if (enable_aec) | 527 if (enable_aec) |
| 512 printf("\n Echo control is now on! \n"); | 528 printf("\n Echo control is now on! \n"); |
| 513 else | 529 else |
| 514 printf("\n Echo control is now off! \n"); | 530 printf("\n Echo control is now off! \n"); |
| 515 } else if (option_selection == option_index++) { | 531 } else if (option_selection == option_index++) { |
| 516 res = apm->SetEcStatus(enable_aec, kEcAec); | 532 res = apm->SetEcStatus(enable_aec, kEcAec); |
| 517 VALIDATE; | 533 VALIDATE; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 855 | 871 |
| 856 printf("Delete channels \n"); | 872 printf("Delete channels \n"); |
| 857 res = base1->DeleteChannel(chan); | 873 res = base1->DeleteChannel(chan); |
| 858 VALIDATE; | 874 VALIDATE; |
| 859 | 875 |
| 860 for (int i = 0; i < kMaxNumChannels; ++i) { | 876 for (int i = 0; i < kMaxNumChannels; ++i) { |
| 861 res = base1->DeleteChannel(channels[i]); | 877 res = base1->DeleteChannel(channels[i]); |
| 862 VALIDATE; | 878 VALIDATE; |
| 863 } | 879 } |
| 864 } | 880 } |
| OLD | NEW |