1 #include "mpg123lib_intern.h" 2 3 int attribute_align_arg mpg123_feature2(int key) 4 { 5 return mpg123_feature(key); 6 } 7 8 int attribute_align_arg mpg123_feature(const enum mpg123_feature_set key) 9 { 10 switch(key) 11 { 12 case MPG123_FEATURE_ABI_UTF8OPEN: 13 #ifdef WANT_WIN32_UNICODE 14 return 1; 15 #else 16 return 0; 17 #endif /* WANT_WIN32_UNICODE */ 18 19 case MPG123_FEATURE_OUTPUT_8BIT: 20 #ifdef NO_8BIT 21 return 0; 22 #else 23 return 1; 24 #endif /* mpg123_output_8bit */ 25 26 case MPG123_FEATURE_OUTPUT_16BIT: 27 #ifdef NO_16BIT 28 return 0; 29 #else 30 return 1; 31 #endif /* mpg123_output_16bit */ 32 33 case MPG123_FEATURE_OUTPUT_32BIT: 34 #ifdef NO_32BIT 35 return 0; 36 #else 37 return 1; 38 #endif /* mpg123_output_32bit */ 39 40 case MPG123_FEATURE_OUTPUT_FLOAT32: 41 #if defined(NO_REAL) || defined(REAL_IS_DOUBLE) 42 return 0; 43 #else 44 return 1; 45 #endif 46 47 case MPG123_FEATURE_OUTPUT_FLOAT64: 48 #if defined(NO_REAL) || !defined(REAL_IS_DOUBLE) 49 return 0; 50 #else 51 return 1; 52 #endif 53 54 case MPG123_FEATURE_PARSE_ID3V2: 55 #ifdef NO_ID3V2 56 return 0; 57 #else 58 return 1; 59 #endif /* NO_ID3V2 */ 60 61 case MPG123_FEATURE_DECODE_LAYER1: 62 #ifdef NO_LAYER1 63 return 0; 64 #else 65 return 1; 66 #endif /* NO_LAYER1 */ 67 68 case MPG123_FEATURE_DECODE_LAYER2: 69 #ifdef NO_LAYER2 70 return 0; 71 #else 72 return 1; 73 #endif /* NO_LAYER2 */ 74 75 case MPG123_FEATURE_DECODE_LAYER3: 76 #ifdef NO_LAYER3 77 return 0; 78 #else 79 return 1; 80 #endif /* NO_LAYER3 */ 81 82 case MPG123_FEATURE_DECODE_ACCURATE: 83 #ifdef ACCURATE_ROUNDING 84 return 1; 85 #else 86 return 0; 87 #endif /* ACCURATE_ROUNDING */ 88 89 case MPG123_FEATURE_DECODE_DOWNSAMPLE: 90 #ifdef NO_DOWNSAMPLE 91 return 0; 92 #else 93 return 1; 94 #endif /* NO_DOWNSAMPLE */ 95 96 case MPG123_FEATURE_DECODE_NTOM: 97 #ifdef NO_NTOM 98 return 0; 99 #else 100 return 1; 101 #endif /* NO_NTOM */ 102 103 case MPG123_FEATURE_PARSE_ICY: 104 #ifdef NO_ICY 105 return 0; 106 #else 107 return 1; 108 #endif /* NO_ICY */ 109 110 case MPG123_FEATURE_INDEX: 111 #ifdef FRAME_INDEX 112 return 1; 113 #else 114 return 0; 115 #endif /* FRAME_INDEX */ 116 case MPG123_FEATURE_TIMEOUT_READ: 117 #ifdef TIMEOUT_READ 118 return 1; 119 #else 120 return 0; 121 #endif 122 case MPG123_FEATURE_EQUALIZER: 123 #ifndef NO_EQUALIZER 124 return 1; 125 #else 126 return 0; 127 #endif 128 case MPG123_FEATURE_MOREINFO: 129 #ifndef NO_MOREINFO 130 return 1; 131 #else 132 return 0; 133 #endif 134 135 default: return 0; 136 } 137 } 138