]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
merge more build stuff for shout and flite. (FSBUILD-62 and FSBUILD-63)
authorMichael Jerris <mike@jerris.com>
Thu, 24 Jul 2008 08:54:06 +0000 (08:54 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 24 Jul 2008 08:54:06 +0000 (08:54 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9161 d0543943-73ff-0310-b7d9-9358b9ac24b2

Freeswitch.2008.sln
libs/win32/Download 8khz Sounds.2008.vcproj
libs/win32/libshout/compat.h [new file with mode: 0644]
libs/win32/libshout/libshout.vcproj
libs/win32/libshout/shout/shout.h
src/mod/formats/mod_shout/decode_i386.c
src/mod/formats/mod_shout/interface.c
src/mod/formats/mod_shout/layer3.c
src/mod/formats/mod_shout/mpg123.h
src/mod/formats/mod_shout/mpglib.h

index ce7e754c47535cd6f2941c744ff561450c88f4e9..a407a2f672142abe199111ba76754cc197d5429b 100644 (file)
@@ -914,6 +914,48 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz", "libs\win32\Sound_F
                {6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F} = {6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flite", "libs\win32\flite\flite.2008.vcproj", "{0AD1177E-1FD8-4643-9391-431467A11084}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_flite", "src\mod\asr_tts\mod_flite\mod_flite.2008.vcproj", "{66444AEE-554C-11DD-A9F0-8C5D56D89593}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}\r
+               {D5D2BF72-29FE-4982-A9FA-82FDD086DB1B} = {D5D2BF72-29FE-4982-A9FA-82FDD086DB1B}\r
+               {0AD1177E-1FD8-4643-9391-431467A11084} = {0AD1177E-1FD8-4643-9391-431467A11084}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download FLITE", "libs\win32\Download FLITE.2008.vcproj", "{D5D2BF72-29FE-4982-A9FA-82FDD086DB1B}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download LAME", "libs\win32\Download LAME.2008.vcproj", "{D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download LIBSHOUT", "libs\win32\Download LIBSHOUT.2008.vcproj", "{D5D2BF72-29FE-4982-A9FA-82AB3086DB1B}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download OGG", "libs\win32\Download OGG.2008.vcproj", "{D5D2BF72-29FE-4982-A9FA-82AB1086DB1B}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame", "libs\win32\libmp3lame\libmp3lame_vc7.vcproj", "{E316772F-5D8F-4F2A-8F71-094C3E859D34}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B} = {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libshout", "libs\win32\libshout\libshout.vcproj", "{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}\r
+               {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B} = {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B}\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B} = {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}\r
+               {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B} = {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B}\r
+               {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4} = {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shout", "src\mod\formats\mod_shout\mod_shout.vcproj", "{38FE0559-9910-43A8-9E45-3E5004C27692}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {D3D8B329-20BE-475E-9E83-653CEA0E0EF5} = {D3D8B329-20BE-475E-9E83-653CEA0E0EF5}\r
+               {E316772F-5D8F-4F2A-8F71-094C3E859D34} = {E316772F-5D8F-4F2A-8F71-094C3E859D34}\r
+               {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}\r
+               {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}\r
+               {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libs\win32\libogg\libogg.2008.vcproj", "{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}"\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -1569,6 +1611,46 @@ Global
                {464AAB78-5489-4916-BE51-BF8D61822311}.Release|Win32.ActiveCfg = Release|Win32\r
                {464AAB78-5489-4916-BE51-BF8D61822311}.Release|Win32.Build.0 = Release|Win32\r
                {464AAB78-5489-4916-BE51-BF8D61822311}.Release|x64.ActiveCfg = Release|Win32\r
+               {0AD1177E-1FD8-4643-9391-431467A11084}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0AD1177E-1FD8-4643-9391-431467A11084}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {0AD1177E-1FD8-4643-9391-431467A11084}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0AD1177E-1FD8-4643-9391-431467A11084}.Release|x64.ActiveCfg = Release|Win32\r
+               {66444AEE-554C-11DD-A9F0-8C5D56D89593}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {66444AEE-554C-11DD-A9F0-8C5D56D89593}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {66444AEE-554C-11DD-A9F0-8C5D56D89593}.Release|Win32.ActiveCfg = Release|Win32\r
+               {66444AEE-554C-11DD-A9F0-8C5D56D89593}.Release|x64.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82FDD086DB1B}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82FDD086DB1B}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82FDD086DB1B}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82FDD086DB1B}.Release|x64.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B}.Release|x64.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B}.Release|x64.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B}.Release|x64.ActiveCfg = Release|Win32\r
+               {E316772F-5D8F-4F2A-8F71-094C3E859D34}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E316772F-5D8F-4F2A-8F71-094C3E859D34}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {E316772F-5D8F-4F2A-8F71-094C3E859D34}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E316772F-5D8F-4F2A-8F71-094C3E859D34}.Release|x64.ActiveCfg = Release|Win32\r
+               {D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Release|x64.ActiveCfg = Release|Win32\r
+               {38FE0559-9910-43A8-9E45-3E5004C27692}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {38FE0559-9910-43A8-9E45-3E5004C27692}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {38FE0559-9910-43A8-9E45-3E5004C27692}.Release|Win32.ActiveCfg = Release|Win32\r
+               {38FE0559-9910-43A8-9E45-3E5004C27692}.Release|x64.ActiveCfg = Release|Win32\r
+               {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Release|x64.ActiveCfg = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
@@ -1608,6 +1690,7 @@ Global
                {9254C4B0-6F60-42B6-BB3A-36D63FC001C7} = {A5A27244-AD24-46E5-B01B-840CD296C91D}\r
                {2CA40887-1622-46A1-A7F9-17FD7E7E545B} = {A5A27244-AD24-46E5-B01B-840CD296C91D}\r
                {6FF941AC-82C5-429F-AA4C-AD2FB9E5DA52} = {A5A27244-AD24-46E5-B01B-840CD296C91D}\r
+               {38FE0559-9910-43A8-9E45-3E5004C27692} = {A5A27244-AD24-46E5-B01B-840CD296C91D}\r
                {1A1FF289-4FD6-4285-A422-D31DD67A4723} = {CBD81696-EFB4-4D2F-8451-1B8DAA86155A}\r
                {EC3E5C7F-EE09-47E2-80FE-546363D14A98} = {B8F5B47B-8568-46EB-B320-64C17D2A98BC}\r
                {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}\r
@@ -1620,6 +1703,7 @@ Global
                {692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}\r
                {E7116F50-2B10-472F-92BD-C8667AA9C1AE} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}\r
                {2286DA73-9FC5-45BC-A508-85994C3317AB} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}\r
