Changeset 4162 for pjproject/trunk


Ignore:
Timestamp:
Jun 11, 2012 4:17:54 AM (12 years ago)
Author:
nanang
Message:

Re #1532: put back the 'redundant' loop at the beginning.

File:
1 edited

Legend:

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

    r4161 r4162  
    17981798    pj_mutex_lock(conf->mutex); 
    17991799 
    1800     /* Get frames from all ports, and "mix" the signal  
    1801      * to mix_buf of all listeners of the port. 
    1802      */ 
    1803     for (i=0, ci=0; i < conf->max_ports && ci < conf->port_cnt; ++i) { 
     1800    /* Reset port source count. We will only reset port's mix 
     1801     * buffer when we have someone transmitting to it. 
     1802     */ 
     1803    for (i=0, ci=0; i<conf->max_ports && ci < conf->port_cnt; ++i) { 
    18041804        struct conf_port *conf_port = conf->ports[i]; 
    1805         pj_int32_t level = 0; 
    18061805 
    18071806        /* Skip empty port. */ 
     
    18121811        ++ci; 
    18131812 
    1814         /* Reset buffer (only necessary if more than one transmitter) & 
    1815          * reset auto adjustment level for mixed signal */ 
     1813        /* Reset buffer (only necessary if more than one transmitter) and 
     1814         * reset auto adjustment level for mixed signal. 
     1815         */ 
    18161816        conf_port->mix_adj = NORMAL_LEVEL; 
    18171817        if (conf_port->transmitter_cnt > 1) { 
     
    18191819                     conf->samples_per_frame*sizeof(conf_port->mix_buf[0])); 
    18201820        } 
     1821    } 
     1822 
     1823    /* Get frames from all ports, and "mix" the signal  
     1824     * to mix_buf of all listeners of the port. 
     1825     */ 
     1826    for (i=0, ci=0; i < conf->max_ports && ci < conf->port_cnt; ++i) { 
     1827        struct conf_port *conf_port = conf->ports[i]; 
     1828        pj_int32_t level = 0; 
     1829 
     1830        /* Skip empty port. */ 
     1831        if (!conf_port) 
     1832            continue; 
     1833 
     1834        /* Var "ci" is to count how many ports have been visited so far. */ 
     1835        ++ci; 
    18211836 
    18221837        /* Skip if we're not allowed to receive from this port. */ 
Note: See TracChangeset for help on using the changeset viewer.