Ignore:
Timestamp:
May 2, 2007 11:29:37 AM (17 years ago)
Author:
bennylp
Message:

PJSUA-LIB was ported to Symbian and added simple Symbian app. Testing follows

File:
1 edited

Legend:

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

    r1177 r1242  
    218218#else /* PJMEDIA_HAS_LIBRESAMPLE */ 
    219219 
    220 int pjmedia_resample_resample_excluded; 
     220/* 
     221 * This is the configuration when sample rate conversion is disabled. 
     222 */ 
     223struct pjmedia_resample 
     224{ 
     225        unsigned samples_per_frame; 
     226}; 
     227 
     228PJ_DEF(pj_status_t) pjmedia_resample_create( pj_pool_t *pool, 
     229                                             pj_bool_t high_quality, 
     230                                             pj_bool_t large_filter, 
     231                                             unsigned channel_count, 
     232                                             unsigned rate_in, 
     233                                             unsigned rate_out, 
     234                                             unsigned samples_per_frame, 
     235                                             pjmedia_resample **p_resample)  
     236{ 
     237        pjmedia_resample *resample; 
     238         
     239        PJ_ASSERT_RETURN(rate_in == rate_out, PJ_EINVALIDOP); 
     240 
     241        PJ_UNUSED_ARG(high_quality); 
     242        PJ_UNUSED_ARG(large_filter); 
     243        PJ_UNUSED_ARG(channel_count); 
     244        PJ_UNUSED_ARG(rate_in); 
     245        PJ_UNUSED_ARG(rate_out); 
     246                 
     247        resample = PJ_POOL_ZALLOC_T(pool, pjmedia_resample); 
     248        resample->samples_per_frame = samples_per_frame; 
     249         
     250        *p_resample = resample; 
     251         
     252        return PJ_SUCCESS; 
     253} 
     254 
     255PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample, 
     256                                   const pj_int16_t *input, 
     257                                   pj_int16_t *output )  
     258{ 
     259        pjmedia_copy_samples(output, input, resample->samples_per_frame); 
     260} 
     261 
     262PJ_DEF(unsigned) pjmedia_resample_get_input_size(pjmedia_resample *resample)  
     263{ 
     264        return resample->samples_per_frame; 
     265} 
     266 
     267PJ_DEF(void) pjmedia_resample_destroy(pjmedia_resample *resample)  
     268{ 
     269        PJ_UNUSED_ARG(resample); 
     270} 
    221271 
    222272#endif  /* PJMEDIA_HAS_LIBRESAMPLE */ 
Note: See TracChangeset for help on using the changeset viewer.