aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-30 17:41:43 -0700
committerChris Robinson <[email protected]>2019-06-30 17:41:43 -0700
commitc21b7e2461739e8b162f736bd9dfc6df4b48a667 (patch)
tree804eca3121a33eaf12f927f19748c4a657361f19 /OpenAL32
parentf45864223767ac6543e8f432384dcf984d325eea (diff)
Use explicit storage types for some enums
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alBuffer.h8
-rw-r--r--OpenAL32/Include/alMain.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h
index 1919dd5a..92655784 100644
--- a/OpenAL32/Include/alBuffer.h
+++ b/OpenAL32/Include/alBuffer.h
@@ -12,7 +12,7 @@
/* User formats */
-enum UserFmtType {
+enum UserFmtType : unsigned char {
UserFmtUByte,
UserFmtShort,
UserFmtFloat,
@@ -22,7 +22,7 @@ enum UserFmtType {
UserFmtIMA4,
UserFmtMSADPCM,
};
-enum UserFmtChannels {
+enum UserFmtChannels : unsigned char {
UserFmtMono,
UserFmtStereo,
UserFmtRear,
@@ -41,7 +41,7 @@ inline ALsizei FrameSizeFromUserFmt(UserFmtChannels chans, UserFmtType type)
/* Storable formats */
-enum FmtType {
+enum FmtType : unsigned char {
FmtUByte = UserFmtUByte,
FmtShort = UserFmtShort,
FmtFloat = UserFmtFloat,
@@ -49,7 +49,7 @@ enum FmtType {
FmtMulaw = UserFmtMulaw,
FmtAlaw = UserFmtAlaw,
};
-enum FmtChannels {
+enum FmtChannels : unsigned char {
FmtMono = UserFmtMono,
FmtStereo = UserFmtStereo,
FmtRear = UserFmtRear,
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 016cc535..3008aeca 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -124,7 +124,7 @@ enum Channel {
/* Device formats */
-enum DevFmtType {
+enum DevFmtType : ALenum {
DevFmtByte = ALC_BYTE_SOFT,
DevFmtUByte = ALC_UNSIGNED_BYTE_SOFT,
DevFmtShort = ALC_SHORT_SOFT,
@@ -135,7 +135,7 @@ enum DevFmtType {
DevFmtTypeDefault = DevFmtFloat
};
-enum DevFmtChannels {
+enum DevFmtChannels : ALenum {
DevFmtMono = ALC_MONO_SOFT,
DevFmtStereo = ALC_STEREO_SOFT,
DevFmtQuad = ALC_QUAD_SOFT,
@@ -145,7 +145,7 @@ enum DevFmtChannels {
DevFmtAmbi3D = ALC_BFORMAT3D_SOFT,
/* Similar to 5.1, except using rear channels instead of sides */
- DevFmtX51Rear = 0x80000000,
+ DevFmtX51Rear = 0x70000000,
DevFmtChannelsDefault = DevFmtStereo
};