µGFX library fork

gaudio_rules.h 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * This file is subject to the terms of the GFX License. If a copy of
  3. * the license was not distributed with this file, you can obtain one at:
  4. *
  5. * http://ugfx.org/license.html
  6. */
  7. /**
  8. * @file src/gaudio/gaudio_rules.h
  9. * @brief GAUDIO safety rules header file.
  10. *
  11. * @addtogroup GAUDIO
  12. * @{
  13. */
  14. #ifndef _GAUDIO_RULES_H
  15. #define _GAUDIO_RULES_H
  16. #if GFX_USE_GAUDIO
  17. #if !GAUDIO_NEED_PLAY && !GAUDIO_NEED_RECORD
  18. #error "GAUDIO: GAUDIO_NEED_PLAY and/or GAUDIO_NEED_RECORD is required if GFX_USE_GAUDIO is TRUE"
  19. #endif
  20. #if !GFX_USE_GQUEUE
  21. #if GFX_DISPLAY_RULE_WARNINGS
  22. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  23. #warning "GAUDIO: GFX_USE_GQUEUE is required if GFX_USE_GAUDIO is TRUE. It has been turned on for you."
  24. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  25. COMPILER_WARNING("GAUDIO: GFX_USE_GQUEUE is required if GFX_USE_GAUDIO is TRUE. It has been turned on for you.")
  26. #endif
  27. #endif
  28. #undef GFX_USE_GQUEUE
  29. #define GFX_USE_GQUEUE TRUE
  30. #endif
  31. #if GAUDIO_NEED_PLAY && !GQUEUE_NEED_ASYNC
  32. #if GFX_DISPLAY_RULE_WARNINGS
  33. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  34. #warning "GAUDIO: GQUEUE_NEED_ASYNC is required if GAUDIO_NEED_PLAY is TRUE. It has been turned on for you."
  35. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  36. COMPILER_WARNING("GAUDIO: GQUEUE_NEED_ASYNC is required if GAUDIO_NEED_PLAY is TRUE. It has been turned on for you.")
  37. #endif
  38. #endif
  39. #undef GQUEUE_NEED_ASYNC
  40. #define GQUEUE_NEED_ASYNC TRUE
  41. #endif
  42. #if !GQUEUE_NEED_GSYNC || !GQUEUE_NEED_BUFFERS
  43. #if GFX_DISPLAY_RULE_WARNINGS
  44. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  45. #warning "GAUDIO: GQUEUE_NEED_BUFFERS and GQUEUE_NEED_GSYNC are required if GFX_USE_GAUDIO is TRUE. They have been turned on for you."
  46. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  47. COMPILER_WARNING("GAUDIO: GQUEUE_NEED_BUFFERS and GQUEUE_NEED_GSYNC are required if GFX_USE_GAUDIO is TRUE. They have been turned on for you.")
  48. #endif
  49. #endif
  50. #undef GQUEUE_NEED_BUFFERS
  51. #define GQUEUE_NEED_BUFFERS TRUE
  52. #undef GQUEUE_NEED_GSYNC
  53. #define GQUEUE_NEED_GSYNC TRUE
  54. #endif
  55. #if GFX_USE_GEVENT && !GFX_USE_GTIMER
  56. #if GFX_DISPLAY_RULE_WARNINGS
  57. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  58. #warning "GAUDIO: GFX_USE_GTIMER is required if GFX_USE_GAUDIO and GFX_USE_GEVENT are TRUE. It has been turned on for you."
  59. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  60. COMPILER_WARNING("GAUDIO: GFX_USE_GTIMER is required if GFX_USE_GAUDIO and GFX_USE_GEVENT are TRUE. It has been turned on for you.")
  61. #endif
  62. #endif
  63. #undef GFX_USE_GTIMER
  64. #define GFX_USE_GTIMER TRUE
  65. #endif
  66. #endif
  67. #endif /* _GAUDIO_RULES_H */
  68. /** @} */