From 09c94690a7cd0fc7b631bb6d888441de84b56aad Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 10 May 2010 09:05:19 +0000 Subject: Ref #1068 (misc fixes): added facility to change device ID at run time in pjsystest git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3163 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/pjsystest/systest.c | 4 ++++ pjsip-apps/src/pjsystest/systest.h | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'pjsip-apps/src/pjsystest') diff --git a/pjsip-apps/src/pjsystest/systest.c b/pjsip-apps/src/pjsystest/systest.c index 678b2c0c..2fe3bc69 100644 --- a/pjsip-apps/src/pjsystest/systest.c +++ b/pjsip-apps/src/pjsystest/systest.c @@ -103,6 +103,10 @@ typedef struct systest_t static systest_t systest; static char textbuf[600]; +/* Device ID to test */ +int systest_cap_dev_id = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV; +int systest_play_dev_id = PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV; + static void systest_perror(const char *title, pj_status_t status) { char errmsg[PJ_ERR_MSG_SIZE]; diff --git a/pjsip-apps/src/pjsystest/systest.h b/pjsip-apps/src/pjsystest/systest.h index d2b7ed1f..18f0c181 100644 --- a/pjsip-apps/src/pjsystest/systest.h +++ b/pjsip-apps/src/pjsystest/systest.h @@ -24,8 +24,8 @@ /* * Overrideable parameters */ -#define REC_DEV_ID PJMEDIA_AUD_DEFAULT_CAPTURE_DEV -#define PLAY_DEV_ID PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV +#define REC_DEV_ID systest_cap_dev_id +#define PLAY_DEV_ID systest_play_dev_id //#define REC_DEV_ID 5 //#define PLAY_DEV_ID 5 #define OVERRIDE_AUDDEV_REC_LAT 0 @@ -74,6 +74,10 @@ int systest_run(void); void systest_save_result(const char *filename); void systest_deinit(void); +/* Device ID to test */ +extern int systest_cap_dev_id; +extern int systest_play_dev_id; + /* Test item is used to record the test result */ typedef struct test_item_t { -- cgit v1.2.3