Use a const rather than macro for EcDefault.
- This should be a better solution to the build error in https://webrtc-codereview.appspot.com/425005 - Ideally all of the similar macros should go away, but one thing at a time... BUG= TEST=voe_auto_test Review URL: https://webrtc-codereview.appspot.com/438002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1860 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f1befad273
commit
8012474552
@ -360,7 +360,7 @@ enum AgcModes // type of Automatic Gain Control
|
|||||||
// scaling takes place in the digital domain (e.g. for conference servers
|
// scaling takes place in the digital domain (e.g. for conference servers
|
||||||
// and embedded devices)
|
// and embedded devices)
|
||||||
kAgcAdaptiveDigital,
|
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
|
// is predictable
|
||||||
kAgcFixedDigital
|
kAgcFixedDigital
|
||||||
};
|
};
|
||||||
|
@ -116,8 +116,8 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
// #define DIRECTDRAW_RENDERING
|
// #define DIRECTDRAW_RENDERING
|
||||||
#define DIRECT3D9_RENDERING // Requires DirectX 9.
|
#define DIRECT3D9_RENDERING // Requires DirectX 9.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -125,8 +125,8 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
|
#if defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
|
||||||
// #define CARBON_RENDERING
|
// #define CARBON_RENDERING
|
||||||
#define COCOA_RENDERING
|
#define COCOA_RENDERING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -134,7 +134,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(MAC_IPHONE)
|
#if defined(MAC_IPHONE)
|
||||||
#define EAGL_RENDERING
|
#define EAGL_RENDERING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
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) {
|
VoEAudioProcessing* VoEAudioProcessing::GetInterface(VoiceEngine* voiceEngine) {
|
||||||
#ifndef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
|
#ifndef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -34,9 +40,8 @@ VoEAudioProcessing* VoEAudioProcessing::GetInterface(VoiceEngine* voiceEngine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
|
#ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
|
||||||
VoEAudioProcessingImpl::VoEAudioProcessingImpl():
|
VoEAudioProcessingImpl::VoEAudioProcessingImpl()
|
||||||
_isAecMode(static_cast<int>(WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE) == EcAec ?
|
: _isAecMode(kDefaultEcMode == kEcAec ? true : false) {
|
||||||
true : false) {
|
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"VoEAudioProcessingImpl::VoEAudioProcessingImpl() - ctor");
|
"VoEAudioProcessingImpl::VoEAudioProcessingImpl() - ctor");
|
||||||
}
|
}
|
||||||
|
@ -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
|
* 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
|
* 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
|
#ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|
||||||
#define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|
#define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|
||||||
|
|
||||||
|
#include "common_types.h"
|
||||||
#include "engine_configurations.h"
|
#include "engine_configurations.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -48,10 +49,6 @@ enum { kMinTelephoneEventAttenuation = 0 }; // 0 dBm0
|
|||||||
enum { kMaxTelephoneEventAttenuation = 36 }; // -36 dBm0
|
enum { kMaxTelephoneEventAttenuation = 36 }; // -36 dBm0
|
||||||
enum { kMinTelephoneEventSeparationMs = 100 }; // Min delta time between two
|
enum { kMinTelephoneEventSeparationMs = 100 }; // Min delta time between two
|
||||||
// telephone events
|
// telephone events
|
||||||
|
|
||||||
enum { EcAec = 0 }; // AEC mode
|
|
||||||
enum { EcAecm = 1 }; // AECM mode
|
|
||||||
|
|
||||||
enum { kVoiceEngineMaxIpPacketSizeBytes = 1500 }; // assumes Ethernet
|
enum { kVoiceEngineMaxIpPacketSizeBytes = 1500 }; // assumes Ethernet
|
||||||
|
|
||||||
enum { kVoiceEngineMaxModuleVersionSize = 960 };
|
enum { kVoiceEngineMaxModuleVersionSize = 960 };
|
||||||
@ -154,8 +151,6 @@ enum { kVoiceEngineMaxRtpExtensionId = 14 };
|
|||||||
// AudioProcessing NS moderate suppression
|
// AudioProcessing NS moderate suppression
|
||||||
#define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE GainControl::kAdaptiveAnalog
|
#define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE GainControl::kAdaptiveAnalog
|
||||||
// AudioProcessing AGC analog digital combined
|
// 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
|
#define WEBRTC_VOICE_ENGINE_RX_AGC_DEFAULT_MODE GainControl::kAdaptiveDigital
|
||||||
// AudioProcessing AGC mode
|
// AudioProcessing AGC mode
|
||||||
#define WEBRTC_VOICE_ENGINE_RX_NS_DEFAULT_MODE NoiseSuppression::kModerate
|
#define WEBRTC_VOICE_ENGINE_RX_NS_DEFAULT_MODE NoiseSuppression::kModerate
|
||||||
@ -406,12 +401,10 @@ namespace webrtc
|
|||||||
// Default audio processing modes
|
// Default audio processing modes
|
||||||
#undef WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE
|
#undef WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE
|
||||||
#undef WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE
|
#undef WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE
|
||||||
#undef WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE
|
|
||||||
#define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE \
|
#define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE \
|
||||||
NoiseSuppression::kModerate
|
NoiseSuppression::kModerate
|
||||||
#define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \
|
#define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \
|
||||||
GainControl::kAdaptiveDigital
|
GainControl::kAdaptiveDigital
|
||||||
#define WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE EcAecm
|
|
||||||
|
|
||||||
#define ANDROID_NOT_SUPPORTED(stat) \
|
#define ANDROID_NOT_SUPPORTED(stat) \
|
||||||
stat.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \
|
stat.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \
|
||||||
@ -555,12 +548,10 @@ namespace webrtc
|
|||||||
|
|
||||||
#undef WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE
|
#undef WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE
|
||||||
#undef WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE
|
#undef WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE
|
||||||
#undef WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE
|
|
||||||
#define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE \
|
#define WEBRTC_VOICE_ENGINE_NS_DEFAULT_MODE \
|
||||||
NoiseSuppression::kModerate
|
NoiseSuppression::kModerate
|
||||||
#define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \
|
#define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \
|
||||||
GainControl::kAdaptiveDigital
|
GainControl::kAdaptiveDigital
|
||||||
#define WEBRTC_VOICE_ENGINE_EC_DEFAULT_MODE EcAecm
|
|
||||||
|
|
||||||
#define IPHONE_NOT_SUPPORTED() \
|
#define IPHONE_NOT_SUPPORTED() \
|
||||||
_engineStatistics.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \
|
_engineStatistics.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user