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

constants.hpp
Go to the documentation of this file.
1 #ifndef OALPLUS_AL_API_CONSTANTS_HPP
9 #define OALPLUS_AL_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 al_types::enum_type;
25  template <enum_type value>
26  using enum_type_c = std::integral_constant<enum_type, value>;
27 
32 #ifdef AL_NO_ERROR
33  enum_type_c<AL_NO_ERROR>>
34 #else
36 #endif
38 
43 #ifdef AL_INVALID_NAME
44  enum_type_c<AL_INVALID_NAME>>
45 #else
47 #endif
49 
54 #ifdef AL_INVALID_ENUM
55  enum_type_c<AL_INVALID_ENUM>>
56 #else
58 #endif
60 
65 #ifdef AL_INVALID_OPERATION
66  enum_type_c<AL_INVALID_OPERATION>>
67 #else
69 #endif
71 
76 #ifdef AL_OUT_OF_MEMORY
77  enum_type_c<AL_OUT_OF_MEMORY>>
78 #else
80 #endif
82 
87 #ifdef AL_VERSION
88  enum_type_c<AL_VERSION>>
89 #else
91 #endif
93 
98 #ifdef AL_RENDERER
99  enum_type_c<AL_RENDERER>>
100 #else
101  enum_type_i>
102 #endif
104 
109 #ifdef AL_VENDOR
110  enum_type_c<AL_VENDOR>>
111 #else
112  enum_type_i>
113 #endif
115 
120 #ifdef AL_EXTENSIONS
121  enum_type_c<AL_EXTENSIONS>>
122 #else
123  enum_type_i>
124 #endif
126 
131 #ifdef AL_DOPPLER_FACTOR
132  enum_type_c<AL_DOPPLER_FACTOR>>
133 #else
134  enum_type_i>
135 #endif
137 
142 #ifdef AL_SPEED_OF_SOUND
143  enum_type_c<AL_SPEED_OF_SOUND>>
144 #else
145  enum_type_i>
146 #endif
148 
153 #ifdef AL_DISTANCE_MODEL
154  enum_type_c<AL_DISTANCE_MODEL>,
155 #else
156  enum_type_i,
157 #endif
160 
165 #ifdef AL_INVERSE_DISTANCE
166  enum_type_c<AL_INVERSE_DISTANCE>>
167 #else
168  enum_type_i>
169 #endif
171 
176 #ifdef AL_INVERSE_DISTANCE_CLAMPED
177  enum_type_c<AL_INVERSE_DISTANCE_CLAMPED>>
178 #else
179  enum_type_i>
180 #endif
182 
187 #ifdef AL_LINEAR_DISTANCE
188  enum_type_c<AL_LINEAR_DISTANCE>>
189 #else
190  enum_type_i>
191 #endif
193 
198 #ifdef AL_LINEAR_DISTANCE_CLAMPED
199  enum_type_c<AL_LINEAR_DISTANCE_CLAMPED>>
200 #else
201  enum_type_i>
202 #endif
204 
209 #ifdef AL_EXPONENT_DISTANCE
210  enum_type_c<AL_EXPONENT_DISTANCE>>
211 #else
212  enum_type_i>
213 #endif
215 
220 #ifdef AL_EXPONENT_DISTANCE_CLAMPED
221  enum_type_c<AL_EXPONENT_DISTANCE_CLAMPED>>
222 #else
223  enum_type_i>
224 #endif
226 
231 #ifdef AL_SOURCE_STATE
232  enum_type_c<AL_SOURCE_STATE>>
233 #else
234  enum_type_i>
235 #endif
237 
242 #ifdef AL_SOURCE_TYPE
243  enum_type_c<AL_SOURCE_TYPE>>
244 #else
245  enum_type_i>
246 #endif
248 
253 #ifdef AL_SOURCE_RELATIVE
254  enum_type_c<AL_SOURCE_RELATIVE>>
255 #else
256  enum_type_i>
257 #endif
259 
264 #ifdef AL_LOOPING
265  enum_type_c<AL_LOOPING>>
266 #else
267  enum_type_i>
268 #endif
270 
275 #ifdef AL_POSITION
276  enum_type_c<AL_POSITION>>
277 #else
278  enum_type_i>
279 #endif
281 
286 #ifdef AL_VELOCITY
287  enum_type_c<AL_VELOCITY>>
288 #else
289  enum_type_i>
290 #endif
292 
297 #ifdef AL_GAIN
298  enum_type_c<AL_GAIN>>
299 #else
300  enum_type_i>
301 #endif
303 
308 #ifdef AL_MIN_GAIN
309  enum_type_c<AL_MIN_GAIN>>
310 #else
311  enum_type_i>
312 #endif
314 
319 #ifdef AL_MAX_GAIN
320  enum_type_c<AL_MAX_GAIN>>
321 #else
322  enum_type_i>
323 #endif
325 
330 #ifdef AL_ROLLOFF_FACTOR
331  enum_type_c<AL_ROLLOFF_FACTOR>>
332 #else
333  enum_type_i>
334 #endif
336 
341 #ifdef AL_REFERENCE_DISTANCE
342  enum_type_c<AL_REFERENCE_DISTANCE>>
343 #else
344  enum_type_i>
345 #endif
347 
352 #ifdef AL_MIN_DISTANCE
353  enum_type_c<AL_MIN_DISTANCE>>
354 #else
355  enum_type_i>
356 #endif
358 
363 #ifdef AL_MAX_DISTANCE
364  enum_type_c<AL_MAX_DISTANCE>>
365 #else
366  enum_type_i>
367 #endif
369 
374 #ifdef AL_DIRECTION
375  enum_type_c<AL_DIRECTION>>
376 #else
377  enum_type_i>
378 #endif
380 
385 #ifdef AL_CONE_INNER_ANGLE
386  enum_type_c<AL_CONE_INNER_ANGLE>>
387 #else
388  enum_type_i>
389 #endif
391 
396 #ifdef AL_CONE_OUTER_ANGLE
397  enum_type_c<AL_CONE_OUTER_ANGLE>>
398 #else
399  enum_type_i>
400 #endif
402 
407 #ifdef AL_CONE_OUTER_GAIN
408  enum_type_c<AL_CONE_OUTER_GAIN>>
409 #else
410  enum_type_i>
411 #endif
413 
418 #ifdef AL_SEC_OFFSET
419  enum_type_c<AL_SEC_OFFSET>>
420 #else
421  enum_type_i>
422 #endif
424 
429 #ifdef AL_SAMPLE_OFFSET
430  enum_type_c<AL_SAMPLE_OFFSET>>
431 #else
432  enum_type_i>
433 #endif
435 
440 #ifdef AL_BYTE_OFFSET
441  enum_type_c<AL_BYTE_OFFSET>>
442 #else
443  enum_type_i>
444 #endif
446 
451 #ifdef AL_ORIENTATION
452  enum_type_c<AL_ORIENTATION>>
453 #else
454  enum_type_i>
455 #endif
457 
462 #ifdef AL_BUFFER
463  enum_type_c<AL_BUFFER>>
464 #else
465  enum_type_i>
466 #endif
468 
473 #ifdef AL_BUFFERS_QUEUED
474  enum_type_c<AL_BUFFERS_QUEUED>>
475 #else
476  enum_type_i>
477 #endif
479 
484 #ifdef AL_BUFFERS_PROCESSED
485  enum_type_c<AL_BUFFERS_PROCESSED>>
486 #else
487  enum_type_i>
488 #endif
490 
495 
499 
504 
509 
514 
519 
524 
529 
534 
539 #ifdef AL_FREQUENCY
540  enum_type_c<AL_FREQUENCY>>
541 #else
542  enum_type_i>
543 #endif
545 
550 #ifdef AL_SIZE
551  enum_type_c<AL_SIZE>>
552 #else
553  enum_type_i>
554 #endif
556 
561 #ifdef AL_BITS
562  enum_type_c<AL_BITS>>
563 #else
564  enum_type_i>
565 #endif
567 
572 #ifdef AL_CHANNELS
573  enum_type_c<AL_CHANNELS>>
574 #else
575  enum_type_i>
576 #endif
578 
583 #ifdef AL_FORMAT_MONO8
584  enum_type_c<AL_FORMAT_MONO8>>
585 #else
586  enum_type_i>
587 #endif
589 
594 #ifdef AL_FORMAT_MONO16
595  enum_type_c<AL_FORMAT_MONO16>>
596 #else
597  enum_type_i>
598 #endif
600 
605 #ifdef AL_FORMAT_STEREO8
606  enum_type_c<AL_FORMAT_STEREO8>>
607 #else
608  enum_type_i>
609 #endif
611 
616 #ifdef AL_FORMAT_STEREO16
617  enum_type_c<AL_FORMAT_STEREO16>>
618 #else
619  enum_type_i>
620 #endif
622 
627 #ifdef AL_UNDETERMINED
628  enum_type_c<AL_UNDETERMINED>>
629 #else
630  enum_type_i>
631 #endif
633 
638 #ifdef AL_STATIC
639  enum_type_c<AL_STATIC>>
640 #else
641  enum_type_i>
642 #endif
644 
649 #ifdef AL_STREAMING
650  enum_type_c<AL_STREAMING>>
651 #else
652  enum_type_i>
653 #endif
655 
660 #ifdef AL_INITIAL
661  enum_type_c<AL_INITIAL>>
662 #else
663  enum_type_i>
664 #endif
666 
671 #ifdef AL_PLAYING
672  enum_type_c<AL_PLAYING>>
673 #else
674  enum_type_i>
675 #endif
677 
682 #ifdef AL_PAUSED
683  enum_type_c<AL_PAUSED>>
684 #else
685  enum_type_i>
686 #endif
688 
693 #ifdef AL_STOPPED
694  enum_type_c<AL_STOPPED>>
695 #else
696  enum_type_i>
697 #endif
699 
704 #ifdef AL_NONE
705  enum_type_c<AL_NONE>>
706 #else
707  enum_type_i>
708 #endif
710 
711  basic_al_constants(ApiTraits& traits, basic_al_c_api<ApiTraits>& api);
712 };
713 //------------------------------------------------------------------------------
714 } // namespace eagine::oalp
715 
716 #endif // OALPLUS_AL_API_CONSTANTS_HPP
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > source_type
Definition: constants.hpp:247
opt_c_api_constant< mp_list< oalp::source_type >, enum_type_i > static_
Definition: constants.hpp:643
opt_c_api_constant< mp_list< buffer_format >, enum_type_i > format_stereo16
Definition: constants.hpp:621
opt_c_api_constant< mp_list< listener_attribute, source_attribute >, enum_type_i > gain
Definition: constants.hpp:302
opt_c_api_constant< mp_list< oalp::source_state >, enum_type_i > paused
Definition: constants.hpp:687
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
opt_c_api_constant< mp_list< al_error_code >, enum_type_i > invalid_name
Definition: constants.hpp:48
opt_c_api_constant< mp_list< buffer_format >, enum_type_i > format_mono16
Definition: constants.hpp:599
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > air_absorption_factor
Definition: constants.hpp:508
opt_c_api_constant< mp_list< al_error_code >, enum_type_i > out_of_memory
Definition: constants.hpp:81
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > auxiliary_send_filter_gain_auto
Definition: constants.hpp:528
opt_c_api_constant< mp_list< oalp::source_type >, enum_type_i > streaming
Definition: constants.hpp:654
opt_c_api_constant< mp_list< listener_attribute, source_attribute >, enum_type_i > position
Definition: constants.hpp:280
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > linear_distance
Definition: constants.hpp:192
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > cone_outer_angle
Definition: constants.hpp:401
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > max_gain
Definition: constants.hpp:324
opt_c_api_constant< mp_list< oalp::source_state >, enum_type_i > playing
Definition: constants.hpp:676
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > source_relative
Definition: constants.hpp:258
opt_c_api_constant< mp_list< oalp::source_state >, enum_type_i > stopped
Definition: constants.hpp:698
opt_c_api_constant< mp_list< buffer_attribute >, enum_type_i > bits
Definition: constants.hpp:566
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > current_buffer
Definition: constants.hpp:467
dynamic_c_api_constant< mp_list< listener_attribute >, enum_type > meters_per_unit
Definition: constants.hpp:494
Typed enumeration for AL distance model constants.
Definition: enum_types.hpp:56
opt_c_api_constant< mp_list< al_error_code >, enum_type_i > invalid_operation
Definition: constants.hpp:70
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > direct_filter
Definition: constants.hpp:498
opt_c_api_constant< mp_list< al_string_query >, enum_type_i > renderer
Definition: constants.hpp:103
opt_c_api_constant< mp_list< al_integer_query >, enum_type_i, oalp::distance_model > distance_model
Definition: constants.hpp:159
opt_c_api_constant< mp_list< al_string_query >, enum_type_i > extensions
Definition: constants.hpp:125
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > min_gain
Definition: constants.hpp:313
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > buffers_processed
Definition: constants.hpp:489
opt_c_api_constant< mp_list< al_error_code >, enum_type_i > no_error
Definition: constants.hpp:37
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > room_rolloff_factor
Definition: constants.hpp:513
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > exponent_distance
Definition: constants.hpp:214
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > auxiliary_send_filter_gainhf_auto
Definition: constants.hpp:533
opt_c_api_constant< mp_list< oalp::source_type >, enum_type_i > undetermined
Definition: constants.hpp:632
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > inverse_distance
Definition: constants.hpp:170
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > looping
Definition: constants.hpp:269
opt_c_api_constant< mp_list< oalp::source_state >, enum_type_i > initial
Definition: constants.hpp:665
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > source_state
Definition: constants.hpp:236
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > reference_distance
Definition: constants.hpp:346
opt_c_api_constant< mp_list< al_error_code >, enum_type_i > invalid_enum
Definition: constants.hpp:59
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > buffers_queued
Definition: constants.hpp:478
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > sec_offset
Definition: constants.hpp:423
Class wrapping the constants from the AL API.
Definition: constants.hpp:21
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > direction
Definition: constants.hpp:379
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > sample_offset
Definition: constants.hpp:434
opt_c_api_constant< mp_list< listener_attribute >, enum_type_i > orientation
Definition: constants.hpp:456
opt_c_api_constant< mp_list< buffer_attribute >, enum_type_i > channels
Definition: constants.hpp:577
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > linear_distance_clamped
Definition: constants.hpp:203
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > rolloff_factor
Definition: constants.hpp:335
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
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > inverse_distance_clamped
Definition: constants.hpp:181
opt_c_api_constant< mp_list< al_numeric_query >, enum_type_i > speed_of_sound
Definition: constants.hpp:147
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > min_distance
Definition: constants.hpp:357
opt_c_api_constant< mp_list< buffer_attribute >, enum_type_i > frequency
Definition: constants.hpp:544
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > none
Definition: constants.hpp:709
opt_c_api_constant< mp_list< listener_attribute, source_attribute >, enum_type_i > velocity
Definition: constants.hpp:291
AL-related code is placed in this namespace.
Definition: oalplus.hpp:11
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > cone_outer_gainhf
Definition: constants.hpp:518
opt_c_api_constant< mp_list< al_string_query >, enum_type_i > vendor
Definition: constants.hpp:114
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > auxiliary_send_filter
Definition: constants.hpp:503
opt_c_api_constant< mp_list< buffer_format >, enum_type_i > format_stereo8
Definition: constants.hpp:610
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > cone_outer_gain
Definition: constants.hpp:412
dynamic_c_api_constant< mp_list< source_attribute >, enum_type > direct_filter_gainhf_auto
Definition: constants.hpp:523
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > byte_offset
Definition: constants.hpp:445
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > max_distance
Definition: constants.hpp:368
Class wrapping the C-functions from the AL API.
Definition: c_api.hpp:31
opt_c_api_constant< mp_list< source_attribute >, enum_type_i > cone_inner_angle
Definition: constants.hpp:390
opt_c_api_constant< mp_list< buffer_format >, enum_type_i > format_mono8
Definition: constants.hpp:588
opt_c_api_constant< mp_list< oalp::distance_model >, enum_type_i > exponent_distance_clamped
Definition: constants.hpp:225
opt_c_api_constant< mp_list< al_string_query >, enum_type_i > version
Definition: constants.hpp:92
opt_c_api_constant< mp_list< al_numeric_query >, enum_type_i > doppler_factor
Definition: constants.hpp:136
opt_c_api_constant< mp_list< buffer_attribute >, enum_type_i > size
Definition: constants.hpp:555

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