diff --git a/pjmedia/build/pjmedia.vcproj b/pjmedia/build/pjmedia.vcproj
index 32648e9df..7c020185e 100644
--- a/pjmedia/build/pjmedia.vcproj
+++ b/pjmedia/build/pjmedia.vcproj
@@ -10,15 +10,15 @@
-
+
@@ -60,7 +60,7 @@
/>
@@ -93,12 +93,11 @@
/>
@@ -133,6 +132,7 @@
/>
+
+
@@ -190,7 +198,7 @@
/>
+
+
@@ -308,6 +322,7 @@
/>
+
+
+
+
@@ -442,12 +472,11 @@
/>
@@ -482,6 +511,7 @@
/>
+
+
@@ -539,6 +577,7 @@
/>
+
+
@@ -655,6 +700,7 @@
/>
+
+
@@ -713,6 +766,7 @@
/>
+
+
@@ -770,7 +832,6 @@
/>
-
-
@@ -821,7 +874,7 @@
@@ -836,7 +889,7 @@
/>
@@ -887,7 +940,7 @@
@@ -902,7 +955,7 @@
/>
@@ -968,7 +1021,6 @@
/>
-
-
@@ -1019,7 +1063,7 @@
@@ -1061,9 +1105,9 @@
/>
@@ -1085,7 +1129,7 @@
@@ -1127,11 +1171,12 @@
/>
@@ -1166,7 +1211,6 @@
/>
-
-
-
-
-
-
@@ -1364,7 +1388,6 @@
/>
-
-
-
-
-
@@ -1496,7 +1505,6 @@
/>
-
-
@@ -1613,7 +1613,7 @@
@@ -1679,7 +1679,7 @@
@@ -1745,7 +1745,7 @@
@@ -1811,7 +1811,7 @@
@@ -1877,7 +1877,7 @@
@@ -1943,7 +1943,7 @@
@@ -2009,7 +2009,7 @@
@@ -2075,7 +2075,7 @@
@@ -2141,7 +2141,7 @@
@@ -2207,7 +2207,7 @@
@@ -2273,7 +2273,7 @@
@@ -2339,7 +2339,7 @@
@@ -2405,7 +2405,7 @@
@@ -2471,7 +2471,7 @@
@@ -2537,7 +2537,7 @@
@@ -2603,7 +2603,7 @@
@@ -2669,7 +2669,7 @@
@@ -2735,7 +2735,7 @@
@@ -2801,7 +2801,7 @@
@@ -2867,7 +2867,7 @@
@@ -2933,7 +2933,7 @@
@@ -2999,7 +2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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/third_party/build/webrtc/notes.txt b/third_party/build/webrtc/notes.txt
index dc47aeba1..393753fc7 100644
--- a/third_party/build/webrtc/notes.txt
+++ b/third_party/build/webrtc/notes.txt
@@ -1,2 +1,8 @@
Notes:
* Source code for webrtc from https://chromium.googlesource.com/external/webrtc circa Oct 2015.
+
+Modification to original source to build on VS2005 which don't support C99 syntax
+(declare all variables at the beginning of a scope block).
+- modules\audio_processing\aec\aec_core.c
+- modules\audio_processing\ns\ns_core.c
+- modules\audio_processing\ns\nsx_core.c
\ No newline at end of file
diff --git a/third_party/webrtc/src/webrtc/modules/audio_processing/aec/aec_core.c b/third_party/webrtc/src/webrtc/modules/audio_processing/aec/aec_core.c
index b2162ac0b..9d54b62fc 100644
--- a/third_party/webrtc/src/webrtc/modules/audio_processing/aec/aec_core.c
+++ b/third_party/webrtc/src/webrtc/modules/audio_processing/aec/aec_core.c
@@ -1201,12 +1201,12 @@ static void ProcessBlock(AecCore* aec) {
float output[PART_LEN];
float outputH[NUM_HIGH_BANDS_MAX][PART_LEN];
float* outputH_ptr[NUM_HIGH_BANDS_MAX];
+ float* xf_ptr = NULL;
+
for (i = 0; i < NUM_HIGH_BANDS_MAX; ++i) {
outputH_ptr[i] = outputH[i];
}
- float* xf_ptr = NULL;
-
// Concatenate old and new nearend blocks.
for (i = 0; i < aec->num_bands - 1; ++i) {
WebRtc_ReadBuffer(aec->nearFrBufH[i],
diff --git a/third_party/webrtc/src/webrtc/modules/audio_processing/ns/ns_core.c b/third_party/webrtc/src/webrtc/modules/audio_processing/ns/ns_core.c
index 1d6091400..f3e6a1053 100644
--- a/third_party/webrtc/src/webrtc/modules/audio_processing/ns/ns_core.c
+++ b/third_party/webrtc/src/webrtc/modules/audio_processing/ns/ns_core.c
@@ -1204,14 +1204,14 @@ void WebRtcNs_ProcessCore(NoiseSuppressionC* self,
float gainTimeDomainHB = 1.0;
float avgProbSpeechHB, avgProbSpeechHBTmp, avgFilterGainHB, gainModHB;
float sumMagnAnalyze, sumMagnProcess;
+ const float* const* speechFrameHB = NULL;
+ float* const* outFrameHB = NULL;
+ size_t num_high_bands = 0;
// Check that initiation has been done.
assert(self->initFlag == 1);
assert((num_bands - 1) <= NUM_HIGH_BANDS_MAX);
- const float* const* speechFrameHB = NULL;
- float* const* outFrameHB = NULL;
- size_t num_high_bands = 0;
if (num_bands > 1) {
speechFrameHB = &speechFrame[1];
outFrameHB = &outFrame[1];
diff --git a/third_party/webrtc/src/webrtc/modules/audio_processing/ns/nsx_core.c b/third_party/webrtc/src/webrtc/modules/audio_processing/ns/nsx_core.c
index ed6125aa7..7e2a94e03 100644
--- a/third_party/webrtc/src/webrtc/modules/audio_processing/ns/nsx_core.c
+++ b/third_party/webrtc/src/webrtc/modules/audio_processing/ns/nsx_core.c
@@ -1537,6 +1537,9 @@ void WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst,
int norm32no1, norm32no2;
int flag, sign;
int q_domain_to_use = 0;
+ const short* const* speechFrameHB = NULL;
+ short* const* outFrameHB = NULL;
+ size_t num_high_bands = 0;
// Code for ARMv7-Neon platform assumes the following:
assert(inst->anaLen > 0);
@@ -1558,9 +1561,6 @@ void WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst,
assert(inst->initFlag == 1);
assert((num_bands - 1) <= NUM_HIGH_BANDS_MAX);
- const short* const* speechFrameHB = NULL;
- short* const* outFrameHB = NULL;
- size_t num_high_bands = 0;
if (num_bands > 1) {
speechFrameHB = &speechFrame[1];
outFrameHB = &outFrame[1];