eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
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.

debug.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef DEBUG_H
  2. #define DEBUG_H
  3. //#define DEBUG_ENABLED
  4. #ifdef ANDROID
  5. #include <android/log.h>
  6. #define LOG_TAG "eSpeak"
  7. #ifdef DEBUG_ENABLED
  8. #define ENTER(text) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, text)
  9. #define SHOW(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
  10. #else
  11. #define ENTER(text)
  12. #define SHOW(format,...)
  13. #endif
  14. #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
  15. #define SHOW_TIME(text)
  16. #else
  17. #ifdef DEBUG_ENABLED
  18. #define ENTER(text) debug_enter(text)
  19. #define SHOW(format,...) debug_show(format,__VA_ARGS__);
  20. #define LOGE(format,...) debug_show(format,__VA_ARGS__);
  21. #define SHOW_TIME(text) debug_time(text);
  22. extern void debug_enter(const char* text);
  23. extern void debug_show(const char* format,...);
  24. extern void debug_time(const char* text);
  25. #else
  26. #ifdef NO_VARIADIC_MACROS
  27. #define SHOW(format) // VC6 doesn't allow "..."
  28. #define LOGE(format) // VC6 doesn't allow "..."
  29. #else
  30. #define SHOW(format,...)
  31. #define LOGE(format,...)
  32. #endif
  33. #define SHOW_TIME(text)
  34. #define ENTER(text)
  35. #endif
  36. #endif
  37. #endif