blob: 43976620570666f6af19ff7821f29987b4d68913 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
andrew@webrtc.org80124742012-03-08 17:54:24 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11/*
12 * This file contains common constants for VoiceEngine, as well as
solenberg06f240b2017-02-13 04:42:52 -080013 * platform specific settings.
niklase@google.com470e71d2011-07-07 08:21:25 +000014 */
15
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020016#ifndef VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_
17#define VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000018
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020019#include "modules/audio_processing/include/audio_processing.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000020
andrew@webrtc.org4a6f62d2013-02-01 23:42:44 +000021namespace webrtc {
22
niklase@google.com470e71d2011-07-07 08:21:25 +000023// VolumeControl
24enum { kMinVolumeLevel = 0 };
25enum { kMaxVolumeLevel = 255 };
niklase@google.com470e71d2011-07-07 08:21:25 +000026
niklase@google.com470e71d2011-07-07 08:21:25 +000027// Audio processing
andrew@webrtc.orgf0a90c32013-03-05 01:12:49 +000028const NoiseSuppression::Level kDefaultNsMode = NoiseSuppression::kModerate;
29const GainControl::Mode kDefaultAgcMode =
30#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
Jelena Marusic0d266052015-05-04 14:15:32 +020031 GainControl::kAdaptiveDigital;
andrew@webrtc.orgf0a90c32013-03-05 01:12:49 +000032#else
Jelena Marusic0d266052015-05-04 14:15:32 +020033 GainControl::kAdaptiveAnalog;
andrew@webrtc.orgf0a90c32013-03-05 01:12:49 +000034#endif
35const bool kDefaultAgcState =
36#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
Jelena Marusic0d266052015-05-04 14:15:32 +020037 false;
andrew@webrtc.orgf0a90c32013-03-05 01:12:49 +000038#else
Jelena Marusic0d266052015-05-04 14:15:32 +020039 true;
andrew@webrtc.orgf0a90c32013-03-05 01:12:49 +000040#endif
niklase@google.com470e71d2011-07-07 08:21:25 +000041
niklase@google.com470e71d2011-07-07 08:21:25 +000042// VideoSync
43// Lowest minimum playout delay
44enum { kVoiceEngineMinMinPlayoutDelayMs = 0 };
45// Highest minimum playout delay
niklas.enbom@webrtc.org218c5422013-01-17 22:25:49 +000046enum { kVoiceEngineMaxMinPlayoutDelayMs = 10000 };
niklase@google.com470e71d2011-07-07 08:21:25 +000047
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000048} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000049
Jelena Marusic0d266052015-05-04 14:15:32 +020050namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000051
Jelena Marusic0d266052015-05-04 14:15:32 +020052inline int VoEId(int veId, int chId) {
53 if (chId == -1) {
54 const int dummyChannel(99);
55 return (int)((veId << 16) + dummyChannel);
56 }
57 return (int)((veId << 16) + chId);
niklase@google.com470e71d2011-07-07 08:21:25 +000058}
59
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000060} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000061
niklase@google.com470e71d2011-07-07 08:21:25 +000062#if defined(_WIN32)
Jelena Marusic0d266052015-05-04 14:15:32 +020063#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE \
64 AudioDeviceModule::kDefaultCommunicationDevice
niklase@google.com470e71d2011-07-07 08:21:25 +000065#else
niklase@google.com470e71d2011-07-07 08:21:25 +000066#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0
solenberg06f240b2017-02-13 04:42:52 -080067#endif // #if (defined(_WIN32)
niklase@google.com470e71d2011-07-07 08:21:25 +000068
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020069#endif // VOICE_ENGINE_VOICE_ENGINE_DEFINES_H_