Ignore:
Timestamp:
Feb 28, 2008 8:22:16 PM (11 years ago)
Author:
bennylp
Message:

Modify WSOLA discard to support erasing frame from non-contiguous buffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/wsola.h

    r1824 r1827  
    5959     * Specify that the WSOLA will not be used for PLC. 
    6060     */ 
    61     PJMEDIA_WSOLA_NO_PLC = 2 
     61    PJMEDIA_WSOLA_NO_PLC = 2, 
     62 
     63    /** 
     64     * Specify that the WSOLA will not be used to discard frames in 
     65     * non-contiguous buffer. 
     66     */ 
     67    PJMEDIA_WSOLA_NO_DISCARD = 4 
    6268}; 
    6369 
     
    130136/** 
    131137 * Compress or compact the specified buffer by removing some audio samples 
    132  * from the buffer, without altering the pitch. 
     138 * from the buffer, without altering the pitch. For this function to work,  
     139 * total length of the buffer must be more than twice \a erase_cnt. 
    133140 *  
    134141 * @param wsola     WSOLA session. 
    135  * @param buf       Pointer to buffer. For this function to work, the buffer 
    136  *                  must contain more than twice \a erase_cnt number of  
    137  *                  samples. 
    138  * @param buf_cnt   Number of samples in the buffer. 
     142 * @param buf1      Pointer to buffer.  
     143 * @param buf1_cnt  Number of samples in the buffer. 
     144 * @param buf2      Pointer to second buffer, if the buffer is not 
     145 *                  contiguous. Otherwise this parameter must be NULL. 
     146 * @param buf2_cnt  Number of samples in the second buffer, if the buffer 
     147 *                  is not contiguous. Otherwise this parameter should be 
     148 *                  zero. 
    139149 * @param erase_cnt On input, specify the number of samples to be erased. 
    140150 *                  This function may erase more or less than the requested  
     
    147157 */ 
    148158PJ_DECL(pj_status_t) pjmedia_wsola_discard(pjmedia_wsola *wsola,  
    149                                            short buf[], 
    150                                            unsigned buf_cnt,  
     159                                           short buf1[], 
     160                                           unsigned buf1_cnt,  
     161                                           short buf2[], 
     162                                           unsigned buf2_cnt, 
    151163                                           unsigned *erase_cnt); 
    152164 
Note: See TracChangeset for help on using the changeset viewer.