ref: 401c9d6ba23498cf1e350eef1a73b7214875bbc5
parent: 71b0a3b5e526fc6fa6ab955cefbd444110408751
author: evpobr <evpobr@gmail.com>
date: Wed Nov 11 10:36:58 EST 2020
Use CPU clip defines properly
--- a/src/samplerate.c
+++ b/src/samplerate.c
@@ -480,15 +480,18 @@
{ len -- ;
scaled_value = in [len] * (8.0 * 0x10000000) ;
- if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= (1.0 * 0x7FFFFFFF))
+#if CPU_CLIPS_POSITIVE == 0
+ if (scaled_value >= (1.0 * 0x7FFFFFFF))
{ out [len] = 0x7fffffff ;
continue ;
} ;
- if (CPU_CLIPS_NEGATIVE == 0 && scaled_value <= (-8.0 * 0x10000000))
+#endif
+#if CPU_CLIPS_NEGATIVE == 0
+ if (scaled_value <= (-8.0 * 0x10000000))
{ out [len] = -1 - 0x7fffffff ;
continue ;
} ;
-
+#endif
out [len] = (int) lrint (scaled_value) ;
} ;