2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-03-08 17:54:24 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This file contains common constants for VoiceEngine, as well as
|
|
|
|
|
* platform specific settings and include files.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|
|
|
|
|
#define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|
|
|
|
|
|
2013-02-05 21:23:39 +00:00
|
|
|
#include "webrtc/common_types.h"
|
2013-03-05 01:12:49 +00:00
|
|
|
#include "webrtc/modules/audio_processing/include/audio_processing.h"
|
2016-10-07 07:07:28 +02:00
|
|
|
#include "webrtc/voice_engine_configurations.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
// Enumerators
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
2013-02-01 23:42:44 +00:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
Consolidate audio conversion from Channel and TransmitMixer.
Replace the two versions with a single DownConvertToCodecFormat. As
mentioned in comments, this could be further consolidated with
RemixAndResample but we should write a full audio converter class in
that case.
Along the way:
- Fix the bug present in Channel::Demultiplex with mono input and a
stereo codec.
- Remove the 32 kHz max from the OnDataAvailable path. This avoids a
48 -> 32 -> 48 conversion when VoE is passed 48 kHz audio; instead we
get a straight pass-through to ACM. The 32 kHz conversion is still
needed in the RecordedDataIsAvailable path until APM natively supports
48 kHz.
- Merge resampler improvements from ACM1 to ACM2. This allows ACM to
handle 44.1 kHz audio passed to VoE and was originally done here:
https://webrtc-codereview.appspot.com/1590004
- Reuse the RemixAndResample unit tests for DownConvertToCodecFormat.
- Remove unused functions from utility.cc.
BUG=3155,3000,b/12867572
TESTED=voe_cmd_test using both the OnDataAvailable and
RecordedDataIsAvailable paths, with a captured audio format of all
combinations of {44.1,48} kHz and {1,2} channels, running through all
codecs, and finally using both ACM1 and ACM2.
R=henrika@webrtc.org, turaj@webrtc.org, xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/11019005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5843 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-03 21:56:01 +00:00
|
|
|
// Internal buffer size required for mono audio, based on the highest sample
|
|
|
|
|
// rate voice engine supports (10 ms of audio at 192 kHz).
|
Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.
This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.
This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002
The change is being landed as TBR to all the folks who reviewed the above.
BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher
Review URL: https://codereview.webrtc.org/1230503003 .
Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 14:52:23 -07:00
|
|
|
static const size_t kMaxMonoDataSizeSamples = 1920;
|
Consolidate audio conversion from Channel and TransmitMixer.
Replace the two versions with a single DownConvertToCodecFormat. As
mentioned in comments, this could be further consolidated with
RemixAndResample but we should write a full audio converter class in
that case.
Along the way:
- Fix the bug present in Channel::Demultiplex with mono input and a
stereo codec.
- Remove the 32 kHz max from the OnDataAvailable path. This avoids a
48 -> 32 -> 48 conversion when VoE is passed 48 kHz audio; instead we
get a straight pass-through to ACM. The 32 kHz conversion is still
needed in the RecordedDataIsAvailable path until APM natively supports
48 kHz.
- Merge resampler improvements from ACM1 to ACM2. This allows ACM to
handle 44.1 kHz audio passed to VoE and was originally done here:
https://webrtc-codereview.appspot.com/1590004
- Reuse the RemixAndResample unit tests for DownConvertToCodecFormat.
- Remove unused functions from utility.cc.
BUG=3155,3000,b/12867572
TESTED=voe_cmd_test using both the OnDataAvailable and
RecordedDataIsAvailable paths, with a captured audio format of all
combinations of {44.1,48} kHz and {1,2} channels, running through all
codecs, and finally using both ACM1 and ACM2.
R=henrika@webrtc.org, turaj@webrtc.org, xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/11019005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5843 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-03 21:56:01 +00:00
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
// VolumeControl
|
|
|
|
|
enum { kMinVolumeLevel = 0 };
|
|
|
|
|
enum { kMaxVolumeLevel = 255 };
|
|
|
|
|
// Min scale factor for per-channel volume scaling
|
|
|
|
|
const float kMinOutputVolumeScaling = 0.0f;
|
|
|
|
|
// Max scale factor for per-channel volume scaling
|
|
|
|
|
const float kMaxOutputVolumeScaling = 10.0f;
|
|
|
|
|
// Min scale factor for output volume panning
|
|
|
|
|
const float kMinOutputVolumePanning = 0.0f;
|
|
|
|
|
// Max scale factor for output volume panning
|
|
|
|
|
const float kMaxOutputVolumePanning = 1.0f;
|
|
|
|
|
|
|
|
|
|
// DTMF
|
2015-05-04 14:15:32 +02:00
|
|
|
enum { kMinDtmfEventCode = 0 }; // DTMF digit "0"
|
|
|
|
|
enum { kMaxDtmfEventCode = 15 }; // DTMF digit "D"
|
|
|
|
|
enum { kMinTelephoneEventCode = 0 }; // RFC4733 (Section 2.3.1)
|
|
|
|
|
enum { kMaxTelephoneEventCode = 255 }; // RFC4733 (Section 2.3.1)
|
2011-07-07 08:21:25 +00:00
|
|
|
enum { kMinTelephoneEventDuration = 100 };
|
2015-05-04 14:15:32 +02:00
|
|
|
enum { kMaxTelephoneEventDuration = 60000 }; // Actual limit is 2^16
|
|
|
|
|
enum { kMinTelephoneEventAttenuation = 0 }; // 0 dBm0
|
|
|
|
|
enum { kMaxTelephoneEventAttenuation = 36 }; // -36 dBm0
|
|
|
|
|
enum { kMinTelephoneEventSeparationMs = 100 }; // Min delta time between two
|
|
|
|
|
// telephone events
|
|
|
|
|
enum { kVoiceEngineMaxIpPacketSizeBytes = 1500 }; // assumes Ethernet
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
enum { kVoiceEngineMaxModuleVersionSize = 960 };
|
|
|
|
|
|
|
|
|
|
// Audio processing
|
2013-03-05 01:12:49 +00:00
|
|
|
const NoiseSuppression::Level kDefaultNsMode = NoiseSuppression::kModerate;
|
|
|
|
|
const GainControl::Mode kDefaultAgcMode =
|
|
|
|
|
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
|
2015-05-04 14:15:32 +02:00
|
|
|
GainControl::kAdaptiveDigital;
|
2013-03-05 01:12:49 +00:00
|
|
|
#else
|
2015-05-04 14:15:32 +02:00
|
|
|
GainControl::kAdaptiveAnalog;
|
2013-03-05 01:12:49 +00:00
|
|
|
#endif
|
|
|
|
|
const bool kDefaultAgcState =
|
|
|
|
|
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
|
2015-05-04 14:15:32 +02:00
|
|
|
false;
|
2013-03-05 01:12:49 +00:00
|
|
|
#else
|
2015-05-04 14:15:32 +02:00
|
|
|
true;
|
2013-03-05 01:12:49 +00:00
|
|
|
#endif
|
2013-10-04 17:54:09 +00:00
|
|
|
const GainControl::Mode kDefaultRxAgcMode = GainControl::kAdaptiveDigital;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// Codec
|
|
|
|
|
// Min init target rate for iSAC-wb
|
|
|
|
|
enum { kVoiceEngineMinIsacInitTargetRateBpsWb = 10000 };
|
|
|
|
|
// Max init target rate for iSAC-wb
|
|
|
|
|
enum { kVoiceEngineMaxIsacInitTargetRateBpsWb = 32000 };
|
|
|
|
|
// Min init target rate for iSAC-swb
|
|
|
|
|
enum { kVoiceEngineMinIsacInitTargetRateBpsSwb = 10000 };
|
|
|
|
|
// Max init target rate for iSAC-swb
|
|
|
|
|
enum { kVoiceEngineMaxIsacInitTargetRateBpsSwb = 56000 };
|
|
|
|
|
// Lowest max rate for iSAC-wb
|
|
|
|
|
enum { kVoiceEngineMinIsacMaxRateBpsWb = 32000 };
|
|
|
|
|
// Highest max rate for iSAC-wb
|
|
|
|
|
enum { kVoiceEngineMaxIsacMaxRateBpsWb = 53400 };
|
|
|
|
|
// Lowest max rate for iSAC-swb
|
|
|
|
|
enum { kVoiceEngineMinIsacMaxRateBpsSwb = 32000 };
|
|
|
|
|
// Highest max rate for iSAC-swb
|
|
|
|
|
enum { kVoiceEngineMaxIsacMaxRateBpsSwb = 107000 };
|
|
|
|
|
// Lowest max payload size for iSAC-wb
|
|
|
|
|
enum { kVoiceEngineMinIsacMaxPayloadSizeBytesWb = 120 };
|
|
|
|
|
// Highest max payload size for iSAC-wb
|
|
|
|
|
enum { kVoiceEngineMaxIsacMaxPayloadSizeBytesWb = 400 };
|
|
|
|
|
// Lowest max payload size for iSAC-swb
|
|
|
|
|
enum { kVoiceEngineMinIsacMaxPayloadSizeBytesSwb = 120 };
|
|
|
|
|
// Highest max payload size for iSAC-swb
|
|
|
|
|
enum { kVoiceEngineMaxIsacMaxPayloadSizeBytesSwb = 600 };
|
|
|
|
|
|
|
|
|
|
// VideoSync
|
|
|
|
|
// Lowest minimum playout delay
|
|
|
|
|
enum { kVoiceEngineMinMinPlayoutDelayMs = 0 };
|
|
|
|
|
// Highest minimum playout delay
|
2013-01-17 22:25:49 +00:00
|
|
|
enum { kVoiceEngineMaxMinPlayoutDelayMs = 10000 };
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// Network
|
|
|
|
|
// Min packet-timeout time for received RTP packets
|
|
|
|
|
enum { kVoiceEngineMinPacketTimeoutSec = 1 };
|
|
|
|
|
// Max packet-timeout time for received RTP packets
|
|
|
|
|
enum { kVoiceEngineMaxPacketTimeoutSec = 150 };
|
|
|
|
|
// Min sample time for dead-or-alive detection
|
|
|
|
|
enum { kVoiceEngineMinSampleTimeSec = 1 };
|
|
|
|
|
// Max sample time for dead-or-alive detection
|
|
|
|
|
enum { kVoiceEngineMaxSampleTimeSec = 150 };
|
|
|
|
|
|
|
|
|
|
// RTP/RTCP
|
|
|
|
|
// Min 4-bit ID for RTP extension (see section 4.2 in RFC 5285)
|
|
|
|
|
enum { kVoiceEngineMinRtpExtensionId = 1 };
|
|
|
|
|
// Max 4-bit ID for RTP extension
|
|
|
|
|
enum { kVoiceEngineMaxRtpExtensionId = 14 };
|
|
|
|
|
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
// Macros
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
#define NOT_SUPPORTED(stat) \
|
|
|
|
|
LOG_F(LS_ERROR) << "not supported"; \
|
|
|
|
|
stat.SetLastError(VE_FUNC_NOT_SUPPORTED); \
|
2013-02-05 21:23:39 +00:00
|
|
|
return -1;
|
|
|
|
|
|
2015-10-30 16:08:48 -07:00
|
|
|
#if (!defined(NDEBUG) && defined(_WIN32) && (_MSC_VER >= 1400))
|
2015-05-04 14:15:32 +02:00
|
|
|
#include <windows.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#define DEBUG_PRINT(...) \
|
|
|
|
|
{ \
|
|
|
|
|
char msg[256]; \
|
|
|
|
|
sprintf(msg, __VA_ARGS__); \
|
|
|
|
|
OutputDebugStringA(msg); \
|
2011-07-07 08:21:25 +00:00
|
|
|
}
|
|
|
|
|
#else
|
2015-05-04 14:15:32 +02:00
|
|
|
// special fix for visual 2003
|
|
|
|
|
#define DEBUG_PRINT(exp) ((void)0)
|
2015-10-30 16:08:48 -07:00
|
|
|
#endif // !defined(NDEBUG) && defined(_WIN32)
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
#define CHECK_CHANNEL(channel) \
|
|
|
|
|
if (CheckChannel(channel) == -1) \
|
|
|
|
|
return -1;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
// Inline functions
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
inline int VoEId(int veId, int chId) {
|
|
|
|
|
if (chId == -1) {
|
|
|
|
|
const int dummyChannel(99);
|
|
|
|
|
return (int)((veId << 16) + dummyChannel);
|
|
|
|
|
}
|
|
|
|
|
return (int)((veId << 16) + chId);
|
2011-07-07 08:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
inline int VoEModuleId(int veId, int chId) {
|
|
|
|
|
return (int)((veId << 16) + chId);
|
2011-07-07 08:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Convert module ID to internal VoE channel ID
|
2015-05-04 14:15:32 +02:00
|
|
|
inline int VoEChannelId(int moduleId) {
|
|
|
|
|
return (int)(moduleId & 0xffff);
|
2011-07-07 08:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
// Platform settings
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// *** WINDOWS ***
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
#include <windows.h>
|
2013-09-09 17:50:10 +00:00
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
#pragma comment(lib, "winmm.lib")
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
#ifndef WEBRTC_EXTERNAL_TRANSPORT
|
|
|
|
|
#pragma comment(lib, "ws2_32.lib")
|
|
|
|
|
#endif
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
// Defines
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// Default device for Windows PC
|
2015-05-04 14:15:32 +02:00
|
|
|
#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE \
|
|
|
|
|
AudioDeviceModule::kDefaultCommunicationDevice
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
#endif // #if (defined(_WIN32)
|
|
|
|
|
|
|
|
|
|
// *** LINUX ***
|
|
|
|
|
|
|
|
|
|
#ifdef WEBRTC_LINUX
|
|
|
|
|
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
#include <netinet/in.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <pthread.h>
|
|
|
|
|
#include <sys/socket.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <sys/types.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#ifndef QNX
|
2015-05-04 14:15:32 +02:00
|
|
|
#include <linux/net.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#ifndef ANDROID
|
2015-05-04 14:15:32 +02:00
|
|
|
#include <sys/soundcard.h>
|
|
|
|
|
#endif // ANDROID
|
|
|
|
|
#endif // QNX
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <errno.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
#include <sched.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
#include <sys/stat.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <sys/time.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <time.h>
|
|
|
|
|
#include <unistd.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
#define DWORD unsigned long int
|
|
|
|
|
#define WINAPI
|
|
|
|
|
#define LPVOID void *
|
|
|
|
|
#define FALSE 0
|
|
|
|
|
#define TRUE 1
|
|
|
|
|
#define UINT unsigned int
|
|
|
|
|
#define UCHAR unsigned char
|
|
|
|
|
#define TCHAR char
|
|
|
|
|
#ifdef QNX
|
|
|
|
|
#define _stricmp stricmp
|
|
|
|
|
#else
|
|
|
|
|
#define _stricmp strcasecmp
|
|
|
|
|
#endif
|
|
|
|
|
#define GetLastError() errno
|
|
|
|
|
#define WSAGetLastError() errno
|
2015-05-04 14:15:32 +02:00
|
|
|
#define LPCTSTR const char *
|
|
|
|
|
#define LPCSTR const char *
|
2011-07-07 08:21:25 +00:00
|
|
|
#define wsprintf sprintf
|
|
|
|
|
#define TEXT(a) a
|
|
|
|
|
#define _ftprintf fprintf
|
|
|
|
|
#define _tcslen strlen
|
|
|
|
|
#define FAR
|
|
|
|
|
#define __cdecl
|
|
|
|
|
#define LPSOCKADDR struct sockaddr *
|
|
|
|
|
|
|
|
|
|
// Default device for Linux and Android
|
|
|
|
|
#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0
|
|
|
|
|
|
|
|
|
|
#endif // #ifdef WEBRTC_LINUX
|
|
|
|
|
|
|
|
|
|
// *** WEBRTC_MAC ***
|
|
|
|
|
// including iPhone
|
|
|
|
|
|
|
|
|
|
#ifdef WEBRTC_MAC
|
|
|
|
|
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <AudioUnit/AudioUnit.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <fcntl.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <netinet/in.h>
|
|
|
|
|
#include <pthread.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <sched.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
#include <sys/stat.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <sys/time.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <sys/types.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <time.h>
|
2013-05-21 13:52:32 +00:00
|
|
|
#include <unistd.h>
|
2012-09-11 17:25:46 +00:00
|
|
|
#if !defined(WEBRTC_IOS)
|
2015-05-04 14:15:32 +02:00
|
|
|
#include <CoreServices/CoreServices.h>
|
|
|
|
|
#include <CoreAudio/CoreAudio.h>
|
|
|
|
|
#include <AudioToolbox/DefaultAudioOutput.h>
|
|
|
|
|
#include <AudioToolbox/AudioConverter.h>
|
|
|
|
|
#include <CoreAudio/HostTime.h>
|
2011-07-07 08:21:25 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define DWORD unsigned long int
|
|
|
|
|
#define WINAPI
|
|
|
|
|
#define LPVOID void *
|
|
|
|
|
#define FALSE 0
|
|
|
|
|
#define TRUE 1
|
|
|
|
|
#define SOCKADDR_IN struct sockaddr_in
|
|
|
|
|
#define UINT unsigned int
|
|
|
|
|
#define UCHAR unsigned char
|
|
|
|
|
#define TCHAR char
|
|
|
|
|
#define _stricmp strcasecmp
|
|
|
|
|
#define GetLastError() errno
|
|
|
|
|
#define WSAGetLastError() errno
|
2015-05-04 14:15:32 +02:00
|
|
|
#define LPCTSTR const char *
|
2011-07-07 08:21:25 +00:00
|
|
|
#define wsprintf sprintf
|
|
|
|
|
#define TEXT(a) a
|
|
|
|
|
#define _ftprintf fprintf
|
|
|
|
|
#define _tcslen strlen
|
|
|
|
|
#define FAR
|
|
|
|
|
#define __cdecl
|
|
|
|
|
#define LPSOCKADDR struct sockaddr *
|
2015-05-04 14:15:32 +02:00
|
|
|
#define LPCSTR const char *
|
2011-07-07 08:21:25 +00:00
|
|
|
#define ULONG unsigned long
|
|
|
|
|
|
|
|
|
|
// Default device for Mac and iPhone
|
|
|
|
|
#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0
|
|
|
|
|
#endif // #ifdef WEBRTC_MAC
|
|
|
|
|
|
2015-05-04 14:15:32 +02:00
|
|
|
#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|