Browse Source

Audio: Add ALC_ENUMERATION_EXT to extensions for testing

Is supported in all devices supporting OpenAL 1.1 and is therefore only
useful for testing purposes.

Signed-off-by: Squareys <Squareys@googlemail.com>
pull/111/head
Squareys 11 years ago
parent
commit
9f409713cc
  1. 1
      src/Magnum/Audio/Context.cpp
  2. 9
      src/Magnum/Audio/Extensions.h

1
src/Magnum/Audio/Context.cpp

@ -44,6 +44,7 @@ const std::vector<Extension>& Extension::extensions() {
static const std::vector<Extension> extensions{
_extension(AL,EXT,FLOAT32),
_extension(AL,EXT,DOUBLE),
_extension(ALC,EXT,ENUMERATION),
_extension(ALC,SOFTX,HRTF)
};
#undef _entension

9
src/Magnum/Audio/Extensions.h

@ -67,6 +67,12 @@ namespace Extensions {
constexpr static const char* string() { return #prefix "_" #vendor "_" #extension; } \
};
#define _extension_rev(prefix, vendor, extension) \
struct extension { \
enum: std::size_t { Index = __LINE__-1 }; \
constexpr static const char* string() { return #prefix "_" #extension "_" #vendor; } \
};
/* IMPORTANT: don't forget to add new extensions also in Context.cpp */
namespace AL {
#line 1
@ -75,6 +81,9 @@ namespace AL {
_extension(AL,EXT,DOUBLE) // #???
}
} namespace ALC {
namespace EXT {
_extension_rev(ALC,EXT,ENUMERATION) // #???
}
namespace SOFTX {
_extension(ALC,SOFTX,HRTF) // #???
}

Loading…
Cancel
Save