Ignore:
Timestamp:
Jan 19, 2008 9:39:52 AM (16 years ago)
Author:
bennylp
Message:

More work on ticket #438: Workaround for frame bursts from audio devices. See the ticket for more information

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/delaybuf.c

    r1669 r1715  
    4141/* Since there are two operations performed (get & put), */ 
    4242/* these macros value must be minimum 2 and should be even number */ 
    43 #define WAITING_COUNT   8 
    44 #define LEARN_COUNT     8 
     43#define WAITING_COUNT   4 
     44#define LEARN_COUNT     16 
     45 
     46/* Number of buffers to add to learnt level for additional stability */ 
     47#define SAFE_MARGIN     2 
     48 
     49/* 
     50 * Some experimental data (with SAFE_MARGIN=1): 
     51 * 
     52 * System 1: 
     53 *  - XP, WMME, 10ms ptime,  
     54 *  - Sennheiser Headset+USB sound card 
     55 *  - Stable delaybuf level: 6, on WAITING_COUNT=4 and LEARNING_COUNT=48 
     56 * 
     57 * System 2: 
     58 *  - XP, WMME, 10ms ptime 
     59 *  - Onboard SoundMAX Digital Audio 
     60 *  - Stable delaybuf level: 6, on WAITING_COUNT=4 and LEARNING_COUNT=48 
     61 */ 
    4562 
    4663struct pjmedia_delay_buf 
     
    134151            b->state_count++; 
    135152            if (b->state_count == LEARN_COUNT) { 
    136                 /* give ONE frame compensation */ 
    137                 b->max_level += 1; 
     153                /* give SAFE_MARGIN compensation for added stability */ 
     154                b->max_level += SAFE_MARGIN; 
    138155                 
    139156                PJ_LOG(5,(b->obj_name,"Delay buffer start running, level=%u", 
Note: See TracChangeset for help on using the changeset viewer.