Unified · Split
| @@ -92,6 +92,7 @@ clip_mode() · 91 unmodified lines | |||
| 92 | check_function_exists(alarm HAVE_ALARM) | 92 | check_function_exists(alarm HAVE_ALARM) |
| 93 | check_function_exists(signal HAVE_SIGNAL) | 93 | check_function_exists(signal HAVE_SIGNAL) |
| 94 | 94 | ||
| 95 | check_include_file(stdbool.h HAVE_STDBOOL_H) | ||
| 95 | check_include_file(sys/times.h HAVE_SYS_TIMES_H) | 96 | check_include_file(sys/times.h HAVE_SYS_TIMES_H) |
| 96 | check_include_file(unistd.h HAVE_UNISTD_H) | 97 | check_include_file(unistd.h HAVE_UNISTD_H) |
| 97 | 98 | ||
| @@ -48,6 +48,9 @@ · 47 unmodified lines | |||
| 48 | /* Set to 1 if you have libsndfile. */ | 48 | /* Set to 1 if you have libsndfile. */ |
| 49 | #cmakedefine01 HAVE_SNDFILE | 49 | #cmakedefine01 HAVE_SNDFILE |
| 50 | 50 | ||
| 51 | /* Define to 1 if you have the <stdbool.h> header file. */ | ||
| 52 | #cmakedefine HAVE_STDBOOL_H | ||
| 53 | |||
| 51 | /* Define to 1 if you have the <stdint.h> header file. */ | 54 | /* Define to 1 if you have the <stdint.h> header file. */ |
| 52 | #cmakedefine01 HAVE_STDINT_H | 55 | #cmakedefine01 HAVE_STDINT_H |
| 53 | 56 | ||
| @@ -87,6 +87,7 @@ AS_IF([test "x${build_os}${host_os}" = "xmingw32mingw32"], [ · 86 unmodified lines | |||
| 87 | ]) | 87 | ]) |
| 88 | 88 | ||
| 89 | AC_HEADER_STDC | 89 | AC_HEADER_STDC |
| 90 | AC_HEADER_STDBOOL | ||
| 90 | 91 | ||
| 91 | AC_CHECK_HEADERS([stdint.h sys/times.h]) | 92 | AC_CHECK_HEADERS([stdint.h sys/times.h]) |
| 92 | 93 | ||
| @@ -10,6 +10,9 @@ · 9 unmodified lines | |||
| 10 | #define COMMON_H_INCLUDED | 10 | #define COMMON_H_INCLUDED |
| 11 | 11 | ||
| 12 | #include <stdint.h> | 12 | #include <stdint.h> |
| 13 | #ifdef HAVE_STDBOOL_H | ||
| 14 | #include <stdbool.h> | ||
| 15 | #endif | ||
| 13 | 16 | ||
| 14 | #include <math.h> | 17 | #include <math.h> |
| 15 | 18 | ||
| @@ -55,7 +55,7 @@ linear_vari_process (SRC_STATE *state, SRC_DATA *data) · 54 unmodified lines | |||
| 55 | { /* If we have just been reset, set the last_value data. */ | 55 | { /* If we have just been reset, set the last_value data. */ |
| 56 | for (ch = 0 ; ch < priv->channels ; ch++) | 56 | for (ch = 0 ; ch < priv->channels ; ch++) |
| 57 | priv->last_value [ch] = data->data_in [ch] ; | 57 | priv->last_value [ch] = data->data_in [ch] ; |
| 58 | priv->dirty = 1 ; | 58 | priv->dirty = true ; |
| 59 | } ; | 59 | } ; |
| 60 | 60 | ||
| 61 | priv->in_count = data->input_frames * priv->channels ; | 61 | priv->in_count = data->input_frames * priv->channels ; |
| @@ -203,7 +203,7 @@ linear_reset (SRC_STATE *state) · 141 unmodified lines | |||
| 203 | return ; | 203 | return ; |
| 204 | 204 | ||
| 205 | priv->channels = state->channels ; | 205 | priv->channels = state->channels ; |
| 206 | priv->dirty = 0 ; | 206 | priv->dirty = false ; |
| 207 | memset (priv->last_value, 0, sizeof (priv->last_value [0]) * priv->channels) ; | 207 | memset (priv->last_value, 0, sizeof (priv->last_value [0]) * priv->channels) ; |
| 208 | 208 | ||
| 209 | return ; | 209 | return ; |
| @@ -26,7 +26,7 @@ static int zoh_copy (SRC_STATE *from, SRC_STATE *to) ; · 25 unmodified lines | |||
| 26 | typedef struct | 26 | typedef struct |
| 27 | { int zoh_magic_marker ; | 27 | { int zoh_magic_marker ; |
| 28 | int channels ; | 28 | int channels ; |
| 29 | int dirty ; | 29 | bool dirty ; |
| 30 | long in_count, in_used ; | 30 | long in_count, in_used ; |
| 31 | long out_count, out_gen ; | 31 | long out_count, out_gen ; |
| 32 | float last_value [] ; | 32 | float last_value [] ; |
| @@ -53,7 +53,7 @@ zoh_vari_process (SRC_STATE *state, SRC_DATA *data) · 20 unmodified lines | |||
| 53 | { /* If we have just been reset, set the last_value data. */ | 53 | { /* If we have just been reset, set the last_value data. */ |
| 54 | for (ch = 0 ; ch < priv->channels ; ch++) | 54 | for (ch = 0 ; ch < priv->channels ; ch++) |
| 55 | priv->last_value [ch] = data->data_in [ch] ; | 55 | priv->last_value [ch] = data->data_in [ch] ; |
| 56 | priv->dirty = 1 ; | 56 | priv->dirty = true ; |
| 57 | } ; | 57 | } ; |
| 58 | 58 | ||
| 59 | priv->in_count = data->input_frames * priv->channels ; | 59 | priv->in_count = data->input_frames * priv->channels ; |
| @@ -194,7 +194,7 @@ zoh_reset (SRC_STATE *state) · 134 unmodified lines | |||
| 194 | return ; | 194 | return ; |
| 195 | 195 | ||
| 196 | priv->channels = state->channels ; | 196 | priv->channels = state->channels ; |
| 197 | priv->dirty = 0 ; | 197 | priv->dirty = false ; |
| 198 | memset (priv->last_value, 0, sizeof (priv->last_value [0]) * priv->channels) ; | 198 | memset (priv->last_value, 0, sizeof (priv->last_value [0]) * priv->channels) ; |
| 199 | 199 | ||
| 200 | return ; | 200 | return ; |