diff --git a/src/common_types.h b/src/common_types.h index 9b3a0ceee4..bd82762db3 100644 --- a/src/common_types.h +++ b/src/common_types.h @@ -360,7 +360,7 @@ enum AgcModes // type of Automatic Gain Control // scaling takes place in the digital domain (e.g. for conference servers // and embedded devices) kAgcAdaptiveDigital, - // can be used on embedded devices where the the capture signal is level + // can be used on embedded devices where the capture signal level // is predictable kAgcFixedDigital }; diff --git a/src/engine_configurations.h b/src/engine_configurations.h index 49a2f8cd87..323c2a61fa 100644 --- a/src/engine_configurations.h +++ b/src/engine_configurations.h @@ -116,17 +116,17 @@ // ---------------------------------------------------------------------------- #if defined(_WIN32) - // #define DIRECTDRAW_RENDERING - #define DIRECT3D9_RENDERING // Requires DirectX 9. -#endif +// #define DIRECTDRAW_RENDERING +#define DIRECT3D9_RENDERING // Requires DirectX 9. +#endif // ---------------------------------------------------------------------------- // VideoEngine MAC // ---------------------------------------------------------------------------- #if defined(WEBRTC_MAC) && !defined(MAC_IPHONE) - // #define CARBON_RENDERING - #define COCOA_RENDERING +// #define CARBON_RENDERING +#define COCOA_RENDERING #endif // ---------------------------------------------------------------------------- @@ -134,7 +134,7 @@ // ---------------------------------------------------------------------------- #if defined(MAC_IPHONE) - #define EAGL_RENDERING +#define EAGL_RENDERING #endif // ---------------------------------------------------------------------------- diff --git a/src/voice_engine/main/source/voe_audio_processing_impl.cc b/src/voice_engine/main/source/voe_audio_processing_impl.cc index b7a705ce41..7303f48406 100644 --- a/src/voice_engine/main/source/voe_audio_processing_impl.cc +++ b/src/voice_engine/main/source/voe_audio_processing_impl.cc @@ -19,6 +19,12 @@ namespace webrtc { +#if defined(WEBRTC_ANDROID) || defined(MAC_IPHONE) || defined(MAC_IPHONE_SIM) +static const EcModes kDefaultEcMode = kEcAecm; +#else +static const EcModes kDefaultEcMode = kEcAec; +#endif + VoEAudioProcessing* VoEAudioProcessing::GetInterface(VoiceEngine* voiceEngine) { #ifndef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API return NULL; @@ -34,9 +40,8 @@ VoEAudioProcessing* VoEAudioProcessing::GetInterface(VoiceEngine* voiceEngine) { } #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API -VoEAudioProcessingImpl::VoEAudioProcessingImpl(): - _isAecMode(static_cast(WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE) == EcAec ? - true : false) { +VoEAudioProcessingImpl::VoEAudioProcessingImpl() + : _isAecMode(kDefaultEcMode == kEcAec ? true : false) { WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, -1), "VoEAudioProcessingImpl::VoEAudioProcessingImpl() - ctor"); } diff --git a/src/voice_engine/main/source/voice_engine_defines.h b/src/voice_engine/main/source/voice_engine_defines.h index c652e6a51e..7d4c7299cd 100644 --- a/src/voice_engine/main/source/voice_engine_defines.h +++ b/src/voice_engine/main/source/voice_engine_defines.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -16,6 +16,7 @@ #ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H #define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H +#include "common_types.h" #include "engine_configurations.h" // ---------------------------------------------------------------------------- @@ -48,10 +49,6 @@ enum { kMinTelephoneEventAttenuation = 0 }; // 0 dBm0 enum { kMaxTelephoneEventAttenuation = 36 }; // -36 dBm0 enum { kMinTelephoneEventSeparationMs = 100 }; // Min delta time between two // telephone events - -enum { EcAec = 0 }; // AEC mode -enum { EcAecm = 1 }; // AECM mode - enum { kVoiceEngineMaxIpPacketSizeBytes = 1500 }; // assumes Ethernet enum { kVoiceEngineMaxModuleVersionSize = 960 }; @@ -150,15 +147,13 @@ enum { kVoiceEngineMaxRtpExtensionId = 14 }; #define WEBRTC_VOICE_ENGINE_RX_HP_DEFAULT_STATE WEBRTC_AUDIO_PROCESSING_OFF // AudioProcessing RX High Pass Filter off -#define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE NoiseSuppression::kModerate +#define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE NoiseSuppression::kModerate // AudioProcessing NS moderate suppression #define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE GainControl::kAdaptiveAnalog // AudioProcessing AGC analog digital combined -#define WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE EcAec - // AudioProcessing EC AEC #define WEBRTC_VOICE_ENGINE_RX_AGC_DEFAULT_MODE GainControl::kAdaptiveDigital // AudioProcessing AGC mode -#define WEBRTC_VOICE_ENGINE_RX_NS_DEFAULT_MODE NoiseSuppression::kModerate +#define WEBRTC_VOICE_ENGINE_RX_NS_DEFAULT_MODE NoiseSuppression::kModerate // AudioProcessing RX NS mode // Macros @@ -406,12 +401,10 @@ namespace webrtc // Default audio processing modes #undef WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE #undef WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE - #undef WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE #define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE \ NoiseSuppression::kModerate #define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \ GainControl::kAdaptiveDigital - #define WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE EcAecm #define ANDROID_NOT_SUPPORTED(stat) \ stat.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \ @@ -555,12 +548,10 @@ namespace webrtc #undef WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE #undef WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE - #undef WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE #define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE \ NoiseSuppression::kModerate #define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \ GainControl::kAdaptiveDigital - #define WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE EcAecm #define IPHONE_NOT_SUPPORTED() \ _engineStatistics.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \