Ignore:
Timestamp:
May 30, 2008 11:30:24 AM (16 years ago)
Author:
nanang
Message:

Updated delaybuf to learn burst level in realtime instead of only in the beginning, this can optimize the latency and increase adaptivity

File:
1 edited

Legend:

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

    r1866 r1972  
    308308    struct splitcomb *sc = (struct splitcomb*) splitcomb; 
    309309    struct reverse_port *rport; 
    310     unsigned buf_cnt; 
     310    unsigned buf_cnt, ptime; 
    311311    pjmedia_port *port; 
    312312    pj_status_t status; 
     
    347347        buf_cnt = MAX_BUF_CNT; 
    348348 
     349    ptime = port->info.samples_per_frame * 1000 / port->info.clock_rate / 
     350            port->info.channel_count; 
     351 
    349352    rport->max_burst = MAX_BURST; 
    350353    rport->max_null_frames = MAX_NULL_FRAMES; 
     
    354357                                      port->info.clock_rate, 
    355358                                      port->info.samples_per_frame, 
    356                                       buf_cnt, -1, 0, 
     359                                      port->info.channel_count, 
     360                                      buf_cnt * ptime, 0, 
    357361                                      &rport->buf[DIR_DOWNSTREAM].dbuf); 
    358362    if (status != PJ_SUCCESS) { 
     
    364368                                      port->info.clock_rate, 
    365369                                      port->info.samples_per_frame, 
    366                                       buf_cnt, -1, 0, 
     370                                      port->info.channel_count, 
     371                                      buf_cnt * ptime, 0, 
    367372                                      &rport->buf[DIR_UPSTREAM].dbuf); 
    368373    if (status != PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.