diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2019-10-13 09:37:07 -0700 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2019-10-13 09:37:07 -0700 |
commit | 33fd1f9efd46c056cd4348e76cd9048b37721c8b (patch) | |
tree | c8c3ca61c99a958c75393bf960c895683f0dbbab /alc/devformat.h | |
parent | e70f98c95afc61802b26795dbe8aeb20514a211b (diff) |
Use better types for some specific sizes
Diffstat (limited to 'alc/devformat.h')
-rw-r--r-- | alc/devformat.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/alc/devformat.h b/alc/devformat.h index e7ff2ec4..402fb8bd 100644 --- a/alc/devformat.h +++ b/alc/devformat.h @@ -1,8 +1,9 @@ #ifndef ALC_DEVFORMAT_H #define ALC_DEVFORMAT_H +#include <cstdint> + #include "AL/al.h" -#include "AL/alc.h" #include "AL/alext.h" #include "inprogext.h" @@ -82,19 +83,19 @@ template<DevFmtType T> struct DevFmtTypeTraits { }; template<> -struct DevFmtTypeTraits<DevFmtByte> { using Type = ALbyte; }; +struct DevFmtTypeTraits<DevFmtByte> { using Type = int8_t; }; template<> -struct DevFmtTypeTraits<DevFmtUByte> { using Type = ALubyte; }; +struct DevFmtTypeTraits<DevFmtUByte> { using Type = uint8_t; }; template<> -struct DevFmtTypeTraits<DevFmtShort> { using Type = ALshort; }; +struct DevFmtTypeTraits<DevFmtShort> { using Type = int16_t; }; template<> -struct DevFmtTypeTraits<DevFmtUShort> { using Type = ALushort; }; +struct DevFmtTypeTraits<DevFmtUShort> { using Type = uint16_t; }; template<> -struct DevFmtTypeTraits<DevFmtInt> { using Type = ALint; }; +struct DevFmtTypeTraits<DevFmtInt> { using Type = int32_t; }; template<> -struct DevFmtTypeTraits<DevFmtUInt> { using Type = ALuint; }; +struct DevFmtTypeTraits<DevFmtUInt> { using Type = uint32_t; }; template<> -struct DevFmtTypeTraits<DevFmtFloat> { using Type = ALfloat; }; +struct DevFmtTypeTraits<DevFmtFloat> { using Type = float; }; ALuint BytesFromDevFmt(DevFmtType type) noexcept; |