Libraries and demo are not provided as downloading material for linux operating systems. Please contact bdSound to request them: techsupport@bdsound.com.
The following information are valid for both x86 and ARM processors.
To compile PJSIP with bdIMAD support in version 2.1 it is necessary to manually perform those modifications already present in version 2.x.
Once the PJSIP project 2.1 has been downloaded from the PJSIP website, it is necessary to follow these additional steps to compile PJSIP and PJSUA with bdIMAD support. For general PJSIP compilation issues please refers to PJSIP wiki.
To compile please note that ALSA are required. If missing, you have to install them before to continue; for example in Ubuntu:
1 | sudo apt-get install libasound2 |
sudo apt-get install libasound2
To compile PJSIP 2.1 with bdIMAD support follow these steps:
1] Create (or modify if present) the file config_site.h
in the directory /pjlib/include/pj
as below, in order to enable bdIMAD support and disable other I/O audio libraries:
1 2 3 4 5 | #include "config_site_sample.h" #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_WMME 0 #define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_BDIMAD 1 |
#include "config_site_sample.h" #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_WMME 0 #define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_BDIMAD 1
2] Create the directory third_party/bdsound/include
and copy bdimad.h
within this directory
3] Add the created directory to the project pjmedia_audiodev
, in order to include the header file bdimad.h
, that is located under the directory ../../third_party/bdsound/include
4] Create a directory containing the bdIMADpj.lib
and bdClientValidation.lib
files from bdSound and link these libraries to PJSUA project;
5] Copy the file bdimad_dev.c
from the SRC_Files_for_PJSIP_2.1
folder into the directory /pjmedia/src/pjmedia-audiodev/
and add it to the pjmedia_audiodev project
6] Copy errno.c
and audiodev.c
from the SRC_Files_for_PJSIP_2.1
folder into the same directory /pjmedia/src/pjmedia-audiodev/
7] Copy and overwrite errno.h
and config.h
from the SRC_Files_for_PJSIP_2.1
folder into /pjmedia/include/pjmedia-audiodev.h
8] Edit the file /pjmedia/build/Make
adding bdimad_dev.o
to PJMEDIA_AUDIODEV_OBJ
, for example adding the following lines:
1 2 3 | export PJMEDIA_AUDIODEV_OBJS += audiodev.o audiotest.o errno.o \ coreaudio_dev.o legacy_dev.o null_dev.o pa_dev.o wmme_dev.o \ alsa_dev.o bb10_dev.o bdimad_dev.o |
export PJMEDIA_AUDIODEV_OBJS += audiodev.o audiotest.o errno.o \ coreaudio_dev.o legacy_dev.o null_dev.o pa_dev.o wmme_dev.o \ alsa_dev.o bb10_dev.o bdimad_dev.o
9] Copy libbdIMADpj.so
and libbdClientValidation.a
libraries to /third_party/lib/
10] For cross-compile mode only, copy the libasound.so.2.0.0
in your building tree, renaming it to libasound.so
, or creating a link with that name.
11] Create (or edit) in pjsip project directory a file user.mak
with the following lines:
1 2 3 | #link the bdSound libraries export LDFLAGS += -L$(PJDIR)/third_party/lib/-lbdIMADpj -lbdClientValidation export CFLAGS += -march=armv7-a |
#link the bdSound libraries export LDFLAGS += -L$(PJDIR)/third_party/lib/-lbdIMADpj -lbdClientValidation export CFLAGS += -march=armv7-a
12] In cross-compile mode only, edit the above file user.mak
adding also the following lines:
1 2 | #link the alsa library export LDFLAGS += -L/path/to/alsa/lib -lasound |
#link the alsa library export LDFLAGS += -L/path/to/alsa/lib -lasound
13] Open a shell in pjsip project directory then run:
1 2 3 | ./configure
make dep
make |
./configure make dep make
14] Executable output file will be in pjsip-apps/bin
15] Finally, be sure to disable the following feature in PJSIP application; for example in PJSUA, pass the following line arguments to the application
1 | --ec-tail=0 --no-vad --capture-lat=0 --playback-lat=0 |
--ec-tail=0 --no-vad --capture-lat=0 --playback-lat=0