]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
windows build cleanup
authorMichael Jerris <mike@jerris.com>
Wed, 30 Jul 2008 05:32:51 +0000 (05:32 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 30 Jul 2008 05:32:51 +0000 (05:32 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9206 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/win32/libmp3lame/libmp3lame_vc7.vcproj
libs/win32/libogg/libogg.2008.vcproj
libs/win32/libshout/libshout.vcproj
src/include/switch_core.h
src/mod/formats/mod_shout/decode_i386.c
src/mod/formats/mod_shout/decode_ntom.c
src/mod/formats/mod_shout/layer3.c
src/mod/formats/mod_shout/mod_shout.c
src/mod/formats/mod_shout/mod_shout.vcproj
src/mod/formats/mod_shout/tabinit.c

index 55593efa35d5f06642f7eeeb12b2d040f387048c..eec3ea2cbbeb82deebd33e5e98c0779d7844b347 100644 (file)
@@ -51,7 +51,7 @@
                                AssemblerListingLocation=".\Release/"\r
                                ObjectFile=".\Release/"\r
                                ProgramDataBaseFileName=".\Release/"\r
-                               WarningLevel="3"\r
+                               WarningLevel="0"\r
                                SuppressStartupBanner="true"\r
                                CompileAs="0"\r
                        />\r
                                AssemblerListingLocation=".\Debug/"\r
                                ObjectFile=".\Debug/"\r
                                ProgramDataBaseFileName=".\Debug/"\r
-                               WarningLevel="3"\r
+                               WarningLevel="0"\r
                                SuppressStartupBanner="true"\r
-                               DebugInformationFormat="4"\r
+                               DebugInformationFormat="3"\r
                                CompileAs="0"\r
                        />\r
                        <Tool\r
index f33dd02dbf37dd48f1c67f30c0f3df0d9c43bb27..b41b67b3c5bb576a2b6e489ae4822b5b1bc927a0 100644 (file)
@@ -50,7 +50,7 @@
                                AssemblerListingLocation=".\Static_Release/"\r
                                ObjectFile=".\Static_Release/"\r
                                ProgramDataBaseFileName=".\Static_Release/"\r
-                               WarningLevel="3"\r
+                               WarningLevel="0"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                                AssemblerListingLocation=".\Static_Debug/"\r
                                ObjectFile=".\Static_Debug/"\r
                                ProgramDataBaseFileName=".\Static_Debug/"\r
-                               WarningLevel="3"\r
+                               WarningLevel="0"\r
                                SuppressStartupBanner="true"\r
-                               DebugInformationFormat="4"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
index 80f98b5a25e6b4d87583e83dc0d810a82455ada1..6af0060fb775d0a0c422e71b9114edd0bd6fb23c 100644 (file)
@@ -52,7 +52,7 @@
                                AssemblerListingLocation=".$(ConfigurationName)"\r
                                ObjectFile=".\Release/"\r
                                ProgramDataBaseFileName="$(ConfigurationName)"\r
-                               WarningLevel="3"\r
+                               WarningLevel="0"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                                AssemblerListingLocation="$(ConfigurationName)"\r
                                ObjectFile=".\Debug/"\r
                                ProgramDataBaseFileName="$(ConfigurationName)"\r
-                               WarningLevel="3"\r
+                               WarningLevel="0"\r
                                SuppressStartupBanner="true"\r
-                               DebugInformationFormat="4"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
index 4dab6031d7adfe9c66bd6690c65e5e23aea5dee0..ca6416ae5bad3cab8bb08231448a2d5ebca52078 100644 (file)
@@ -1236,7 +1236,7 @@ SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *te
 
 SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file, const char *func, int line,
                                                                                                                          _In_ switch_file_handle_t *fh,
-                                                                                                                         _In_z_ const char *file_path,
+                                                                                                                         _In_opt_z_ const char *file_path,
                                                                                                                          _In_ uint8_t channels,
                                                                                                                          _In_ uint32_t rate, _In_ unsigned int flags, _In_opt_ switch_memory_pool_t *pool);
 
index 76b1544362cbb52eade93c528d9c2b9d8f79467e..f586511f82404faa736de088168d4aadbbcda3e7 100644 (file)
@@ -23,7 +23,9 @@
 #define WRITE_SAMPLE(samples,sum,clip) \
   if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \
   else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
-  else { *(samples) = sum; }
+  else { *(samples) = (short)sum; }
+
+int synth_1to1(struct mpstr *mp, real * bandPtr, int channel, unsigned char *out, int *pnt);
 
 int synth_1to1_mono(struct mpstr *mp, real * bandPtr, unsigned char *samples, int *pnt)
 {
index 2e927ba2d2e4c8a4af36df86a0adba5eee71c13c..28fb99aed3b52d816959e728a146a2d7c8110a5d 100644 (file)
@@ -18,7 +18,7 @@
 #define WRITE_SAMPLE(samples,sum,clip) \
   if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \
   else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
-  else { *(samples) = sum; }
+  else { *(samples) = (short)sum; }
 
 
 //static unsigned long ntom_val[2] = { NTOM_MUL >> 1, NTOM_MUL >> 1 };
index 4814240ad57afe10630a2c8542a7d60d0768375e..f9fcc6b2bf57c9c3f5e549e4c2ac9bcecfa3f41b 100644 (file)
@@ -112,45 +112,45 @@ void init_layer3_const(void)
        int i, j, k, l;
 
        for (i = -256; i < 118 + 4; i++)
-               gainpow2[i + 256] = pow((double) 2.0, -0.25 * (double) (i + 210));
+               gainpow2[i + 256] = (real)pow((double) 2.0, -0.25 * (double) (i + 210));
 
        for (i = 0; i < 8207; i++)
-               __ispow[i] = pow((double) i, (double) 4.0 / 3.0);
+               __ispow[i] = (real)pow((double) i, (double) 4.0 / 3.0);
 
        for (i = 0; i < 8; i++) {
                static double Ci[8] = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 };
                double sq = sqrt(1.0 + Ci[i] * Ci[i]);
-               aa_cs[i] = 1.0 / sq;
-               aa_ca[i] = Ci[i] / sq;
+               aa_cs[i] = (real)(1.0 / sq);
+               aa_ca[i] = (real)(Ci[i] / sq);
        }
 
        for (i = 0; i < 18; i++) {
-               win[0][i] = win[1][i] = 0.5 * sin(M_PI / 72.0 * (double) (2 * (i + 0) + 1)) / cos(M_PI * (double) (2 * (i + 0) + 19) / 72.0);
-               win[0][i + 18] = win[3][i + 18] = 0.5 * sin(M_PI / 72.0 * (double) (2 * (i + 18) + 1)) / cos(M_PI * (double) (2 * (i + 18) + 19) / 72.0);
+               win[0][i] = win[1][i] = (real)(0.5 * sin(M_PI / 72.0 * (double) (2 * (i + 0) + 1)) / cos(M_PI * (double) (2 * (i + 0) + 19) / 72.0));
+               win[0][i + 18] = win[3][i + 18] = (real)(0.5 * sin(M_PI / 72.0 * (double) (2 * (i + 18) + 1)) / cos(M_PI * (double) (2 * (i + 18) + 19) / 72.0));
        }
        for (i = 0; i < 6; i++) {
-               win[1][i + 18] = 0.5 / cos(M_PI * (double) (2 * (i + 18) + 19) / 72.0);
-               win[3][i + 12] = 0.5 / cos(M_PI * (double) (2 * (i + 12) + 19) / 72.0);
-               win[1][i + 24] = 0.5 * sin(M_PI / 24.0 * (double) (2 * i + 13)) / cos(M_PI * (double) (2 * (i + 24) + 19) / 72.0);
-               win[1][i + 30] = win[3][i] = 0.0;
-               win[3][i + 6] = 0.5 * sin(M_PI / 24.0 * (double) (2 * i + 1)) / cos(M_PI * (double) (2 * (i + 6) + 19) / 72.0);
+               win[1][i + 18] = (real)(0.5 / cos(M_PI * (double) (2 * (i + 18) + 19) / 72.0));
+               win[3][i + 12] = (real)(0.5 / cos(M_PI * (double) (2 * (i + 12) + 19) / 72.0));
+               win[1][i + 24] = (real)(0.5 * sin(M_PI / 24.0 * (double) (2 * i + 13)) / cos(M_PI * (double) (2 * (i + 24) + 19) / 72.0));
+               win[1][i + 30] = win[3][i] = (real)(0.0);
+               win[3][i + 6] = (real)(0.5 * sin(M_PI / 24.0 * (double) (2 * i + 1)) / cos(M_PI * (double) (2 * (i + 6) + 19) / 72.0));
        }
 
        for (i = 0; i < 9; i++)
-               COS9[i] = cos(M_PI / 18.0 * (double) i);
+               COS9[i] = (real)(cos(M_PI / 18.0 * (double) i));
 
        for (i = 0; i < 9; i++)
-               tfcos36[i] = 0.5 / cos(M_PI * (double) (i * 2 + 1) / 36.0);
+               tfcos36[i] = (real)(0.5 / cos(M_PI * (double) (i * 2 + 1) / 36.0));
        for (i = 0; i < 3; i++)
-               tfcos12[i] = 0.5 / cos(M_PI * (double) (i * 2 + 1) / 12.0);
+               tfcos12[i] = (real)(0.5 / cos(M_PI * (double) (i * 2 + 1) / 12.0));
 
-       COS6_1 = cos(M_PI / 6.0 * (double) 1);
-       COS6_2 = cos(M_PI / 6.0 * (double) 2);
+       COS6_1 = (real)(cos(M_PI / 6.0 * (double) 1));
+       COS6_2 = (real)(cos(M_PI / 6.0 * (double) 2));
 
        for (i = 0; i < 12; i++) {
-               win[2][i] = 0.5 * sin(M_PI / 24.0 * (double) (2 * i + 1)) / cos(M_PI * (double) (2 * i + 7) / 24.0);
+               win[2][i] = (real)(0.5 * sin(M_PI / 24.0 * (double) (2 * i + 1)) / cos(M_PI * (double) (2 * i + 7) / 24.0));
                for (j = 0; j < 6; j++)
-                       COS1[i][j] = cos(M_PI / 24.0 * (double) ((2 * i + 7) * (2 * j + 1)));
+                       COS1[i][j] = (real)(cos(M_PI / 24.0 * (double) ((2 * i + 7) * (2 * j + 1))));
        }
 
        for (j = 0; j < 4; j++) {
@@ -163,10 +163,10 @@ void init_layer3_const(void)
 
        for (i = 0; i < 16; i++) {
                double t = tan((double) i * M_PI / 12.0);
-               tan1_1[i] = t / (1.0 + t);
-               tan2_1[i] = 1.0 / (1.0 + t);
-               tan1_2[i] = M_SQRT2 * t / (1.0 + t);
-               tan2_2[i] = M_SQRT2 / (1.0 + t);
+               tan1_1[i] = (real)(t / (1.0 + t));
+               tan2_1[i] = (real)(1.0 / (1.0 + t));
+               tan1_2[i] = (real)(M_SQRT2 * t / (1.0 + t));
+               tan2_2[i] = (real)(M_SQRT2 / (1.0 + t));
 
                for (j = 0; j < 2; j++) {
                        double base = pow(2.0, -0.25 * (j + 1.0));
@@ -177,10 +177,10 @@ void init_layer3_const(void)
                                else
                                        p2 = pow(base, i * 0.5);
                        }
-                       pow1_1[j][i] = p1;
-                       pow2_1[j][i] = p2;
-                       pow1_2[j][i] = M_SQRT2 * p1;
-                       pow2_2[j][i] = M_SQRT2 * p2;
+                       pow1_1[j][i] = (real)p1;
+                       pow2_1[j][i] = (real)p2;
+                       pow1_2[j][i] = (real)(M_SQRT2 * p1);
+                       pow2_2[j][i] = (real)(M_SQRT2 * p2);
                }
        }
 
@@ -1827,7 +1827,7 @@ static void III_hybrid(struct mpstr *mp, real fsIn[SBLIMIT][SSLIMIT], real tsOut
        int *blc = mp->hybrid_blc;
        real *rawout1, *rawout2;
        int bt;
-       int sb = 0;
+       unsigned int sb = 0;
 
        {
                int b = blc[ch];
@@ -1981,7 +1981,7 @@ int do_layer3(struct mpstr *mp, unsigned char *pcm_sample, int *pcm_point)
                        switch (single) {
                        case 3:
                                {
-                                       register int i;
+                                       register unsigned int i;
                                        register real *in0 = (real *) hybridIn[0], *in1 = (real *) hybridIn[1];
                                        for (i = 0; i < SSLIMIT * gr_info->maxb; i++, in0++)
                                                *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */
@@ -1989,7 +1989,7 @@ int do_layer3(struct mpstr *mp, unsigned char *pcm_sample, int *pcm_point)
                                break;
                        case 1:
                                {
-                                       register int i;
+                                       register unsigned int i;
                                        register real *in0 = (real *) hybridIn[0], *in1 = (real *) hybridIn[1];
                                        for (i = 0; i < SSLIMIT * gr_info->maxb; i++)
                                                *in0++ = *in1++;
index 6c9ea5f7886f2aa9db05671f570b83b656e518a3..59a2de4f0fe1db3bcf3fb6faf8ae1d8858e0c148 100644 (file)
@@ -249,7 +249,7 @@ static size_t decode_fd(shout_context_t *context, void *data, size_t bytes)
                usedlen = 0;
                x = 0;
 
-               if (inlen < bytes) {
+               if (lp < bytes) {
                        done = 1;
                }
                
@@ -1067,7 +1067,7 @@ void do_telecast(switch_stream_handle_t *stream)
                stream->write_function(stream, "Content-type: text/html\r\n\r\n<h2>Not Found!</h2>\n" "<META http-equiv=\"refresh\" content=\"1;URL=%s\">", ref);
        } else {
                switch_media_bug_t *bug = NULL;
-               switch_buffer_t *buffer;
+               switch_buffer_t *buffer = NULL;
                switch_mutex_t *mutex;
                switch_channel_t *channel = switch_core_session_get_channel(tsession);
                lame_global_flags *gfp = NULL;
index c08ed885a9c82304d8a45943eea5153771ca43f3..fb66549431a9606cff8e81aad76a3e74b18d998b 100644 (file)
@@ -48,7 +48,7 @@
                                RuntimeLibrary="3"\r
                                WarningLevel="3"\r
                                WarnAsError="false"\r
-                               DebugInformationFormat="4"\r
+                               DebugInformationFormat="3"\r
                                EnablePREfast="false"\r
                        />\r
                        <Tool\r
index 381d9a20adfd16a86e8cc4ca1dc6bc01aff3a0ad..fbc9fff76f37b204bef05b7212c0b2a4d888c3a2 100644 (file)
@@ -46,7 +46,7 @@ void make_decode_tables_const(void)
                divv = 0x40 >> i;
                costab = pnts[i];
                for (k = 0; k < kr; k++)
-                       costab[k] = 1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv));
+                       costab[k] = (real)(1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv)));
        }
 
 }
@@ -60,7 +60,7 @@ void make_decode_tables_scale(struct mpstr *mp, long scaleval)
        scaleval = -scaleval;
        for (i = 0, j = 0; i < 256; i++, j++, table += 32) {
                if (table < (mp->decwin) + 512 + 16)
-                       table[16] = table[0] = (double) intwinbase[j] / 65536.0 * (double) scaleval;
+                       table[16] = table[0] = (real)((double) intwinbase[j] / 65536.0 * (double) scaleval);
                if (i % 32 == 31)
                        table -= 1023;
                if (i % 64 == 63)
@@ -69,7 +69,7 @@ void make_decode_tables_scale(struct mpstr *mp, long scaleval)
 
        for ( /* i=256 */ ; i < 512; i++, j--, table += 32) {
                if (table < (mp->decwin) + 512 + 16)
-                       table[16] = table[0] = (double) intwinbase[j] / 65536.0 * (double) scaleval;
+                       table[16] = table[0] = (real)((double) intwinbase[j] / 65536.0 * (double) scaleval);
                if (i % 32 == 31)
                        table -= 1023;
                if (i % 64 == 63)