blob: 4883259419270b84c1e06904baf96c63c974bee6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
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
--------------
libsamplerate build is integrated with PJSIP's build system.
TBD.
Enabling libsamplerate for PJMEDIA's resample
---------------------------------------------
Add this in config_site.h:
#define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_LIBSAMPLERATE
|