version 2.8
gaudio_rules.h
Go to the documentation of this file.
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 /**
9  * @file src/gaudio/gaudio_rules.h
10  * @brief GAUDIO safety rules header file.
11  *
12  * @addtogroup GAUDIO
13  * @{
14  */
15 
16 #ifndef _GAUDIO_RULES_H
17 #define _GAUDIO_RULES_H
18 
19 #if GFX_USE_GAUDIO
20  #if !GAUDIO_NEED_PLAY && !GAUDIO_NEED_RECORD
21  #error "GAUDIO: GAUDIO_NEED_PLAY and/or GAUDIO_NEED_RECORD is required if GFX_USE_GAUDIO is TRUE"
22  #endif
23  #if !GFX_USE_GQUEUE
24  #if GFX_DISPLAY_RULE_WARNINGS
25  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
26  #warning "GAUDIO: GFX_USE_GQUEUE is required if GFX_USE_GAUDIO is TRUE. It has been turned on for you."
27  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
28  COMPILER_WARNING("GAUDIO: GFX_USE_GQUEUE is required if GFX_USE_GAUDIO is TRUE. It has been turned on for you.")
29  #endif
30  #endif
31  #undef GFX_USE_GQUEUE
32  #define GFX_USE_GQUEUE TRUE
33  #endif
34  #if GAUDIO_NEED_PLAY && !GQUEUE_NEED_ASYNC
35  #if GFX_DISPLAY_RULE_WARNINGS
36  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
37  #warning "GAUDIO: GQUEUE_NEED_ASYNC is required if GAUDIO_NEED_PLAY is TRUE. It has been turned on for you."
38  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
39  COMPILER_WARNING("GAUDIO: GQUEUE_NEED_ASYNC is required if GAUDIO_NEED_PLAY is TRUE. It has been turned on for you.")
40  #endif
41  #endif
42  #undef GQUEUE_NEED_ASYNC
43  #define GQUEUE_NEED_ASYNC TRUE
44  #endif
45  #if !GQUEUE_NEED_GSYNC || !GQUEUE_NEED_BUFFERS
46  #if GFX_DISPLAY_RULE_WARNINGS
47  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
48  #warning "GAUDIO: GQUEUE_NEED_BUFFERS and GQUEUE_NEED_GSYNC are required if GFX_USE_GAUDIO is TRUE. They have been turned on for you."
49  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
50  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.")
51  #endif
52  #endif
53  #undef GQUEUE_NEED_BUFFERS
54  #define GQUEUE_NEED_BUFFERS TRUE
55  #undef GQUEUE_NEED_GSYNC
56  #define GQUEUE_NEED_GSYNC TRUE
57  #endif
58  #if GFX_USE_GEVENT && !GFX_USE_GTIMER
59  #if GFX_DISPLAY_RULE_WARNINGS
60  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
61  #warning "GAUDIO: GFX_USE_GTIMER is required if GFX_USE_GAUDIO and GFX_USE_GEVENT are TRUE. It has been turned on for you."
62  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
63  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.")
64  #endif
65  #endif
66  #undef GFX_USE_GTIMER
67  #define GFX_USE_GTIMER TRUE
68  #endif
69 #endif
70 
71 #endif /* _GAUDIO_RULES_H */
72 /** @} */