Ignore:
Timestamp:
Jul 17, 2009 11:37:42 AM (15 years ago)
Author:
bennylp
Message:

More ticket #720: added Win32 target in VS2005 project

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsystest/systest.c

    r2836 r2839  
    378378    rec_id = PJSUA_INVALID_ID; 
    379379 
     380    status = pjsua_player_create(&filename, 0, &play_id); 
     381    if (status != PJ_SUCCESS) 
     382        goto on_return; 
     383 
     384    play_slot = pjsua_player_get_conf_port(play_id); 
     385 
     386    status = pjsua_conf_connect(play_slot, 0); 
     387    if (status != PJ_SUCCESS) 
     388        goto on_return; 
     389 
    380390    key = gui_msgbox(title, 
    381                      "Recording has been stopped. Press OK to playback " 
    382                      "the recorded audio.",  
    383                       WITH_OK); 
    384      
    385     status = pjsua_player_create(&filename, 0, &play_id); 
    386     if (status != PJ_SUCCESS) 
    387         goto on_return; 
    388  
    389     play_slot = pjsua_player_get_conf_port(play_id); 
    390  
    391     status = pjsua_conf_connect(play_slot, 0); 
    392     if (status != PJ_SUCCESS) 
    393         goto on_return; 
    394  
    395     key = gui_msgbox(title, 
     391                     "Recording has been stopped. " 
    396392                     "The recorded audio is being played now to " 
    397393                     "the speaker device, in a loop. Listen for " 
     
    487483    param.rec_id = systest.rec_id; 
    488484    param.play_id = systest.play_id; 
    489     param.clock_rate = systest.media_cfg.clock_rate; 
     485    param.clock_rate = systest.media_cfg.snd_clock_rate; 
    490486    param.channel_count = systest.media_cfg.channel_count; 
    491487    param.samples_per_frame = param.clock_rate * param.channel_count *  
     
    569565 
    570566        pj_ansi_snprintf(drifttext, sizeof(drifttext), 
    571                         "Clock drifts detected. Capture device " 
    572                         "is running %d samples per second %s " 
     567                        "Clock drifts detected. Capture " 
     568                        "is %d samples/sec %s " 
    573569                        "than the playback device", 
    574570                        drift, which); 
     
    681677        lat = (max_echo_pos - max_signal_pos) * 1000 / wav->info.clock_rate; 
    682678 
    683 #if 1 
     679#if 0 
    684680        PJ_LOG(4,(THIS_FILE, "Signal at %dms, echo at %d ms, latency %d ms", 
    685681                  max_signal_pos * 1000 / wav->info.clock_rate, 
     
    771767 
    772768    /* We're running */ 
     769    PJ_LOG(3,(THIS_FILE, "Please wait while test is running (~10 sec)")); 
    773770    gui_sleep(10); 
    774771 
     
    947944    len = strlen(textbuf); 
    948945 
    949     pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Clock rate: %d\r\n", 
     946    pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Test clock rate: %d\r\n", 
    950947                     systest.media_cfg.clock_rate); 
     948    len = strlen(textbuf); 
     949 
     950    pj_ansi_snprintf(textbuf+len, sizeof(textbuf)-len, "Device clock rate: %d\r\n", 
     951                     systest.media_cfg.snd_clock_rate); 
    951952    len = strlen(textbuf); 
    952953 
     
    10321033    pjsua_config_default(&systest.ua_cfg); 
    10331034    pjsua_media_config_default(&systest.media_cfg); 
    1034     systest.media_cfg.clock_rate = CLOCK_RATE; 
     1035    systest.media_cfg.clock_rate = TEST_CLOCK_RATE; 
     1036    systest.media_cfg.snd_clock_rate = DEV_CLOCK_RATE; 
    10351037    if (OVERRIDE_AUD_FRAME_PTIME) 
    10361038        systest.media_cfg.audio_frame_ptime = OVERRIDE_AUD_FRAME_PTIME; 
    10371039    systest.media_cfg.channel_count = CHANNEL_COUNT; 
    1038     systest.rec_id = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV; 
    1039     systest.play_id = PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV; 
     1040    systest.rec_id = REC_DEV_ID; 
     1041    systest.play_id = PLAY_DEV_ID; 
    10401042    systest.media_cfg.ec_tail_len = 0; 
    10411043 
Note: See TracChangeset for help on using the changeset viewer.