diff options
author | Chris Robinson <[email protected]> | 2015-10-06 00:23:11 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-10-06 00:23:11 -0700 |
commit | a4c378dd00c74bf8a9904cdd49ad557e9822878d (patch) | |
tree | c71be0d2b01fbca8e84635da5263dd91c0a53d18 /Alc/vector.h | |
parent | f590af510dcae8a64c833d78c0a1238c281eea27 (diff) |
Enumerate and list HRTFs per-device
Diffstat (limited to 'Alc/vector.h')
-rw-r--r-- | Alc/vector.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Alc/vector.h b/Alc/vector.h index 85230378..c1fc925d 100644 --- a/Alc/vector.h +++ b/Alc/vector.h @@ -73,6 +73,13 @@ ALboolean vector_insert(char *ptr, size_t base_size, size_t obj_size, void *ins_ _f(_iter); \ } while(0) +#define VECTOR_FOR_EACH_PARAMS(_t, _x, _f, ...) do { \ + _t *_iter = VECTOR_ITER_BEGIN((_x)); \ + _t *_end = VECTOR_ITER_END((_x)); \ + for(;_iter != _end;++_iter) \ + _f(__VA_ARGS__, _iter); \ +} while(0) + #define VECTOR_FIND_IF(_i, _t, _x, _f) do { \ _t *_iter = VECTOR_ITER_BEGIN((_x)); \ _t *_end = VECTOR_ITER_END((_x)); \ @@ -84,4 +91,15 @@ ALboolean vector_insert(char *ptr, size_t base_size, size_t obj_size, void *ins_ (_i) = _iter; \ } while(0) +#define VECTOR_FIND_IF_PARMS(_i, _t, _x, _f, ...) do { \ + _t *_iter = VECTOR_ITER_BEGIN((_x)); \ + _t *_end = VECTOR_ITER_END((_x)); \ + for(;_iter != _end;++_iter) \ + { \ + if(_f(__VA_ARGS__, _iter)) \ + break; \ + } \ + (_i) = _iter; \ +} while(0) + #endif /* AL_VECTOR_H */ |