Ignore:
Timestamp:
Oct 12, 2007 5:24:32 AM (17 years ago)
Author:
bennylp
Message:

Ticket #398: Initial support for Secret Rabbit Code (aka libsamplerate) sample rate conversionl library

File:
1 edited

Legend:

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

    r1266 r1493  
    2626 
    2727 
    28 #if defined(PJMEDIA_HAS_LIBRESAMPLE) && PJMEDIA_HAS_LIBRESAMPLE != 0 
     28#if PJMEDIA_RESAMPLE_IMP==PJMEDIA_RESAMPLE_LIBRESAMPLE 
    2929 
    3030#include <third_party/resample/include/resamplesubs.h> 
     
    216216 
    217217 
    218 #else /* PJMEDIA_HAS_LIBRESAMPLE */ 
     218#elif PJMEDIA_RESAMPLE_IMP==PJMEDIA_RESAMPLE_NONE 
    219219 
    220220/* 
    221221 * This is the configuration when sample rate conversion is disabled. 
    222222 */ 
    223 struct pjmedia_resample 
    224 { 
    225         unsigned samples_per_frame; 
    226 }; 
    227  
    228223PJ_DEF(pj_status_t) pjmedia_resample_create( pj_pool_t *pool, 
    229224                                             pj_bool_t high_quality, 
     
    235230                                             pjmedia_resample **p_resample)  
    236231{ 
    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; 
     232    PJ_UNUSED_ARG(pool); 
     233    PJ_UNUSED_ARG(high_quality); 
     234    PJ_UNUSED_ARG(large_filter); 
     235    PJ_UNUSED_ARG(channel_count); 
     236    PJ_UNUSED_ARG(rate_in); 
     237    PJ_UNUSED_ARG(rate_out); 
     238    PJ_UNUSED_ARG(samples_per_frame); 
     239    PJ_UNUSED_ARG(p_resample); 
     240 
     241    return PJ_EINVALIDOP; 
    253242} 
    254243 
     
    257246                                   pj_int16_t *output )  
    258247{ 
    259         pjmedia_copy_samples(output, input, resample->samples_per_frame); 
     248    PJ_UNUSED_ARG(resample); 
     249    PJ_UNUSED_ARG(input); 
     250    PJ_UNUSED_ARG(output); 
    260251} 
    261252 
    262253PJ_DEF(unsigned) pjmedia_resample_get_input_size(pjmedia_resample *resample)  
    263254{ 
    264         return resample->samples_per_frame; 
     255    PJ_UNUSED_ARG(resample); 
     256    return 0; 
    265257} 
    266258 
    267259PJ_DEF(void) pjmedia_resample_destroy(pjmedia_resample *resample)  
    268260{ 
    269         PJ_UNUSED_ARG(resample); 
    270 } 
    271  
    272 #endif  /* PJMEDIA_HAS_LIBRESAMPLE */ 
    273  
     261    PJ_UNUSED_ARG(resample); 
     262} 
     263 
     264#endif  /* PJMEDIA_RESAMPLE_IMP */ 
     265 
Note: See TracChangeset for help on using the changeset viewer.