Showing the changes to src (4 of 4 files). Show all
Unified · Split
| @@ -74,7 +74,7 @@ enum SRC_MODE · 73 unmodified lines | ||
| 74 | 74 | SRC_MODE_CALLBACK = 1 |
| 75 | 75 | } ; |
| 76 | 76 | |
| 77 | −enum SRC_ERR | |
| 77 | +typedef enum SRC_ERROR | |
| 78 | 78 | { |
| 79 | 79 | SRC_ERR_NO_ERROR = 0, |
| 80 | 80 | |
| @@ -103,12 +103,12 @@ enum SRC_ERR · 22 unmodified lines | ||
| 103 | 103 | |
| 104 | 104 | /* This must be the last error number. */ |
| 105 | 105 | SRC_ERR_MAX_ERROR |
| 106 | −} ; | |
| 106 | +} SRC_ERROR ; | |
| 107 | 107 | |
| 108 | 108 | struct SRC_STATE_tag |
| 109 | 109 | { double last_ratio, last_position ; |
| 110 | 110 | |
| 111 | − enum SRC_ERR error ; | |
| 111 | + SRC_ERROR error ; | |
| 112 | 112 | int channels ; |
| 113 | 113 | |
| 114 | 114 | /* SRC_MODE_PROCESS or SRC_MODE_CALLBACK */ |
| @@ -118,16 +118,16 @@ struct SRC_STATE_tag · 3 unmodified lines | ||
| 118 | 118 | void *private_data ; |
| 119 | 119 | |
| 120 | 120 | /* Varispeed process function. */ |
| 121 | − enum SRC_ERR (*vari_process) (SRC_STATE *state, SRC_DATA *data) ; | |
| 121 | + SRC_ERROR (*vari_process) (SRC_STATE *state, SRC_DATA *data) ; | |
| 122 | 122 | |
| 123 | 123 | /* Constant speed process function. */ |
| 124 | − enum SRC_ERR (*const_process) (SRC_STATE *state, SRC_DATA *data) ; | |
| 124 | + SRC_ERROR (*const_process) (SRC_STATE *state, SRC_DATA *data) ; | |
| 125 | 125 | |
| 126 | 126 | /* State reset. */ |
| 127 | 127 | void (*reset) (SRC_STATE *state) ; |
| 128 | 128 | |
| 129 | 129 | /* State clone. */ |
| 130 | − enum SRC_ERR (*copy) (SRC_STATE *from, SRC_STATE *to) ; | |
| 130 | + SRC_ERROR (*copy) (SRC_STATE *from, SRC_STATE *to) ; | |
| 131 | 131 | |
| 132 | 132 | /* State private_data close. */ |
| 133 | 133 | void (*close) (SRC_STATE *state) ; |
| @@ -143,19 +143,19 @@ struct SRC_STATE_tag · 9 unmodified lines | ||
| 143 | 143 | const char* sinc_get_name (int src_enum) ; |
| 144 | 144 | const char* sinc_get_description (int src_enum) ; |
| 145 | 145 | |
| 146 | −enum SRC_ERR sinc_set_converter (SRC_STATE *state, int src_enum) ; | |
| 146 | +SRC_ERROR sinc_set_converter (SRC_STATE *state, int src_enum) ; | |
| 147 | 147 | |
| 148 | 148 | /* In src_linear.c */ |
| 149 | 149 | const char* linear_get_name (int src_enum) ; |
| 150 | 150 | const char* linear_get_description (int src_enum) ; |
| 151 | 151 | |
| 152 | −enum SRC_ERR linear_set_converter (SRC_STATE *state, int src_enum) ; | |
| 152 | +SRC_ERROR linear_set_converter (SRC_STATE *state, int src_enum) ; | |
| 153 | 153 | |
| 154 | 154 | /* In src_zoh.c */ |
| 155 | 155 | const char* zoh_get_name (int src_enum) ; |
| 156 | 156 | const char* zoh_get_description (int src_enum) ; |
| 157 | 157 | |
| 158 | −enum SRC_ERR zoh_set_converter (SRC_STATE *state, int src_enum) ; | |
| 158 | +SRC_ERROR zoh_set_converter (SRC_STATE *state, int src_enum) ; | |
| 159 | 159 | |
| 160 | 160 | /*---------------------------------------------------------- |
| 161 | 161 | ** Common static inline functions. |
| @@ -14,9 +14,9 @@ · 13 unmodified lines | ||
| 14 | 14 | #include "src_config.h" |
| 15 | 15 | #include "common.h" |
| 16 | 16 | |
| 17 | −static enum SRC_ERR linear_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 17 | +static SRC_ERROR linear_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 18 | 18 | static void linear_reset (SRC_STATE *state) ; |
| 19 | −static enum SRC_ERR linear_copy (SRC_STATE *from, SRC_STATE *to) ; | |
| 19 | +static SRC_ERROR linear_copy (SRC_STATE *from, SRC_STATE *to) ; | |
| 20 | 20 | static void linear_close (SRC_STATE *state) ; |
| 21 | 21 | |
| 22 | 22 | /*======================================================================================== |
| @@ -37,7 +37,7 @@ typedef struct · 14 unmodified lines | ||
| 37 | 37 | /*---------------------------------------------------------------------------------------- |
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | −static enum SRC_ERR | |
| 40 | +static SRC_ERROR | |
| 41 | 41 | linear_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 42 | 42 | { LINEAR_DATA *priv ; |
| 43 | 43 | double src_ratio, input_index, rem ; |
| @@ -158,7 +158,7 @@ linear_get_description (int src_enum) · 114 unmodified lines | ||
| 158 | 158 | return NULL ; |
| 159 | 159 | } /* linear_get_descrition */ |
| 160 | 160 | |
| 161 | −enum SRC_ERR | |
| 161 | +SRC_ERROR | |
| 162 | 162 | linear_set_converter (SRC_STATE *state, int src_enum) |
| 163 | 163 | { |
| 164 | 164 | LINEAR_DATA *priv = NULL ; |
| @@ -217,7 +217,7 @@ linear_reset (SRC_STATE *state) · 52 unmodified lines | ||
| 217 | 217 | return ; |
| 218 | 218 | } /* linear_reset */ |
| 219 | 219 | |
| 220 | −static enum SRC_ERR | |
| 220 | +SRC_ERROR | |
| 221 | 221 | linear_copy (SRC_STATE *from, SRC_STATE *to) |
| 222 | 222 | { |
| 223 | 223 | if (from->private_data == NULL) |
| @@ -56,16 +56,16 @@ typedef struct · 55 unmodified lines | ||
| 56 | 56 | float *buffer ; |
| 57 | 57 | } SINC_FILTER ; |
| 58 | 58 | |
| 59 | −static enum SRC_ERR sinc_multichan_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 60 | −static enum SRC_ERR sinc_hex_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 61 | −static enum SRC_ERR sinc_quad_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 62 | −static enum SRC_ERR sinc_stereo_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 63 | −static enum SRC_ERR sinc_mono_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 59 | +static SRC_ERROR sinc_multichan_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 60 | +static SRC_ERROR sinc_hex_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 61 | +static SRC_ERROR sinc_quad_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 62 | +static SRC_ERROR sinc_stereo_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 63 | +static SRC_ERROR sinc_mono_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 64 | 64 | |
| 65 | 65 | static int prepare_data (SINC_FILTER *filter, int channels, SRC_DATA *data, int half_filter_chan_len) WARN_UNUSED ; |
| 66 | 66 | |
| 67 | 67 | static void sinc_reset (SRC_STATE *state) ; |
| 68 | −static enum SRC_ERR sinc_copy (SRC_STATE *from, SRC_STATE *to) ; | |
| 68 | +static SRC_ERROR sinc_copy (SRC_STATE *from, SRC_STATE *to) ; | |
| 69 | 69 | static void sinc_close (SRC_STATE *state) ; |
| 70 | 70 | |
| 71 | 71 | static inline increment_t |
| @@ -141,7 +141,7 @@ sinc_get_description (int src_enum) · 69 unmodified lines | ||
| 141 | 141 | return NULL ; |
| 142 | 142 | } /* sinc_get_descrition */ |
| 143 | 143 | |
| 144 | −enum SRC_ERR | |
| 144 | +SRC_ERROR | |
| 145 | 145 | sinc_set_converter (SRC_STATE *state, int src_enum) |
| 146 | 146 | { SINC_FILTER *filter, temp_filter ; |
| 147 | 147 | increment_t count ; |
| @@ -264,7 +264,7 @@ sinc_reset (SRC_STATE *state) · 116 unmodified lines | ||
| 264 | 264 | memset (filter->buffer + filter->b_len, 0xAA, state->channels * sizeof (filter->buffer [0])) ; |
| 265 | 265 | } /* sinc_reset */ |
| 266 | 266 | |
| 267 | −static enum SRC_ERR | |
| 267 | +static SRC_ERROR | |
| 268 | 268 | sinc_copy (SRC_STATE *from, SRC_STATE *to) |
| 269 | 269 | { |
| 270 | 270 | if (from->private_data == NULL) |
| @@ -353,7 +353,7 @@ calc_output_single (SINC_FILTER *filter, increment_t increment, increment_t star · 82 unmodified lines | ||
| 353 | 353 | return (left + right) ; |
| 354 | 354 | } /* calc_output_single */ |
| 355 | 355 | |
| 356 | −static enum SRC_ERR | |
| 356 | +static SRC_ERROR | |
| 357 | 357 | sinc_mono_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 358 | 358 | { SINC_FILTER *filter ; |
| 359 | 359 | double input_index, src_ratio, count, float_increment, terminate, rem ; |
| @@ -509,7 +509,7 @@ calc_output_stereo (SINC_FILTER *filter, int channels, increment_t increment, in · 149 unmodified lines | ||
| 509 | 509 | output [ch] = (float) (scale * (left [ch] + right [ch])) ; |
| 510 | 510 | } /* calc_output_stereo */ |
| 511 | 511 | |
| 512 | −static enum SRC_ERR | |
| 512 | +SRC_ERROR | |
| 513 | 513 | sinc_stereo_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 514 | 514 | { SINC_FILTER *filter ; |
| 515 | 515 | double input_index, src_ratio, count, float_increment, terminate, rem ; |
| @@ -665,7 +665,7 @@ calc_output_quad (SINC_FILTER *filter, int channels, increment_t increment, incr · 149 unmodified lines | ||
| 665 | 665 | output [ch] = (float) (scale * (left [ch] + right [ch])) ; |
| 666 | 666 | } /* calc_output_quad */ |
| 667 | 667 | |
| 668 | −static enum SRC_ERR | |
| 668 | +SRC_ERROR | |
| 669 | 669 | sinc_quad_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 670 | 670 | { SINC_FILTER *filter ; |
| 671 | 671 | double input_index, src_ratio, count, float_increment, terminate, rem ; |
| @@ -820,7 +820,7 @@ calc_output_hex (SINC_FILTER *filter, int channels, increment_t increment, incre · 148 unmodified lines | ||
| 820 | 820 | output [ch] = (float) (scale * (left [ch] + right [ch])) ; |
| 821 | 821 | } /* calc_output_hex */ |
| 822 | 822 | |
| 823 | −static enum SRC_ERR | |
| 823 | +SRC_ERROR | |
| 824 | 824 | sinc_hex_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 825 | 825 | { SINC_FILTER *filter ; |
| 826 | 826 | double input_index, src_ratio, count, float_increment, terminate, rem ; |
| @@ -985,7 +985,7 @@ calc_output_multi (SINC_FILTER *filter, increment_t increment, increment_t start · 158 unmodified lines | ||
| 985 | 985 | return ; |
| 986 | 986 | } /* calc_output_multi */ |
| 987 | 987 | |
| 988 | −static enum SRC_ERR | |
| 988 | +static SRC_ERROR | |
| 989 | 989 | sinc_multichan_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 990 | 990 | { SINC_FILTER *filter ; |
| 991 | 991 | double input_index, src_ratio, count, float_increment, terminate, rem ; |
| @@ -14,9 +14,9 @@ · 13 unmodified lines | ||
| 14 | 14 | #include "src_config.h" |
| 15 | 15 | #include "common.h" |
| 16 | 16 | |
| 17 | −static enum SRC_ERR zoh_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 17 | +static SRC_ERROR zoh_vari_process (SRC_STATE *state, SRC_DATA *data) ; | |
| 18 | 18 | static void zoh_reset (SRC_STATE *state) ; |
| 19 | −static enum SRC_ERR zoh_copy (SRC_STATE *from, SRC_STATE *to) ; | |
| 19 | +static SRC_ERROR zoh_copy (SRC_STATE *from, SRC_STATE *to) ; | |
| 20 | 20 | static void zoh_close (SRC_STATE *state) ; |
| 21 | 21 | |
| 22 | 22 | /*======================================================================================== |
| @@ -35,7 +35,7 @@ typedef struct · 12 unmodified lines | ||
| 35 | 35 | /*---------------------------------------------------------------------------------------- |
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | −static enum SRC_ERR | |
| 38 | +static SRC_ERROR | |
| 39 | 39 | zoh_vari_process (SRC_STATE *state, SRC_DATA *data) |
| 40 | 40 | { ZOH_DATA *priv ; |
| 41 | 41 | double src_ratio, input_index, rem ; |
| @@ -149,7 +149,7 @@ zoh_get_description (int src_enum) · 107 unmodified lines | ||
| 149 | 149 | return NULL ; |
| 150 | 150 | } /* zoh_get_descrition */ |
| 151 | 151 | |
| 152 | −enum SRC_ERR | |
| 152 | +SRC_ERROR | |
| 153 | 153 | zoh_set_converter (SRC_STATE *state, int src_enum) |
| 154 | 154 | { |
| 155 | 155 | ZOH_DATA *priv = NULL ; |
| @@ -208,7 +208,7 @@ zoh_reset (SRC_STATE *state) · 52 unmodified lines | ||
| 208 | 208 | return ; |
| 209 | 209 | } /* zoh_reset */ |
| 210 | 210 | |
| 211 | −static enum SRC_ERR | |
| 211 | +static SRC_ERROR | |
| 212 | 212 | zoh_copy (SRC_STATE *from, SRC_STATE *to) |
| 213 | 213 | { |
| 214 | 214 | if (from->private_data == NULL) |