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/include/pjmedia/config.h

    r1486 r1493  
    128128 
    129129/* 
    130  * **   THIS MACRO IS DEPRECATED in 0.6.   ** 
    131  * ** See libresample for configuring this ** 
    132  * 
    133  * Include small filter table in resample. 
    134  * This adds about 9KB in rdata. 
    135  */ 
    136 /* 
    137 #ifndef PJMEDIA_HAS_SMALL_FILTER 
    138 #   define PJMEDIA_HAS_SMALL_FILTER         1 
    139 #endif 
    140 */ 
    141  
    142 /* 
    143  * **   THIS MACRO IS DEPRECATED in 0.6.   ** 
    144  * ** See libresample for configuring this ** 
    145  * 
    146  * Include large filter table in resample. 
    147  * This adds about 32KB in rdata. 
    148  */ 
    149 /* 
    150 #ifndef PJMEDIA_HAS_LARGE_FILTER 
    151 #   define PJMEDIA_HAS_LARGE_FILTER         1 
    152 #endif 
    153 */ 
    154  
    155 /** 
    156  * Specify whether libresample should be used for the sampling 
    157  * rate conversion. This macro and PJMEDIA_HAS_SPEEX_RESAMPLE 
    158  * are mutually exclusive.  
    159  * 
    160  * Default: 1 (Yes) 
    161  */ 
    162 #ifndef PJMEDIA_HAS_LIBRESAMPLE 
    163 #   define PJMEDIA_HAS_LIBRESAMPLE          1 
    164 #endif 
    165  
    166  
    167 /** 
    168  * Specify whether Speex sample rate convertor should be used for the 
    169  * sampling rate conversion. This macro and PJMEDIA_HAS_LIBRESAMPLE 
    170  * are mutually exclusive. 
    171  * 
    172  * Default: 0 
    173  */ 
    174 #ifndef PJMEDIA_HAS_SPEEX_RESAMPLE 
    175 #   define PJMEDIA_HAS_SPEEX_RESAMPLE       0 
    176 #endif 
    177  
     130 * Warn about obsolete macros. 
     131 * 
     132 * PJMEDIA_HAS_SMALL_FILTER has been deprecated in 0.7. 
     133 */ 
     134#if defined(PJMEDIA_HAS_SMALL_FILTER) 
     135#   ifdef _MSC_VER 
     136#       pragma message("Warning: PJMEDIA_HAS_SMALL_FILTER macro is deprecated"\ 
     137                       " and has no effect") 
     138#   else 
     139#       warning "PJMEDIA_HAS_SMALL_FILTER macro is deprecated and has no effect" 
     140#   endif 
     141#endif 
     142 
     143 
     144/* 
     145 * Warn about obsolete macros. 
     146 * 
     147 * PJMEDIA_HAS_LARGE_FILTER has been deprecated in 0.7. 
     148 */ 
     149#if defined(PJMEDIA_HAS_LARGE_FILTER) 
     150#   ifdef _MSC_VER 
     151#       pragma message("Warning: PJMEDIA_HAS_LARGE_FILTER macro is deprecated"\ 
     152                       " and has no effect") 
     153#   else 
     154#       warning "PJMEDIA_HAS_LARGE_FILTER macro is deprecated" 
     155#   endif 
     156#endif 
     157 
     158 
     159/* 
     160 * These macros are obsolete in 0.7.1 so it will trigger compilation error. 
     161 * Please use PJMEDIA_RESAMPLE_IMP to select the resample implementation 
     162 * to use. 
     163 */ 
     164#ifdef PJMEDIA_HAS_LIBRESAMPLE 
     165#   error "PJMEDIA_HAS_LIBRESAMPLE macro is deprecated. Use '#define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_LIBRESAMPLE'" 
     166#endif 
     167 
     168#ifdef PJMEDIA_HAS_SPEEX_RESAMPLE 
     169#   error "PJMEDIA_HAS_SPEEX_RESAMPLE macro is deprecated. Use '#define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_SPEEX'" 
     170#endif 
     171 
     172 
     173/* 
     174 * Sample rate conversion backends. 
     175 * Select one of these backends in PJMEDIA_RESAMPLE_IMP. 
     176 */ 
     177#define PJMEDIA_RESAMPLE_NONE               1   /**< No resampling.         */ 
     178#define PJMEDIA_RESAMPLE_LIBRESAMPLE        2   /**< Sample rate conversion  
     179                                                     using libresample.  */ 
     180#define PJMEDIA_RESAMPLE_SPEEX              3   /**< Sample rate conversion  
     181                                                     using Speex. */ 
     182#define PJMEDIA_RESAMPLE_LIBSAMPLERATE      4   /**< Sample rate conversion  
     183                                                     using libsamplerate  
     184                                                     (a.k.a Secret Rabbit Code) 
     185                                                 */ 
     186 
     187/** 
     188 * Select which resample implementation to use. Currently pjmedia supports: 
     189 *  - #PJMEDIA_RESAMPLE_LIBRESAMPLE, to use libresample-1.7, this is the default 
     190 *    implementation to be used. 
     191 *  - #PJMEDIA_RESAMPLE_LIBSAMPLERATE, to use libsamplerate implementation 
     192 *    (a.k.a. Secret Rabbit Code). 
     193 *  - #PJMEDIA_RESAMPLE_SPEEX, to use experimental sample rate conversion in 
     194 *    Speex library. 
     195 *  - #PJMEDIA_RESAMPLE_NONE, to disable sample rate conversion. Any calls to 
     196 *    resample function will return error. 
     197 * 
     198 * Default is PJMEDIA_RESAMPLE_LIBRESAMPLE 
     199 */ 
     200#ifndef PJMEDIA_RESAMPLE_IMP 
     201#   define PJMEDIA_RESAMPLE_IMP             PJMEDIA_RESAMPLE_LIBRESAMPLE 
     202#endif 
     203 
     204 
     205/** 
     206 * Specify whether libsamplerate, when used, should be linked statically 
     207 * into the application. This option is only useful for Visual Studio 
     208 * projects, and when this static linking is enabled 
     209 */ 
    178210 
    179211 
Note: See TracChangeset for help on using the changeset viewer.