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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
  15. #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
  16. #define SHOW_TIME(text)
  17. #else
  18. #ifdef DEBUG_ENABLED
  19. #define ENTER(text) debug_enter(text)
  20. #define SHOW(format,...) debug_show(format,__VA_ARGS__);
  21. #define LOGI(format,...) debug_show(format,__VA_ARGS__);
  22. #define LOGE(format,...) debug_show(format,__VA_ARGS__);
  23. #define SHOW_TIME(text) debug_time(text);
  24. extern void debug_enter(const char* text);
  25. extern void debug_show(const char* format,...);
  26. extern void debug_time(const char* text);
  27. #else
  28. #ifdef NO_VARIADIC_MACROS
  29. #define SHOW(format) // VC6 doesn't allow "..."
  30. #define LOGI(format) // VC6 doesn't allow "..."
  31. #define LOGE(format) // VC6 doesn't allow "..."
  32. #else
  33. #define SHOW(format,...)
  34. #define LOGI(format,...)
  35. #define LOGE(format,...)
  36. #endif
  37. #define SHOW_TIME(text)
  38. #define ENTER(text)
  39. #endif
  40. #endif
  41. #endif