Compiling PJSIP with bdIMAD for Microsoft Windows and test it with PJSUA is straighforward. For general PJSIP compilation issues please refers to PJSIP wiki.
Once the PJSIP project has been downloaded from the PJSIP website, it is necessary to follow these additional steps to compile PJSIP and PJSUA with bdIMAD support.
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 a directory containing the bdIMADpj.lib
and bdClientValidation.lib
files from bdSound and link these libraries to PJSUA project;
Only for bdIMAD 2.0.0-beta and higher versions:
– replace bdimad.h
in PJDIR/third_party/bdsound/include
getting the one from the Modified_Files/pjsip
folder of the downloaded package.
– replace bdimad_dev.c
in PJDIR/pjmedia/src/pjmedia-audiodev
getting the one from the Modified_Files/pjsip
folder of the downloaded package.
3] Compile the whole PJSIP project
4] Copy bdIMADpj.dll
into the folder containing the PJSUA executable (/pjsip-apps/bin
)
5] To start the PJSUA application be sure to disable the following feature in PJSIP application, passing to PJSUA executable the following command line arguments:
--ec-tail=0 --no-vad --capture-lat=0 --playback-lat=0
6] Launch PJSUA application (be sure that the bdIMADpj.dll
is reachable from the executable)