config.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include <pj/types.h>
  2. /* Check if we need to use the fixed point version */
  3. #if !defined(PJ_HAS_FLOATING_POINT) || PJ_HAS_FLOATING_POINT==0
  4. # define FIXED_POINT
  5. # define USE_KISS_FFT
  6. #else
  7. # define FLOATING_POINT
  8. # define USE_SMALLFT
  9. #endif
  10. #define EXPORT
  11. #if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
  12. (defined(PJ_WIN64) && PJ_WIN64!=0) || \
  13. (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0)
  14. # include "../../speex/win32/config.h"
  15. #else
  16. #define inline __inline
  17. #define restrict
  18. #endif
  19. #ifdef _MSC_VER
  20. # pragma warning(disable: 4100) // unreferenced formal parameter
  21. # pragma warning(disable: 4101) // unreferenced local variable
  22. # pragma warning(disable: 4244) // conversion from 'double ' to 'float '
  23. # pragma warning(disable: 4305) // truncation from 'const double ' to 'float '
  24. # pragma warning(disable: 4018) // signed/unsigned mismatch
  25. # pragma warning(disable: 4456) // declaration of '[var]' hides previous local declaration
  26. # pragma warning(disable: 4267) // conversion from 'size_t' to 'int', possible loss of data
  27. # pragma warning(disable: 4706) // assignment within conditional expression
  28. //# pragma warning(disable: 4701) // local variable used without initialized
  29. #endif
  30. #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 402
  31. # pragma GCC diagnostic ignored "-Wpragmas"
  32. # pragma GCC diagnostic ignored "-Wunknown-warning-option"
  33. # pragma GCC diagnostic ignored "-Wunused-but-set-variable"
  34. #endif
  35. #include <pj/log.h>
  36. /*
  37. * Override miscellaneous Speex functions.
  38. */
  39. #define OVERRIDE_SPEEX_ERROR
  40. #define speex_error(str) PJ_LOG(4,("speex", "error: %s", str))
  41. #define OVERRIDE_SPEEX_WARNING
  42. #define speex_warning(str) PJ_LOG(5,("speex", "warning: %s", str))
  43. #define OVERRIDE_SPEEX_WARNING_INT
  44. #define speex_warning_int(str,val) PJ_LOG(5,("speex", "warning: %s: %d", str, val))