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 |
| 11 /* | 11 /* |
| 12 * This file contains common constants for VoiceEngine, as well as | 12 * This file contains common constants for VoiceEngine, as well as |
| 13 * platform specific settings. | 13 * platform specific settings. |
| 14 */ | 14 */ |
| 15 | 15 |
| 16 #ifndef VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_ | 16 #ifndef VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_ |
| 17 #define VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_ | 17 #define VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_ |
| 18 | 18 |
| 19 #include "common_types.h" // NOLINT(build/include) | |
| 20 #include "modules/audio_processing/include/audio_processing.h" | 19 #include "modules/audio_processing/include/audio_processing.h" |
| 21 #include "typedefs.h" // NOLINT(build/include) | |
| 22 | 20 |
| 23 namespace webrtc { | 21 namespace webrtc { |
| 24 | 22 |
| 25 // VolumeControl | 23 // VolumeControl |
| 26 enum { kMinVolumeLevel = 0 }; | 24 enum { kMinVolumeLevel = 0 }; |
| 27 enum { kMaxVolumeLevel = 255 }; | 25 enum { kMaxVolumeLevel = 255 }; |
| 28 // Min scale factor for per-channel volume scaling | |
|
hlundin-webrtc
2017/09/25 06:36:49
Is this related?
| |
| 29 const float kMinOutputVolumeScaling = 0.0f; | |
| 30 // Max scale factor for per-channel volume scaling | |
| 31 const float kMaxOutputVolumeScaling = 10.0f; | |
| 32 // Min scale factor for output volume panning | |
| 33 const float kMinOutputVolumePanning = 0.0f; | |
| 34 // Max scale factor for output volume panning | |
| 35 const float kMaxOutputVolumePanning = 1.0f; | |
| 36 | 26 |
| 37 // Audio processing | 27 // Audio processing |
| 38 const NoiseSuppression::Level kDefaultNsMode = NoiseSuppression::kModerate; | 28 const NoiseSuppression::Level kDefaultNsMode = NoiseSuppression::kModerate; |
| 39 const GainControl::Mode kDefaultAgcMode = | 29 const GainControl::Mode kDefaultAgcMode = |
| 40 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) | 30 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) |
| 41 GainControl::kAdaptiveDigital; | 31 GainControl::kAdaptiveDigital; |
| 42 #else | 32 #else |
| 43 GainControl::kAdaptiveAnalog; | 33 GainControl::kAdaptiveAnalog; |
| 44 #endif | 34 #endif |
| 45 const bool kDefaultAgcState = | 35 const bool kDefaultAgcState = |
| 46 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) | 36 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) |
| 47 false; | 37 false; |
| 48 #else | 38 #else |
| 49 true; | 39 true; |
| 50 #endif | 40 #endif |
| 51 const GainControl::Mode kDefaultRxAgcMode = GainControl::kAdaptiveDigital; | |
|
hlundin-webrtc
2017/09/25 06:36:49
And this?
| |
| 52 | 41 |
| 53 // VideoSync | 42 // VideoSync |
| 54 // Lowest minimum playout delay | 43 // Lowest minimum playout delay |
| 55 enum { kVoiceEngineMinMinPlayoutDelayMs = 0 }; | 44 enum { kVoiceEngineMinMinPlayoutDelayMs = 0 }; |
| 56 // Highest minimum playout delay | 45 // Highest minimum playout delay |
| 57 enum { kVoiceEngineMaxMinPlayoutDelayMs = 10000 }; | 46 enum { kVoiceEngineMaxMinPlayoutDelayMs = 10000 }; |
| 58 | 47 |
| 59 } // namespace webrtc | 48 } // namespace webrtc |
| 60 | 49 |
| 61 namespace webrtc { | 50 namespace webrtc { |
| 62 | 51 |
| 63 inline int VoEId(int veId, int chId) { | 52 inline int VoEId(int veId, int chId) { |
| 64 if (chId == -1) { | 53 if (chId == -1) { |
| 65 const int dummyChannel(99); | 54 const int dummyChannel(99); |
| 66 return (int)((veId << 16) + dummyChannel); | 55 return (int)((veId << 16) + dummyChannel); |
| 67 } | 56 } |
| 68 return (int)((veId << 16) + chId); | 57 return (int)((veId << 16) + chId); |
| 69 } | 58 } |
| 70 | 59 |
| 71 inline int VoEModuleId(int veId, int chId) { | |
| 72 return (int)((veId << 16) + chId); | |
| 73 } | |
| 74 | |
| 75 // Convert module ID to internal VoE channel ID | |
| 76 inline int VoEChannelId(int moduleId) { | |
| 77 return (int)(moduleId & 0xffff); | |
| 78 } | |
| 79 | |
| 80 } // namespace webrtc | 60 } // namespace webrtc |
| 81 | 61 |
| 82 #if defined(_WIN32) | 62 #if defined(_WIN32) |
| 83 #define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE \ | 63 #define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE \ |
| 84 AudioDeviceModule::kDefaultCommunicationDevice | 64 AudioDeviceModule::kDefaultCommunicationDevice |
| 85 #else | 65 #else |
| 86 #define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0 | 66 #define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0 |
| 87 #endif // #if (defined(_WIN32) | 67 #endif // #if (defined(_WIN32) |
| 88 | 68 |
| 89 #endif // VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_ | 69 #endif // VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_ |
| OLD | NEW |