summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-30 09:02:46 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-30 09:02:46 +0000
commit78caea1cc916243be0de0b50561451c3fe706bd5 (patch)
treedaee9561bc6deb504bac49a866bde404bc47f009 /third_party
parentdde89b25654a3d7d991f8435f9bedd7c8dbd3b2d (diff)
Added resample DLL project
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1232 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/build/resample/libresample_dll.dsp133
-rw-r--r--third_party/build/resample/libresample_dll.vcproj293
-rw-r--r--third_party/resample/include/resamplesubs.h16
-rw-r--r--third_party/resample/src/libresample_dll.c12
-rw-r--r--third_party/resample/src/resamplesubs.c10
5 files changed, 454 insertions, 10 deletions
diff --git a/third_party/build/resample/libresample_dll.dsp b/third_party/build/resample/libresample_dll.dsp
new file mode 100644
index 00000000..28fa3290
--- /dev/null
+++ b/third_party/build/resample/libresample_dll.dsp
@@ -0,0 +1,133 @@
+# Microsoft Developer Studio Project File - Name="libresample_dll" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=libresample_dll - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libresample_dll.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libresample_dll.mak" CFG="libresample_dll - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libresample_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libresample_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "libresample_dll - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output\libresample-dll-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "output\libresample-dll-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output\libresample-dll-i386-win32-vc6-release"
+# PROP Intermediate_Dir "output\libresample-dll-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRESAMPLE_DLL_EXPORTS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../../resample/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRESAMPLE_DLL_EXPORTS" /FD /c
+# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../lib/libresample.dll"
+
+!ELSEIF "$(CFG)" == "libresample_dll - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output\libresample-dll-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "output\libresample-dll-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output\libresample-dll-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "output\libresample-dll-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRESAMPLE_DLL_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "." /I "../../resample/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRESAMPLE_DLL_EXPORTS" /FD /GZ /c
+# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../lib/libresampled.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "libresample_dll - Win32 Release"
+# Name "libresample_dll - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\resample\src\libresample_dll.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\resample\src\resamplesubs.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\resample\src\largefilter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\resample\src\resample.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\resample\include\resamplesubs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\resample\src\smallfilter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\resample\src\stddefs.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/third_party/build/resample/libresample_dll.vcproj b/third_party/build/resample/libresample_dll.vcproj
new file mode 100644
index 00000000..d7874e67
--- /dev/null
+++ b/third_party/build/resample/libresample_dll.vcproj
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libresample_dll"
+ ProjectGUID="{C48EAAF5-F69E-410B-9CE4-23AB41B00E2A}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\output\libresample-dll-i386-win32-vc8-debug"
+ IntermediateDirectory=".\output\libresample-dll-i386-win32-vc8-debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\output\libresample-dll-i386-win32-vc8-debug/libresample_dll.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,../../resample/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBRESAMPLE_DLL_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile=".\output\libresample-dll-i386-win32-vc8-debug/libresample_dll.pch"
+ AssemblerListingLocation=".\output\libresample-dll-i386-win32-vc8-debug/"
+ ObjectFile=".\output\libresample-dll-i386-win32-vc8-debug/"
+ ProgramDataBaseFileName=".\output\libresample-dll-i386-win32-vc8-debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile="../../lib/libresampled.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\output\libresample-dll-i386-win32-vc8-debug/libresampled.pdb"
+ ImportLibrary=".\output\libresample-dll-i386-win32-vc8-debug/libresampled.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\output\libresample-dll-i386-win32-vc8-debug/libresample_dll.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\output\libresample-dll-i386-win32-vc8-release"
+ IntermediateDirectory=".\output\libresample-dll-i386-win32-vc8-release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\output\libresample-dll-i386-win32-vc8-release/libresample_dll.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,../../resample/include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBRESAMPLE_DLL_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\output\libresample-dll-i386-win32-vc8-release/libresample_dll.pch"
+ AssemblerListingLocation=".\output\libresample-dll-i386-win32-vc8-release/"
+ ObjectFile=".\output\libresample-dll-i386-win32-vc8-release/"
+ ProgramDataBaseFileName=".\output\libresample-dll-i386-win32-vc8-release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile="../../lib/libresample.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\output\libresample-dll-i386-win32-vc8-release/libresample.pdb"
+ ImportLibrary=".\output\libresample-dll-i386-win32-vc8-release/libresample.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\output\libresample-dll-i386-win32-vc8-release/libresample_dll.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\resample\src\libresample_dll.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\resample\src\resamplesubs.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\resample\src\largefilter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\resample\src\resample.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\resample\include\resamplesubs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\resample\src\smallfilter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\resample\src\stddefs.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/third_party/resample/include/resamplesubs.h b/third_party/resample/include/resamplesubs.h
index 76563b7b..ab0771b6 100644
--- a/third_party/resample/include/resamplesubs.h
+++ b/third_party/resample/include/resamplesubs.h
@@ -7,11 +7,17 @@ typedef int RES_WORD;
typedef unsigned short RES_UHWORD;
typedef unsigned int RES_UWORD;
-int res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[],
- double pFactor, RES_UHWORD nx);
-int res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor,
- RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp);
-int res_GetXOFF(double pFactor, RES_BOOL LargeF);
+#ifdef _USRDLL
+# define DECL(T) __declspec(dllexport) T
+#else
+# define DECL(T) T
+#endif
+
+DECL(int) res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[],
+ double pFactor, RES_UHWORD nx);
+DECL(int) res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor,
+ RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp);
+DECL(int) res_GetXOFF(double pFactor, RES_BOOL LargeF);
#endif
diff --git a/third_party/resample/src/libresample_dll.c b/third_party/resample/src/libresample_dll.c
new file mode 100644
index 00000000..28ab9ec4
--- /dev/null
+++ b/third_party/resample/src/libresample_dll.c
@@ -0,0 +1,12 @@
+// libresample_dll.cpp : Defines the entry point for the DLL application.
+//
+#include <windows.h>
+
+BOOL APIENTRY DllMain( HANDLE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ return TRUE;
+}
+
diff --git a/third_party/resample/src/resamplesubs.c b/third_party/resample/src/resamplesubs.c
index ae78add8..2cb04eb5 100644
--- a/third_party/resample/src/resamplesubs.c
+++ b/third_party/resample/src/resamplesubs.c
@@ -319,14 +319,14 @@ static int SrcUD(const RES_HWORD X[], RES_HWORD Y[], double pFactor,
}
-int res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[],
- double pFactor, RES_UHWORD nx)
+DECL(int) res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[],
+ double pFactor, RES_UHWORD nx)
{
return SrcLinear(X, Y, pFactor, nx);
}
-int res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor,
- RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp)
+DECL(int) res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor,
+ RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp)
{
if (pFactor >= 1) {
@@ -353,7 +353,7 @@ int res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor,
}
}
-int res_GetXOFF(double pFactor, RES_BOOL LargeF)
+DECL(int) res_GetXOFF(double pFactor, RES_BOOL LargeF)
{
if (LargeF)
return (LARGE_FILTER_NMULT + 1) / 2.0 *