Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4KB

  1. diff --git a/basics.h b/basics.h
  2. index 7b1d10d..2f813d3 100644
  3. --- a/basics.h
  4. +++ b/basics.h
  5. @@ -38,6 +38,7 @@
  6. #define _ISOC99_SOURCE 1
  7. #define _ISOC9X_SOURCE 1
  8. +#include <stdint.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. @@ -49,14 +50,14 @@
  12. #include "ladspa.h"
  13. -typedef __int8_t int8;
  14. -typedef __uint8_t uint8;
  15. -typedef __int16_t int16;
  16. -typedef __uint16_t uint16;
  17. -typedef __int32_t int32;
  18. -typedef __uint32_t uint32;
  19. -typedef __int64_t int64;
  20. -typedef __uint64_t uint64;
  21. +typedef int8_t int8;
  22. +typedef uint8_t uint8;
  23. +typedef int16_t int16;
  24. +typedef uint16_t uint16;
  25. +typedef int32_t int32;
  26. +typedef uint32_t uint32;
  27. +typedef int64_t int64;
  28. +typedef uint64_t uint64;
  29. #define MIN_GAIN 1e-6 /* -120 dB */
  30. /* smallest non-denormal 32 bit IEEE float is 1.18e-38 */
  31. @@ -124,7 +125,7 @@ T clamp (T value, T lower, T upper)
  32. return value;
  33. }
  34. -static inline float frandom() { return (float) random() / (float) RAND_MAX; }
  35. +static inline float frandom() { return (float) rand() / (float) RAND_MAX; }
  36. /* NB: also true if 0 */
  37. inline bool
  38. diff --git a/dsp/v4f_IIR2.h b/dsp/v4f_IIR2.h
  39. index 7400e04..1e42b56 100644
  40. --- a/dsp/v4f_IIR2.h
  41. +++ b/dsp/v4f_IIR2.h
  42. @@ -32,9 +32,9 @@
  43. namespace DSP {
  44. -#if defined(__APPLE__) || defined(__FreeBSD__)
  45. +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)
  46. -inline float exp10f(float f) {return __exp10f(f);}
  47. +inline float exp10f(float f) {return __builtin_exp10f(f);}
  48. #endif