+               {66444AEE-554C-11DD-A9F0-8C5D56D89593} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}\r
                {1C453396-D912-4213-89FD-9B489162B7B5} = {A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}\r
                {D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909} = {A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}\r
                {CBEC7225-0C21-4DA8-978E-1F158F8AD950} = {F69A4A6B-9360-4EBB-A280-22AA3C455AC5}\r
@@ -1655,6 +1739,9 @@ Global
                {B535402E-38D2-4D54-8360-423ACBD17192} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {2F025EAD-99BD-40F5-B2CC-F0A28CAD7F2D} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {94001A0E-A837-445C-8004-F918F10D0226} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
+               {E316772F-5D8F-4F2A-8F71-094C3E859D34} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
+               {D3D8B329-20BE-475E-9E83-653CEA0E0EF5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
+               {0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {5927104D-C14C-4AC8-925C-4AB681762E75} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
                {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
                {4F92B672-DADB-4047-8D6A-4BB3796733FD} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
@@ -1663,6 +1750,9 @@ Global
                {3CE1DC99-8246-4DB1-A709-74F19F08EC67} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
                {87A1FE3D-F410-4C8E-9591-8C625985BC70} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
                {6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
+               {D5D2BF72-29FE-4982-A9FA-82AB2086DB1B} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
+               {D5D2BF72-29FE-4982-A9FA-82AB3086DB1B} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
+               {D5D2BF72-29FE-4982-A9FA-82AB1086DB1B} = {C120A020-773F-4EA3-923F-B67AF28B750D}\r
                {988CACF7-3FCB-4992-BE69-77872AE67DC8} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}\r
                {5BC072DB-3826-48EA-AF34-FE32AA01E83B} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}\r
                {FA429E98-8B03-45E6-A096-A4BC5E821DE4} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}\r
index 1242fda8070b50c937d7b07cac8cca3537b93f0f..68d8399984b74bc4fd07659aeea813a5b35cda98 100644 (file)
@@ -75,7 +75,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 8khzsound."\r
-                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-8000-1.0.2.tar.gz &quot;$(ProjectDir)..&quot;&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\music\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-music-8000-1.0.2.tar.gz &quot;$(ProjectDir)..&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-8000-1.0.2.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\music\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-music-8000-1.0.2.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\8000"\r
                                />\r
                        </FileConfiguration>\r
diff --git a/libs/win32/libshout/compat.h b/libs/win32/libshout/compat.h
new file mode 100644 (file)
index 0000000..6a694ad
--- /dev/null
@@ -0,0 +1 @@
+#include <os.h>\r
index acf61cb037abba2c584436a3da70ef5aa2953fb4..80f98b5a25e6b4d87583e83dc0d810a82455ada1 100644 (file)
@@ -44,7 +44,7 @@
                                Optimization="2"\r
                                InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories=".\,..\..\libshout-2.2.2\src,..\..\libshout-2.2.2\include,..\..\libogg-1.1.3\include,..\..\pthreads-w32-2-7-0-release,..\..\libshout-2.2.2\win32\include"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_WIN32;VERSION=\&quot;2.0.0\&quot;;LIBSHOUT_MAJOR=2;LIBSHOUT_MINOR=0;LIBSHOUT_MICRO=0;HAVE_WINSOCK2_H;HAVE_VORBIS"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_WIN32;VERSION=\&quot;2.0.0\&quot;;LIBSHOUT_MAJOR=2;LIBSHOUT_MINOR=0;LIBSHOUT_MICRO=0;HAVE_WINSOCK2_H;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                                EnableFunctionLevelLinking="true"\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
                                AdditionalIncludeDirectories=".\,..\..\libshout-2.2.2\src,..\..\libshout-2.2.2\include,..\..\libogg-1.1.3\include,..\..\pthreads-w32-2-7-0-release,..\..\libshout-2.2.2\win32\include"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_WIN32;VERSION=\&quot;2.0.0\&quot;;LIBSHOUT_MAJOR=2;LIBSHOUT_MINOR=0;LIBSHOUT_MICRO=0;HAVE_WINSOCK2_H;HAVE_VORBIS"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_WIN32;VERSION=\&quot;2.0.0\&quot;;LIBSHOUT_MAJOR=2;LIBSHOUT_MINOR=0;LIBSHOUT_MICRO=0;HAVE_WINSOCK2_H;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
index ccc75f20ce4e1d836b19c37cc71418865d1da2c3..208f55535af459440342ca3b15ebaf6d8dd12b8e 100644 (file)
 #include <sys/types.h>\r
 #ifdef WIN32\r
 #include <os.h>\r
+# ifdef _MSC_VER\r
+#  undef inline\r
+#  define inline __inline\r
+#if (_MSC_VER >= 1400)                 // VC8+\r
+#ifndef _CRT_SECURE_NO_DEPRECATE\r
+#define _CRT_SECURE_NO_DEPRECATE\r
+#endif\r
+#ifndef _CRT_NONSTDC_NO_DEPRECATE\r
+#define _CRT_NONSTDC_NO_DEPRECATE\r
+#endif\r
+#endif // VC8+\r
+# endif\r
+#ifndef __MINGW32__\r
+#define va_copy(ap1, ap2) memcpy(&ap1, &ap2, sizeof(va_list))\r
+#endif\r
+\r
 #endif\r
 \r
 #define SHOUTERR_SUCCESS       (0)\r
index 9f0c5431abd3dcaaf290407c0c736bddadd1c5f6..76b1544362cbb52eade93c528d9c2b9d8f79467e 100644 (file)
@@ -81,7 +81,7 @@ int synth_1to1(struct mpstr *mp, real * bandPtr, int channel, unsigned char *out
 
        {
                register int j;
-               real *window = decwin + 16 - bo1;
+               real *window = (mp->decwin) + 16 - bo1;
 
                for (j = 16; j; j--, b0 += 0x10, window += 0x20, samples += step) {
                        real sum;
index b5af8fe85e66222949272fc1e9fbddded0b981f2..733d9c4648de9138e422d159e5e9ae2e8eeda5bc 100644 (file)
@@ -13,7 +13,7 @@ void InitMP3Constants(void)
 }
 
 
-BOOL InitMP3(struct mpstr *mp, long outscale, int samplerate)
+MPGLIB_BOOL InitMP3(struct mpstr *mp, long outscale, int samplerate)
 {
        /* quiet 4096 med 8192 */
 
index 43191ab4fcee34c9ad4626e0242e985588df10e5..0c8ca54e2d36d74d14be3c68095ab1412afc34a2 100644 (file)
@@ -32,8 +32,11 @@ struct bandInfoStruct {
        short shortDiff[13];
 };
 
-
+#ifndef _WIN32
 static inline real find_pow(int i)
+#else
+static real find_pow(int i)
+#endif
 {
 
        return (i > 0 && i < 8207) ? __ispow[i] : 1;
index 4a0a8ef93503e0e90f91ba3028a96527aa6f53f9..8c81698cca0c61f9d1e66e55abf765d1eb3a09fa 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef MPG123_DEFINED
+#define MPG123_DEFINED
+
 #include        <stdio.h>
 #include        <string.h>
 #include        <signal.h>
@@ -127,3 +130,5 @@ struct pcm_workingsample {
 extern long freqs[9];
 extern struct parameter param;
 extern real *pnts[5];
+
+#endif
index 93176eca86121b2fe1d9a9048e1102753ef4aa33..38f8a9dc901ea863b9bb0278438c42e6b4318bf3 100644 (file)
@@ -5,6 +5,10 @@
 #endif
 #define NTOM_MUL (32768)
 
+#ifdef _WIN32
+#include "mpg123.h"
+#endif
+
 struct buf {
        unsigned char *pnt;
        long size;
@@ -44,7 +48,7 @@ struct mpstr {
        unsigned long ntom_step;
 };
 
-#define BOOL int
+#define MPGLIB_BOOL int
 
 #define MP3_ERR -1
 #define MP3_OK  0
@@ -52,7 +56,7 @@ struct mpstr {
 #define MP3_TOOSMALL 2
 
 void InitMP3Constants(void);
-BOOL InitMP3(struct mpstr *mp, long outscale, int samplerate);
+MPGLIB_BOOL InitMP3(struct mpstr *mp, long outscale, int samplerate);
 int decodeMP3(struct mpstr *mp, char *inmemory, int inmemsize, char *outmemory, int outmemsize, int *done);
 void ExitMP3(struct mpstr *mp);