| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 return -1; | 109 return -1; |
| 110 } | 110 } |
| 111 if (_shared->audio_processing()->noise_suppression()->Enable(enable) != 0) { | 111 if (_shared->audio_processing()->noise_suppression()->Enable(enable) != 0) { |
| 112 _shared->SetLastError(VE_APM_ERROR, kTraceError, | 112 _shared->SetLastError(VE_APM_ERROR, kTraceError, |
| 113 "SetNsStatus() failed to set Ns state"); | 113 "SetNsStatus() failed to set Ns state"); |
| 114 return -1; | 114 return -1; |
| 115 } | 115 } |
| 116 | 116 |
| 117 return 0; | 117 return 0; |
| 118 #else | 118 #else |
| 119 #error "This is deprecated" |
| 119 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 120 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 120 "SetNsStatus() Ns is not supported"); | 121 "SetNsStatus() Ns is not supported"); |
| 121 return -1; | 122 return -1; |
| 122 #endif | 123 #endif |
| 123 } | 124 } |
| 124 | 125 |
| 125 int VoEAudioProcessingImpl::GetNsStatus(bool& enabled, NsModes& mode) { | 126 int VoEAudioProcessingImpl::GetNsStatus(bool& enabled, NsModes& mode) { |
| 126 #ifdef WEBRTC_VOICE_ENGINE_NR | 127 #ifdef WEBRTC_VOICE_ENGINE_NR |
| 127 if (!_shared->statistics().Initialized()) { | 128 if (!_shared->statistics().Initialized()) { |
| 128 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 129 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 142 break; | 143 break; |
| 143 case NoiseSuppression::kHigh: | 144 case NoiseSuppression::kHigh: |
| 144 mode = kNsHighSuppression; | 145 mode = kNsHighSuppression; |
| 145 break; | 146 break; |
| 146 case NoiseSuppression::kVeryHigh: | 147 case NoiseSuppression::kVeryHigh: |
| 147 mode = kNsVeryHighSuppression; | 148 mode = kNsVeryHighSuppression; |
| 148 break; | 149 break; |
| 149 } | 150 } |
| 150 return 0; | 151 return 0; |
| 151 #else | 152 #else |
| 153 #error "This is deprecated" |
| 152 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 154 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 153 "GetNsStatus() Ns is not supported"); | 155 "GetNsStatus() Ns is not supported"); |
| 154 return -1; | 156 return -1; |
| 155 #endif | 157 #endif |
| 156 } | 158 } |
| 157 | 159 |
| 158 int VoEAudioProcessingImpl::SetAgcStatus(bool enable, AgcModes mode) { | 160 int VoEAudioProcessingImpl::SetAgcStatus(bool enable, AgcModes mode) { |
| 159 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 161 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
| 160 "SetAgcStatus(enable=%d, mode=%d)", enable, mode); | 162 "SetAgcStatus(enable=%d, mode=%d)", enable, mode); |
| 161 #ifdef WEBRTC_VOICE_ENGINE_AGC | 163 #ifdef WEBRTC_VOICE_ENGINE_AGC |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // used since we want to be able to provide the APM with updated mic | 210 // used since we want to be able to provide the APM with updated mic |
| 209 // levels when the user modifies the mic level manually. | 211 // levels when the user modifies the mic level manually. |
| 210 if (_shared->audio_device()->SetAGC(enable) != 0) { | 212 if (_shared->audio_device()->SetAGC(enable) != 0) { |
| 211 _shared->SetLastError(VE_AUDIO_DEVICE_MODULE_ERROR, kTraceWarning, | 213 _shared->SetLastError(VE_AUDIO_DEVICE_MODULE_ERROR, kTraceWarning, |
| 212 "SetAgcStatus() failed to set Agc mode"); | 214 "SetAgcStatus() failed to set Agc mode"); |
| 213 } | 215 } |
| 214 } | 216 } |
| 215 | 217 |
| 216 return 0; | 218 return 0; |
| 217 #else | 219 #else |
| 220 #error "This is deprecated" |
| 218 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 221 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 219 "SetAgcStatus() Agc is not supported"); | 222 "SetAgcStatus() Agc is not supported"); |
| 220 return -1; | 223 return -1; |
| 221 #endif | 224 #endif |
| 222 } | 225 } |
| 223 | 226 |
| 224 int VoEAudioProcessingImpl::GetAgcStatus(bool& enabled, AgcModes& mode) { | 227 int VoEAudioProcessingImpl::GetAgcStatus(bool& enabled, AgcModes& mode) { |
| 225 #ifdef WEBRTC_VOICE_ENGINE_AGC | 228 #ifdef WEBRTC_VOICE_ENGINE_AGC |
| 226 if (!_shared->statistics().Initialized()) { | 229 if (!_shared->statistics().Initialized()) { |
| 227 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 230 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 239 case GainControl::kAdaptiveAnalog: | 242 case GainControl::kAdaptiveAnalog: |
| 240 mode = kAgcAdaptiveAnalog; | 243 mode = kAgcAdaptiveAnalog; |
| 241 break; | 244 break; |
| 242 case GainControl::kAdaptiveDigital: | 245 case GainControl::kAdaptiveDigital: |
| 243 mode = kAgcAdaptiveDigital; | 246 mode = kAgcAdaptiveDigital; |
| 244 break; | 247 break; |
| 245 } | 248 } |
| 246 | 249 |
| 247 return 0; | 250 return 0; |
| 248 #else | 251 #else |
| 252 #error "This is deprecated" |
| 249 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 253 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 250 "GetAgcStatus() Agc is not supported"); | 254 "GetAgcStatus() Agc is not supported"); |
| 251 return -1; | 255 return -1; |
| 252 #endif | 256 #endif |
| 253 } | 257 } |
| 254 | 258 |
| 255 int VoEAudioProcessingImpl::SetAgcConfig(AgcConfig config) { | 259 int VoEAudioProcessingImpl::SetAgcConfig(AgcConfig config) { |
| 256 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 260 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
| 257 "SetAgcConfig()"); | 261 "SetAgcConfig()"); |
| 258 #ifdef WEBRTC_VOICE_ENGINE_AGC | 262 #ifdef WEBRTC_VOICE_ENGINE_AGC |
| (...skipping 19 matching lines...) Expand all Loading... |
| 278 if (_shared->audio_processing()->gain_control()->enable_limiter( | 282 if (_shared->audio_processing()->gain_control()->enable_limiter( |
| 279 config.limiterEnable) != 0) { | 283 config.limiterEnable) != 0) { |
| 280 _shared->SetLastError( | 284 _shared->SetLastError( |
| 281 VE_APM_ERROR, kTraceError, | 285 VE_APM_ERROR, kTraceError, |
| 282 "SetAgcConfig() failed to set hard limiter to the signal"); | 286 "SetAgcConfig() failed to set hard limiter to the signal"); |
| 283 return -1; | 287 return -1; |
| 284 } | 288 } |
| 285 | 289 |
| 286 return 0; | 290 return 0; |
| 287 #else | 291 #else |
| 292 #error "This is deprecated" |
| 288 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 293 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 289 "SetAgcConfig() EC is not supported"); | 294 "SetAgcConfig() EC is not supported"); |
| 290 return -1; | 295 return -1; |
| 291 #endif | 296 #endif |
| 292 } | 297 } |
| 293 | 298 |
| 294 int VoEAudioProcessingImpl::GetAgcConfig(AgcConfig& config) { | 299 int VoEAudioProcessingImpl::GetAgcConfig(AgcConfig& config) { |
| 295 #ifdef WEBRTC_VOICE_ENGINE_AGC | 300 #ifdef WEBRTC_VOICE_ENGINE_AGC |
| 296 if (!_shared->statistics().Initialized()) { | 301 if (!_shared->statistics().Initialized()) { |
| 297 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 302 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| 298 return -1; | 303 return -1; |
| 299 } | 304 } |
| 300 | 305 |
| 301 config.targetLeveldBOv = | 306 config.targetLeveldBOv = |
| 302 _shared->audio_processing()->gain_control()->target_level_dbfs(); | 307 _shared->audio_processing()->gain_control()->target_level_dbfs(); |
| 303 config.digitalCompressionGaindB = | 308 config.digitalCompressionGaindB = |
| 304 _shared->audio_processing()->gain_control()->compression_gain_db(); | 309 _shared->audio_processing()->gain_control()->compression_gain_db(); |
| 305 config.limiterEnable = | 310 config.limiterEnable = |
| 306 _shared->audio_processing()->gain_control()->is_limiter_enabled(); | 311 _shared->audio_processing()->gain_control()->is_limiter_enabled(); |
| 307 | 312 |
| 308 return 0; | 313 return 0; |
| 309 #else | 314 #else |
| 315 #error "This is deprecated" |
| 310 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 316 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 311 "GetAgcConfig() EC is not supported"); | 317 "GetAgcConfig() EC is not supported"); |
| 312 return -1; | 318 return -1; |
| 313 #endif | 319 #endif |
| 314 } | 320 } |
| 315 | 321 |
| 316 bool VoEAudioProcessing::DriftCompensationSupported() { | 322 bool VoEAudioProcessing::DriftCompensationSupported() { |
| 317 #if defined(WEBRTC_DRIFT_COMPENSATION_SUPPORTED) | 323 #if defined(WEBRTC_DRIFT_COMPENSATION_SUPPORTED) |
| 318 return true; | 324 return true; |
| 319 #else | 325 #else |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 } | 429 } |
| 424 _isAecMode = false; | 430 _isAecMode = false; |
| 425 } else { | 431 } else { |
| 426 _shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError, | 432 _shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError, |
| 427 "SetEcStatus() invalid EC mode"); | 433 "SetEcStatus() invalid EC mode"); |
| 428 return -1; | 434 return -1; |
| 429 } | 435 } |
| 430 | 436 |
| 431 return 0; | 437 return 0; |
| 432 #else | 438 #else |
| 439 #error "This is deprecated" |
| 433 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 440 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 434 "SetEcStatus() EC is not supported"); | 441 "SetEcStatus() EC is not supported"); |
| 435 return -1; | 442 return -1; |
| 436 #endif | 443 #endif |
| 437 } | 444 } |
| 438 | 445 |
| 439 int VoEAudioProcessingImpl::GetEcStatus(bool& enabled, EcModes& mode) { | 446 int VoEAudioProcessingImpl::GetEcStatus(bool& enabled, EcModes& mode) { |
| 440 #ifdef WEBRTC_VOICE_ENGINE_ECHO | 447 #ifdef WEBRTC_VOICE_ENGINE_ECHO |
| 441 if (!_shared->statistics().Initialized()) { | 448 if (!_shared->statistics().Initialized()) { |
| 442 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 449 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| 443 return -1; | 450 return -1; |
| 444 } | 451 } |
| 445 | 452 |
| 446 if (_isAecMode == true) { | 453 if (_isAecMode == true) { |
| 447 mode = kEcAec; | 454 mode = kEcAec; |
| 448 enabled = _shared->audio_processing()->echo_cancellation()->is_enabled(); | 455 enabled = _shared->audio_processing()->echo_cancellation()->is_enabled(); |
| 449 } else { | 456 } else { |
| 450 mode = kEcAecm; | 457 mode = kEcAecm; |
| 451 enabled = _shared->audio_processing()->echo_control_mobile()->is_enabled(); | 458 enabled = _shared->audio_processing()->echo_control_mobile()->is_enabled(); |
| 452 } | 459 } |
| 453 | 460 |
| 454 return 0; | 461 return 0; |
| 455 #else | 462 #else |
| 463 #error "This is deprecated" |
| 456 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 464 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 457 "GetEcStatus() EC is not supported"); | 465 "GetEcStatus() EC is not supported"); |
| 458 return -1; | 466 return -1; |
| 459 #endif | 467 #endif |
| 460 } | 468 } |
| 461 | 469 |
| 462 void VoEAudioProcessingImpl::SetDelayOffsetMs(int offset) { | 470 void VoEAudioProcessingImpl::SetDelayOffsetMs(int offset) { |
| 463 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 471 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
| 464 "SetDelayOffsetMs(offset = %d)", offset); | 472 "SetDelayOffsetMs(offset = %d)", offset); |
| 465 _shared->audio_processing()->set_delay_offset_ms(offset); | 473 _shared->audio_processing()->set_delay_offset_ms(offset); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 if (_shared->audio_processing()->echo_control_mobile()->enable_comfort_noise( | 516 if (_shared->audio_processing()->echo_control_mobile()->enable_comfort_noise( |
| 509 enableCNG) != 0) { | 517 enableCNG) != 0) { |
| 510 _shared->SetLastError( | 518 _shared->SetLastError( |
| 511 VE_APM_ERROR, kTraceError, | 519 VE_APM_ERROR, kTraceError, |
| 512 "SetAECMMode() failed to set comfort noise state for AECM"); | 520 "SetAECMMode() failed to set comfort noise state for AECM"); |
| 513 return -1; | 521 return -1; |
| 514 } | 522 } |
| 515 | 523 |
| 516 return 0; | 524 return 0; |
| 517 #else | 525 #else |
| 526 #error "This is deprecated" |
| 518 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 527 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 519 "SetAECMMode() EC is not supported"); | 528 "SetAECMMode() EC is not supported"); |
| 520 return -1; | 529 return -1; |
| 521 #endif | 530 #endif |
| 522 } | 531 } |
| 523 | 532 |
| 524 int VoEAudioProcessingImpl::GetAecmMode(AecmModes& mode, bool& enabledCNG) { | 533 int VoEAudioProcessingImpl::GetAecmMode(AecmModes& mode, bool& enabledCNG) { |
| 525 #ifdef WEBRTC_VOICE_ENGINE_ECHO | 534 #ifdef WEBRTC_VOICE_ENGINE_ECHO |
| 526 if (!_shared->statistics().Initialized()) { | 535 if (!_shared->statistics().Initialized()) { |
| 527 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 536 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 549 case EchoControlMobile::kSpeakerphone: | 558 case EchoControlMobile::kSpeakerphone: |
| 550 mode = kAecmSpeakerphone; | 559 mode = kAecmSpeakerphone; |
| 551 break; | 560 break; |
| 552 case EchoControlMobile::kLoudSpeakerphone: | 561 case EchoControlMobile::kLoudSpeakerphone: |
| 553 mode = kAecmLoudSpeakerphone; | 562 mode = kAecmLoudSpeakerphone; |
| 554 break; | 563 break; |
| 555 } | 564 } |
| 556 | 565 |
| 557 return 0; | 566 return 0; |
| 558 #else | 567 #else |
| 568 #error "This is deprecated" |
| 559 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 569 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 560 "GetAECMMode() EC is not supported"); | 570 "GetAECMMode() EC is not supported"); |
| 561 return -1; | 571 return -1; |
| 562 #endif | 572 #endif |
| 563 } | 573 } |
| 564 | 574 |
| 565 int VoEAudioProcessingImpl::EnableHighPassFilter(bool enable) { | 575 int VoEAudioProcessingImpl::EnableHighPassFilter(bool enable) { |
| 566 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 576 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
| 567 "EnableHighPassFilter(%d)", enable); | 577 "EnableHighPassFilter(%d)", enable); |
| 568 if (_shared->audio_processing()->high_pass_filter()->Enable(enable) != | 578 if (_shared->audio_processing()->high_pass_filter()->Enable(enable) != |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 if ((_shared->audio_processing()->echo_cancellation()->enable_metrics( | 622 if ((_shared->audio_processing()->echo_cancellation()->enable_metrics( |
| 613 enable) != 0) || | 623 enable) != 0) || |
| 614 (_shared->audio_processing()->echo_cancellation()->enable_delay_logging( | 624 (_shared->audio_processing()->echo_cancellation()->enable_delay_logging( |
| 615 enable) != 0)) { | 625 enable) != 0)) { |
| 616 _shared->SetLastError(VE_APM_ERROR, kTraceError, | 626 _shared->SetLastError(VE_APM_ERROR, kTraceError, |
| 617 "SetEcMetricsStatus() unable to set EC metrics mode"); | 627 "SetEcMetricsStatus() unable to set EC metrics mode"); |
| 618 return -1; | 628 return -1; |
| 619 } | 629 } |
| 620 return 0; | 630 return 0; |
| 621 #else | 631 #else |
| 632 #error "This is deprecated" |
| 622 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 633 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 623 "SetEcStatus() EC is not supported"); | 634 "SetEcStatus() EC is not supported"); |
| 624 return -1; | 635 return -1; |
| 625 #endif | 636 #endif |
| 626 } | 637 } |
| 627 | 638 |
| 628 int VoEAudioProcessingImpl::GetEcMetricsStatus(bool& enabled) { | 639 int VoEAudioProcessingImpl::GetEcMetricsStatus(bool& enabled) { |
| 629 #ifdef WEBRTC_VOICE_ENGINE_ECHO | 640 #ifdef WEBRTC_VOICE_ENGINE_ECHO |
| 630 if (!_shared->statistics().Initialized()) { | 641 if (!_shared->statistics().Initialized()) { |
| 631 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 642 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 642 _shared->SetLastError( | 653 _shared->SetLastError( |
| 643 VE_APM_ERROR, kTraceError, | 654 VE_APM_ERROR, kTraceError, |
| 644 "GetEcMetricsStatus() delay logging and echo mode are not the same"); | 655 "GetEcMetricsStatus() delay logging and echo mode are not the same"); |
| 645 return -1; | 656 return -1; |
| 646 } | 657 } |
| 647 | 658 |
| 648 enabled = echo_mode; | 659 enabled = echo_mode; |
| 649 | 660 |
| 650 return 0; | 661 return 0; |
| 651 #else | 662 #else |
| 663 #error "This is deprecated" |
| 652 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 664 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 653 "SetEcStatus() EC is not supported"); | 665 "SetEcStatus() EC is not supported"); |
| 654 return -1; | 666 return -1; |
| 655 #endif | 667 #endif |
| 656 } | 668 } |
| 657 | 669 |
| 658 int VoEAudioProcessingImpl::GetEchoMetrics(int& ERL, | 670 int VoEAudioProcessingImpl::GetEchoMetrics(int& ERL, |
| 659 int& ERLE, | 671 int& ERLE, |
| 660 int& RERL, | 672 int& RERL, |
| 661 int& A_NLP) { | 673 int& A_NLP) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 681 } | 693 } |
| 682 | 694 |
| 683 // Echo quality metrics. | 695 // Echo quality metrics. |
| 684 ERL = echoMetrics.echo_return_loss.instant; | 696 ERL = echoMetrics.echo_return_loss.instant; |
| 685 ERLE = echoMetrics.echo_return_loss_enhancement.instant; | 697 ERLE = echoMetrics.echo_return_loss_enhancement.instant; |
| 686 RERL = echoMetrics.residual_echo_return_loss.instant; | 698 RERL = echoMetrics.residual_echo_return_loss.instant; |
| 687 A_NLP = echoMetrics.a_nlp.instant; | 699 A_NLP = echoMetrics.a_nlp.instant; |
| 688 | 700 |
| 689 return 0; | 701 return 0; |
| 690 #else | 702 #else |
| 703 #error "This is deprecated" |
| 691 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 704 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 692 "SetEcStatus() EC is not supported"); | 705 "SetEcStatus() EC is not supported"); |
| 693 return -1; | 706 return -1; |
| 694 #endif | 707 #endif |
| 695 } | 708 } |
| 696 | 709 |
| 697 int VoEAudioProcessingImpl::GetEcDelayMetrics(int& delay_median, | 710 int VoEAudioProcessingImpl::GetEcDelayMetrics(int& delay_median, |
| 698 int& delay_std, | 711 int& delay_std, |
| 699 float& fraction_poor_delays) { | 712 float& fraction_poor_delays) { |
| 700 #ifdef WEBRTC_VOICE_ENGINE_ECHO | 713 #ifdef WEBRTC_VOICE_ENGINE_ECHO |
| (...skipping 20 matching lines...) Expand all Loading... |
| 721 return -1; | 734 return -1; |
| 722 } | 735 } |
| 723 | 736 |
| 724 // EC delay-logging metrics | 737 // EC delay-logging metrics |
| 725 delay_median = median; | 738 delay_median = median; |
| 726 delay_std = std; | 739 delay_std = std; |
| 727 fraction_poor_delays = poor_fraction; | 740 fraction_poor_delays = poor_fraction; |
| 728 | 741 |
| 729 return 0; | 742 return 0; |
| 730 #else | 743 #else |
| 744 #error "This is deprecated" |
| 731 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | 745 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, |
| 732 "SetEcStatus() EC is not supported"); | 746 "SetEcStatus() EC is not supported"); |
| 733 return -1; | 747 return -1; |
| 734 #endif | 748 #endif |
| 735 } | 749 } |
| 736 | 750 |
| 737 int VoEAudioProcessingImpl::StartDebugRecording(const char* fileNameUTF8) { | 751 int VoEAudioProcessingImpl::StartDebugRecording(const char* fileNameUTF8) { |
| 738 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 752 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
| 739 "StartDebugRecording()"); | 753 "StartDebugRecording()"); |
| 740 if (!_shared->statistics().Initialized()) { | 754 if (!_shared->statistics().Initialized()) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 _shared->transmit_mixer()->EnableStereoChannelSwapping(enable); | 870 _shared->transmit_mixer()->EnableStereoChannelSwapping(enable); |
| 857 } | 871 } |
| 858 | 872 |
| 859 bool VoEAudioProcessingImpl::IsStereoChannelSwappingEnabled() { | 873 bool VoEAudioProcessingImpl::IsStereoChannelSwappingEnabled() { |
| 860 return _shared->transmit_mixer()->IsStereoChannelSwappingEnabled(); | 874 return _shared->transmit_mixer()->IsStereoChannelSwappingEnabled(); |
| 861 } | 875 } |
| 862 | 876 |
| 863 #endif // #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API | 877 #endif // #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API |
| 864 | 878 |
| 865 } // namespace webrtc | 879 } // namespace webrtc |
| OLD | NEW |