From fa0d31107cf117f260d8b8678c1d10c1c159df92 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 17 Jul 2009 11:37:42 +0000 Subject: More ticket #720: added Win32 target in VS2005 project git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2839 74dad513-b988-da41-8d7b-12977e46ad98 --- pjproject-vs8.sln | 6 +- pjsip-apps/build/pjsystest.dsp | 7 -- pjsip-apps/build/pjsystest.vcproj | 145 +++++++++++++++++++++++++++++++++++++ pjsip-apps/src/pjsystest/systest.c | 28 +++---- pjsip-apps/src/pjsystest/systest.h | 32 ++++++-- 5 files changed, 188 insertions(+), 30 deletions(-) diff --git a/pjproject-vs8.sln b/pjproject-vs8.sln index ea0e3404..171b7955 100644 --- a/pjproject-vs8.sln +++ b/pjproject-vs8.sln @@ -3157,7 +3157,8 @@ Global {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Mixed Platforms.Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) - {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Win32.ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Win32.ActiveCfg = Debug|Win32 + {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Win32.Build.0 = Debug|Win32 {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) @@ -3195,7 +3196,8 @@ Global {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Mixed Platforms.Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) - {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Win32.ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Win32.ActiveCfg = Release|Win32 + {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Win32.Build.0 = Release|Win32 {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {5E507EA2-CB39-47CA-BD39-49EB58D7A0BB}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) diff --git a/pjsip-apps/build/pjsystest.dsp b/pjsip-apps/build/pjsystest.dsp index d3f45f4d..40e11da2 100644 --- a/pjsip-apps/build/pjsystest.dsp +++ b/pjsip-apps/build/pjsystest.dsp @@ -91,13 +91,6 @@ LINK32=link.exe # Begin Source File SOURCE=..\src\pjsystest\main_console.c - -!IF "$(CFG)" == "pjsystest - Win32 Release" - -!ELSEIF "$(CFG)" == "pjsystest - Win32 Debug" - -!ENDIF - # End Source File # Begin Source File diff --git a/pjsip-apps/build/pjsystest.vcproj b/pjsip-apps/build/pjsystest.vcproj index f3ac233c..5f72a58b 100644 --- a/pjsip-apps/build/pjsystest.vcproj +++ b/pjsip-apps/build/pjsystest.vcproj @@ -14,6 +14,9 @@ + @@ -157,6 +160,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -344,6 +473,22 @@ + + + + + + info.clock_rate; -#if 1 +#if 0 PJ_LOG(4,(THIS_FILE, "Signal at %dms, echo at %d ms, latency %d ms", max_signal_pos * 1000 / wav->info.clock_rate, max_echo_pos * 1000 / wav->info.clock_rate, @@ -770,6 +766,7 @@ static void systest_latency_test(void) /* We're running */ + PJ_LOG(3,(THIS_FILE, "Please wait while test is running (~10 sec)")); gui_sleep(10); /* Done with the test */ @@ -946,10 +943,14 @@ static void systest_display_settings(void) pj_get_version()); len = strlen(textbuf); - pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Clock rate: %d\r\n", + pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Test clock rate: %d\r\n", systest.media_cfg.clock_rate); len = strlen(textbuf); + pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Device clock rate: %d\r\n", + systest.media_cfg.snd_clock_rate); + len = strlen(textbuf); + pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Aud frame ptime: %d\r\n", systest.media_cfg.audio_frame_ptime); len = strlen(textbuf); @@ -1031,12 +1032,13 @@ int systest_init(void) pjsua_config_default(&systest.ua_cfg); pjsua_media_config_default(&systest.media_cfg); - systest.media_cfg.clock_rate = CLOCK_RATE; + systest.media_cfg.clock_rate = TEST_CLOCK_RATE; + systest.media_cfg.snd_clock_rate = DEV_CLOCK_RATE; if (OVERRIDE_AUD_FRAME_PTIME) systest.media_cfg.audio_frame_ptime = OVERRIDE_AUD_FRAME_PTIME; systest.media_cfg.channel_count = CHANNEL_COUNT; - systest.rec_id = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV; - systest.play_id = PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV; + systest.rec_id = REC_DEV_ID; + systest.play_id = PLAY_DEV_ID; systest.media_cfg.ec_tail_len = 0; #if defined(OVERRIDE_AUDDEV_PLAY_LAT) && OVERRIDE_AUDDEV_PLAY_LAT!=0 diff --git a/pjsip-apps/src/pjsystest/systest.h b/pjsip-apps/src/pjsystest/systest.h index 1b802fe7..f5043be2 100644 --- a/pjsip-apps/src/pjsystest/systest.h +++ b/pjsip-apps/src/pjsystest/systest.h @@ -24,12 +24,28 @@ /* * Overrideable parameters */ -#define OVERRIDE_AUDDEV_REC_LAT 100 -#define OVERRIDE_AUDDEV_PLAY_LAT 200 +#define REC_DEV_ID PJMEDIA_AUD_DEFAULT_CAPTURE_DEV +#define PLAY_DEV_ID PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV +//#define REC_DEV_ID 5 +//#define PLAY_DEV_ID 5 +#define OVERRIDE_AUDDEV_REC_LAT 0 +#define OVERRIDE_AUDDEV_PLAY_LAT 0 #define OVERRIDE_AUD_FRAME_PTIME 0 -#define CLOCK_RATE 8000 + +/* Don't change this */ #define CHANNEL_COUNT 1 +/* If you change CLOCK_RATE then the input WAV files need to be + * changed, so normally don't need to change this. + */ +#define TEST_CLOCK_RATE 8000 + +/* You may change sound device's clock rate as long as resampling + * is enabled. + */ +#define DEV_CLOCK_RATE 8000 + + #if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE #define LOG_OUT_PATH "\\PJSYSTEST.LOG" #define RESULT_OUT_PATH "\\PJSYSTEST_RESULT.TXT" @@ -39,11 +55,11 @@ #define WAV_LATENCY_OUT_PATH "\\PJSYSTEST_LATREC.WAV" #else #define LOG_OUT_PATH "PJSYSTEST.LOG" - #define RESULT_OUT_PATH "PJSYSTEST.TXT" - #define WAV_PLAYBACK_PATH "pjsip8.wav" - #define WAV_REC_OUT_PATH "TESTREC.WAV" - #define WAV_TOCK8_PATH "TOCK8.WAV" - #define WAV_LATENCY_OUT_PATH "LATENCY.WAV" + #define RESULT_OUT_PATH "PJSYSTEST_RESULT.TXT" + #define WAV_PLAYBACK_PATH "input.8.wav" + #define WAV_REC_OUT_PATH "PJSYSTEST_TESTREC.WAV" + #define WAV_TOCK8_PATH "tock8.wav" + #define WAV_LATENCY_OUT_PATH "PJSYSTEST_LATREC.WAV" #endif #ifdef __cplusplus -- cgit v1.2.3