Unified · Split
| @@ -38,6 +38,7 @@ · 37 unmodified lines | |||
| 38 | 38 | ||
| 39 | typedef int32_t increment_t ; | 39 | typedef int32_t increment_t ; |
| 40 | typedef float coeff_t ; | 40 | typedef float coeff_t ; |
| 41 | typedef int _CHECK_SHIFT_BITS[2 * (SHIFT_BITS < sizeof (increment_t) * 8 - 1) - 1]; /* sanity check. */ | ||
| 41 | 42 | ||
| 42 | #include "fastest_coeffs.h" | 43 | #include "fastest_coeffs.h" |
| 43 | #include "mid_qual_coeffs.h" | 44 | #include "mid_qual_coeffs.h" |
| @@ -252,13 +253,6 @@ sinc_state_new (int converter_type, int channels, SRC_ERROR *error) · 208 unmodified lines | |||
| 252 | assert (channels > 0) ; | 253 | assert (channels > 0) ; |
| 253 | assert (error != NULL) ; | 254 | assert (error != NULL) ; |
| 254 | 255 | ||
| 255 | /* Quick sanity check. */ | ||
| 256 | if (SHIFT_BITS >= sizeof (increment_t) * 8 - 1) | ||
| 257 | { | ||
| 258 | *error = SRC_ERR_SHIFT_BITS ; | ||
| 259 | return NULL ; | ||
| 260 | } | ||
| 261 | |||
| 262 | if (channels > MAX_CHANNELS) | 256 | if (channels > MAX_CHANNELS) |
| 263 | { | 257 | { |
| 264 | *error = SRC_ERR_BAD_CHANNEL_COUNT ; | 258 | *error = SRC_ERR_BAD_CHANNEL_COUNT ; |