OGLplus  (0.59.0) a C++ wrapper for rendering APIs

constants.hpp
Go to the documentation of this file.
1 #ifndef OALPLUS_ALC_API_CONSTANTS_HPP
9 #define OALPLUS_ALC_API_CONSTANTS_HPP
10 
11 #include "c_api.hpp"
12 #include "enum_types.hpp"
13 
14 namespace eagine::oalp {
15 //------------------------------------------------------------------------------
20 template <typename ApiTraits>
22 public:
23  using enum_type = typename alc_types::enum_type;
25  template <enum_type value>
26  using enum_type_c = std::integral_constant<enum_type, value>;
27 
32 #ifdef ALC_NO_ERROR
33  enum_type_c<ALC_NO_ERROR>>
34 #else
36 #endif
38 
43 #ifdef ALC_INVALID_DEVICE
44  enum_type_c<ALC_INVALID_DEVICE>>
45 #else
47 #endif
49 
54 #ifdef ALC_INVALID_CONTEXT
55  enum_type_c<ALC_INVALID_CONTEXT>>
56 #else
58 #endif
60 
65 #ifdef ALC_INVALID_ENUM
66  enum_type_c<ALC_INVALID_ENUM>>
67 #else
69 #endif
71 
76 #ifdef ALC_INVALID_VALUE
77  enum_type_c<ALC_INVALID_VALUE>>
78 #else
80 #endif
82 
87 #ifdef ALC_OUT_OF_MEMORY
88  enum_type_c<ALC_OUT_OF_MEMORY>>
89 #else
91 #endif
93 
98 #ifdef ALC_DEVICE_SPECIFIER
99  enum_type_c<ALC_DEVICE_SPECIFIER>>
100 #else
101  enum_type_i>
102 #endif
104 
109 #ifdef ALC_CAPTURE_DEVICE_SPECIFIER
110  enum_type_c<ALC_CAPTURE_DEVICE_SPECIFIER>>
111 #else
112  enum_type_i>
113 #endif
115 
120 #ifdef ALC_DEFAULT_DEVICE_SPECIFIER
121  enum_type_c<ALC_DEFAULT_DEVICE_SPECIFIER>>
122 #else
123  enum_type_i>
124 #endif
126 
131 #ifdef ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
132  enum_type_c<ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER>>
133 #else
134  enum_type_i>
135 #endif
137 
142 
147 
152 #ifdef ALC_EXTENSIONS
153  enum_type_c<ALC_EXTENSIONS>>
154 #else
155  enum_type_i>
156 #endif
158 
163 #ifdef ALC_MAJOR_VERSION
164  enum_type_c<ALC_MAJOR_VERSION>>
165 #else
166  enum_type_i>
167 #endif
169 
174 #ifdef ALC_MINOR_VERSION
175  enum_type_c<ALC_MINOR_VERSION>>
176 #else
177  enum_type_i>
178 #endif
180 
185 #ifdef ALC_CAPTURE_SAMPLES
186  enum_type_c<ALC_CAPTURE_SAMPLES>>
187 #else
188  enum_type_i>
189 #endif
191 
196 #ifdef ALC_FREQUENCY
197  enum_type_c<ALC_FREQUENCY>>
198 #else
199  enum_type_i>
200 #endif
202 
207 #ifdef ALC_REFRESH
208  enum_type_c<ALC_REFRESH>>
209 #else
210  enum_type_i>
211 #endif
213 
218 #ifdef ALC_SYNC
219  enum_type_c<ALC_SYNC>>
220 #else
221  enum_type_i>
222 #endif
224 
229 #ifdef ALC_MONO_SOURCES
230  enum_type_c<ALC_MONO_SOURCES>>
231 #else
232  enum_type_i>
233 #endif
235 
240 #ifdef ALC_STEREO_SOURCES
241  enum_type_c<ALC_STEREO_SOURCES>>
242 #else
243  enum_type_i>
244 #endif
246 
251 
256 
261 
262  basic_alc_constants(ApiTraits& traits, basic_alc_c_api<ApiTraits>& api);
263 };
264 //------------------------------------------------------------------------------
265 } // namespace eagine::oalp
266 
267 #endif // OALPLUS_ALC_API_CONSTANTS_HPP
opt_c_api_constant< mp_list< alc_string_query >, enum_type_i > capture_default_device_specifier
Definition: constants.hpp:136
typename get_opt_c_api_constant< ClassList, Constant, Tag, IsIndexed >::type opt_c_api_constant
Template alias used for switching between static and dynamic constants.
Definition: c_api_wrap.hpp:175
Class wrapping the C-functions from the ALC API.
Definition: c_api.hpp:31
opt_c_api_constant< mp_list< alc_error_code >, enum_type_i > invalid_value
Definition: constants.hpp:81
const dynamic_c_api_constant< mp_list< context_attribute >, enum_type > hrtf_soft
Definition: constants.hpp:250
opt_c_api_constant< mp_list< alc_integer_query >, enum_type_i > capture_samples
Definition: constants.hpp:190
const dynamic_c_api_constant< mp_list< alc_string_query >, enum_type > default_all_devices_specifier
Definition: constants.hpp:146
opt_c_api_constant< mp_list< context_attribute >, enum_type_i > refresh
Definition: constants.hpp:212
opt_c_api_constant< mp_list< alc_error_code >, enum_type_i > invalid_device
Definition: constants.hpp:48
opt_c_api_constant< mp_list< context_attribute >, enum_type_i > stereo_sources
Definition: constants.hpp:245
opt_c_api_constant< mp_list< alc_integer_query >, enum_type_i > major_version
Definition: constants.hpp:168
opt_c_api_constant< mp_list< alc_integer_query >, enum_type_i > minor_version
Definition: constants.hpp:179
const dynamic_c_api_constant< mp_list< context_attribute >, enum_type > hrtf_id_soft
Definition: constants.hpp:255
opt_c_api_constant< mp_list< context_attribute >, enum_type_i > mono_sources
Definition: constants.hpp:234
opt_c_api_constant< mp_list< alc_string_query >, enum_type_i > capture_device_specifier
Definition: constants.hpp:114
opt_c_api_constant< mp_list< context_attribute >, enum_type_i > sync
Definition: constants.hpp:223
opt_c_api_constant< mp_list< alc_string_query >, enum_type_i > default_device_specifier
Definition: constants.hpp:125
opt_c_api_constant< mp_list< alc_string_query >, enum_type_i > extensions
Definition: constants.hpp:157
opt_c_api_constant< mp_list< alc_error_code >, enum_type_i > invalid_context
Definition: constants.hpp:59
Class wrapping the constants from the ALC API.
Definition: constants.hpp:21
Class wrapping a constant with value loaded at run-time.
Definition: c_api_wrap.hpp:106
Compile-time type list template.
Definition: mp_list.hpp:20
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
const dynamic_c_api_constant< mp_list< alc_string_query >, enum_type > all_devices_specifier
Definition: constants.hpp:141
opt_c_api_constant< mp_list< alc_error_code >, enum_type_i > out_of_memory
Definition: constants.hpp:92
opt_c_api_constant< mp_list< alc_error_code >, enum_type_i > invalid_enum
Definition: constants.hpp:70
opt_c_api_constant< mp_list< alc_string_query >, enum_type_i > device_specifier
Definition: constants.hpp:103
AL-related code is placed in this namespace.
Definition: oalplus.hpp:11
opt_c_api_constant< mp_list< context_attribute >, enum_type_i > frequency
Definition: constants.hpp:201
opt_c_api_constant< mp_list< alc_error_code >, enum_type_i > no_error
Definition: constants.hpp:37
const dynamic_c_api_constant< mp_list< alc_string_query >, enum_type > hrtf_specifier_soft
Definition: constants.hpp:260

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).