summaryrefslogtreecommitdiff
path: root/third_party/build/samplerate
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-01-07 14:24:28 -0600
committerDavid M. Lee <dlee@digium.com>2013-01-07 14:24:28 -0600
commitf3ab456a17af1c89a6e3be4d20c5944853df1cb0 (patch)
treed00e1a332cd038a6d906a1ea0ac91e1a4458e617 /third_party/build/samplerate
Import pjproject-2.0.1
Diffstat (limited to 'third_party/build/samplerate')
-rw-r--r--third_party/build/samplerate/README.txt85
-rw-r--r--third_party/build/samplerate/Static.msvc138
-rw-r--r--third_party/build/samplerate/libsamplerate_static.dsp114
-rw-r--r--third_party/build/samplerate/output/.keep0
4 files changed, 337 insertions, 0 deletions
diff --git a/third_party/build/samplerate/README.txt b/third_party/build/samplerate/README.txt
new file mode 100644
index 0000000..0f8de07
--- /dev/null
+++ b/third_party/build/samplerate/README.txt
@@ -0,0 +1,85 @@
+
+ HOW TO ACTIVATE LIBSAMPLERATE
+ (a.k.a SRC/Secret Rabbit Code)
+ AS PJMEDIA'S SAMPLE RATE CONVERSION BACKEND
+
+ by
+ Benny Prijono
+ PJSIP
+
+Background
+----------
+ Secret Rabbit Code (aka libsamplerate) is a sample rate conversion
+ library, available from http://www.mega-nerd.com/SRC/index.html.
+ It is licensed under dual license, GPL and proprietary.
+
+
+Supported Platforms
+-------------------
+ libsamplerate is available for Win32 with Visual Studio and the
+ Makefile based targets (such as Linux, MacOS X, *nix, etc.).
+
+ It's not supported for WinCE/Windows Mobile and Symbian since it is
+ a floating point based implementation.
+
+
+Installation
+------------
+ - Download libsamplerate from http://www.mega-nerd.com/SRC/index.html
+
+ - Untar libsamplerate-0.1.2.tar.gz into third_party directory
+ cd third_party
+ tar xzf libsamplerate-0.1.2.tar.gz
+
+ - Rename libsamplerate-0.1.2 directory name to libsamplerate
+ On Windows:
+ ren libsamplerate-0.1.2 libsamplerate
+
+ On Linux/Unix/MacOS X:
+ mv libsamplerate-0.1.2 libsamplerate
+
+
+Visual Studio Build
+-------------------
+ For Visual Studio projects, only static linkage is supported
+ by PJMEDIA build system. If dynamic linking is desired, edit
+ pjmedia/src/pjmedia/resample_libresample.c to prevent it from
+ linking with the static library, and configure your project
+ to link with libsamplerate DLL library.
+
+ To build libresample static library with Visual Studio:
+
+ - Open third_party/build/samplerate/libsamplerate_static.dsp
+ - Build the project for both Debug and Release build
+
+
+ libresample dynamic library can be produced by following the
+ instructions in libresample source directory.
+
+
+Makefile build
+--------------
+ - Build and install libsamplerate (configure && make && make install).
+ Please follow the instructions in libsamplerate documentation.
+
+ - Re-run PJSIP's "configure" script with this option:
+
+ ./configure --enable-libsamplerate
+
+ this will detect the presence of libsamplerate library and add it
+ to the input library list.
+
+
+Enabling libsamplerate for PJMEDIA's resample
+---------------------------------------------
+ For both Visual Studio and Makefile based build system, add this in
+ config_site.h:
+
+ #define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_LIBSAMPLERATE
+
+
+Limitations
+-----------
+Sample rate 22050 Hz is only supported with 20ms ptime, and sample rate 11025 Hz is only supported with 40ms ptime. This is the limitation of PJMEDIA rather than libsamplerate.
+
+
diff --git a/third_party/build/samplerate/Static.msvc b/third_party/build/samplerate/Static.msvc
new file mode 100644
index 0000000..0f04c8f
--- /dev/null
+++ b/third_party/build/samplerate/Static.msvc
@@ -0,0 +1,138 @@
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+F90=df.exe
+BSC32=bscmake.exe
+BSC32_SBRS= \
+
+LIB32=link.exe -lib
+
+OUTDIR_REL=.\output\libsamplerate-i386-win32-vc-release
+INTDIR_REL=.\output\libsamplerate-i386-win32-vc-release
+OUTDIR_DEB=.\output\libsamplerate-i386-win32-vc-debug
+INTDIR_DEB=.\output\libsamplerate-i386-win32-vc-debug
+
+LIB_REL=..\..\lib\libsamplerate-i386-win32-vc-release.lib
+LIB_DEB=..\..\lib\libsamplerate-i386-win32-vc-debug.lib
+
+ALL : $(LIB_REL) $(LIB_DEB)
+
+CLEAN :
+ -@erase "$(INTDIR_REL)\*.obj"
+ -@erase "$(INTDIR_REL)\*.pch"
+ -@erase "$(INTDIR_REL)\*.pdb"
+ -@erase "$(INTDIR_REL)\*.idb"
+ @rmdir $(INTDIR_REL)
+ -@erase "$(INTDIR_DEB)\*.obj"
+ -@erase "$(INTDIR_DEB)\*.pch"
+ -@erase "$(INTDIR_DEB)\*.pdb"
+ -@erase "$(INTDIR_DEB)\*.idb"
+ @rmdir $(INTDIR_DEB)
+ -@erase $(LIB_REL)
+ -@erase $(LIB_DEB)
+
+"$(OUTDIR_REL)" :
+ if not exist "$(OUTDIR_REL)/$(NULL)" mkdir "$(OUTDIR_REL)"
+
+CPP_PROJ_REL=/nologo /MD /W3 /GX /O2 /I "../win32" /I "../../libsamplerate/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /Fp"$(INTDIR_REL)\libsamplerate_static.pch" /YX /Fo"$(INTDIR_REL)\\" /Fd"$(INTDIR_REL)\\" /FD /c
+
+LIB32_FLAGS_REL=/nologo /out:$(LIB_REL)
+LIB32_OBJS_REL= \
+ "$(INTDIR_REL)\samplerate.obj" \
+ "$(INTDIR_REL)\src_linear.obj" \
+ "$(INTDIR_REL)\src_sinc.obj" \
+ "$(INTDIR_REL)\src_zoh.obj"
+
+$(LIB_REL) : "$(OUTDIR_REL)" $(DEF_FILE) $(LIB32_OBJS_REL)
+ $(LIB32) @<<
+ $(LIB32_FLAGS_REL) $(DEF_FLAGS) $(LIB32_OBJS_REL)
+<<
+
+"$(OUTDIR_DEB)" :
+ if not exist "$(OUTDIR_DEB)/$(NULL)" mkdir "$(OUTDIR_DEB)"
+
+CPP_PROJ_DEB=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../win32" /I "../../libsamplerate/src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /Fp"$(INTDIR_DEB)\libsamplerate_static.pch" /YX /Fo"$(INTDIR_DEB)\\" /Fd"$(INTDIR_DEB)\\" /FD /GZ /c
+LIB32_FLAGS_DEB=/nologo /out:$(LIB_DEB)
+LIB32_OBJS_DEB= \
+ "$(INTDIR_DEB)\samplerate.obj" \
+ "$(INTDIR_DEB)\src_linear.obj" \
+ "$(INTDIR_DEB)\src_sinc.obj" \
+ "$(INTDIR_DEB)\src_zoh.obj"
+
+$(LIB_DEB) : "$(OUTDIR_DEB)" $(DEF_FILE) $(LIB32_OBJS_DEB)
+ $(LIB32) @<<
+ $(LIB32_FLAGS_DEB) $(DEF_FLAGS) $(LIB32_OBJS_DEB)
+<<
+
+
+..\..\libsamplerate\src\samplerate.c : \
+ "..\..\libsamplerate\src\common.h"\
+ "..\..\libsamplerate\src\config.h"\
+ "..\..\libsamplerate\src\float_cast.h"\
+ "..\..\libsamplerate\src\samplerate.h"\
+
+
+..\..\libsamplerate\src\src_linear.c : \
+ "..\..\libsamplerate\src\common.h"\
+ "..\..\libsamplerate\src\config.h"\
+ "..\..\libsamplerate\src\float_cast.h"\
+ "..\..\libsamplerate\src\samplerate.h"\
+
+
+..\..\libsamplerate\src\src_sinc.c : \
+ "..\..\libsamplerate\src\common.h"\
+ "..\..\libsamplerate\src\config.h"\
+ "..\..\libsamplerate\src\fastest_coeffs.h"\
+ "..\..\libsamplerate\src\float_cast.h"\
+ "..\..\libsamplerate\src\high_qual_coeffs.h"\
+ "..\..\libsamplerate\src\mid_qual_coeffs.h"\
+ "..\..\libsamplerate\src\samplerate.h"\
+
+
+..\..\libsamplerate\src\src_zoh.c : \
+ "..\..\libsamplerate\src\common.h"\
+ "..\..\libsamplerate\src\config.h"\
+ "..\..\libsamplerate\src\float_cast.h"\
+ "..\..\libsamplerate\src\samplerate.h"\
+
+
+
+SOURCE=..\..\libsamplerate\src\samplerate.c
+
+"$(INTDIR_DEB)\samplerate.obj" : $(SOURCE) "$(INTDIR_DEB)"
+ $(CPP) $(CPP_PROJ_DEB) $(SOURCE)
+"$(INTDIR_REL)\samplerate.obj" : $(SOURCE) "$(INTDIR_REL)"
+ $(CPP) $(CPP_PROJ_REL) $(SOURCE)
+
+
+SOURCE=..\..\libsamplerate\src\src_linear.c
+
+"$(INTDIR_DEB)\src_linear.obj" : $(SOURCE) "$(INTDIR_DEB)"
+ $(CPP) $(CPP_PROJ_DEB) $(SOURCE)
+"$(INTDIR_REL)\src_linear.obj" : $(SOURCE) "$(INTDIR_REL)"
+ $(CPP) $(CPP_PROJ_REL) $(SOURCE)
+
+
+SOURCE=..\..\libsamplerate\src\src_sinc.c
+
+"$(INTDIR_DEB)\src_sinc.obj" : $(SOURCE) "$(INTDIR_DEB)"
+ $(CPP) $(CPP_PROJ_DEB) $(SOURCE)
+"$(INTDIR_REL)\src_sinc.obj" : $(SOURCE) "$(INTDIR_REL)"
+ $(CPP) $(CPP_PROJ_REL) $(SOURCE)
+
+
+SOURCE=..\..\libsamplerate\src\src_zoh.c
+
+"$(INTDIR_DEB)\src_zoh.obj" : $(SOURCE) "$(INTDIR_DEB)"
+ $(CPP) $(CPP_PROJ_DEB) $(SOURCE)
+"$(INTDIR_REL)\src_zoh.obj" : $(SOURCE) "$(INTDIR_REL)"
+ $(CPP) $(CPP_PROJ_REL) $(SOURCE)
+
+
+
diff --git a/third_party/build/samplerate/libsamplerate_static.dsp b/third_party/build/samplerate/libsamplerate_static.dsp
new file mode 100644
index 0000000..54ac8e3
--- /dev/null
+++ b/third_party/build/samplerate/libsamplerate_static.dsp
@@ -0,0 +1,114 @@
+# Microsoft Developer Studio Project File - Name="libsamplerate_static" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libsamplerate_static - 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 "libsamplerate_static.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 "libsamplerate_static.mak" CFG="libsamplerate_static - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libsamplerate_static - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libsamplerate_static - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "libsamplerate_static - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/libsamplerate-i386-win32-vc-release"
+# PROP BASE Intermediate_Dir "output/libsamplerate-i386-win32-vc-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/libsamplerate-i386-win32-vc-release"
+# PROP Intermediate_Dir "output/libsamplerate-i386-win32-vc-release"
+# PROP Target_Dir ""
+F90=df.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "./win32" /I "../../libsamplerate/src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\libsamplerate-i386-win32-vc-release.lib"
+
+!ELSEIF "$(CFG)" == "libsamplerate_static - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/libsamplerate-i386-win32-vc-debug"
+# PROP BASE Intermediate_Dir "output/libsamplerate-i386-win32-vc-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/libsamplerate-i386-win32-vc-debug"
+# PROP Intermediate_Dir "output/libsamplerate-i386-win32-vc-debug"
+# PROP Target_Dir ""
+F90=df.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "./win32" /I "../../libsamplerate/src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\lib\libsamplerate-i386-win32-vc-debug.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "libsamplerate_static - Win32 Release"
+# Name "libsamplerate_static - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\libsamplerate\src\samplerate.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\libsamplerate\src\src_linear.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\libsamplerate\src\src_sinc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\libsamplerate\src\src_zoh.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\libsamplerate\src\samplerate.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/third_party/build/samplerate/output/.keep b/third_party/build/samplerate/output/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/third_party/build/samplerate/output/.keep