aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-07 02:18:24 -0800
committerChris Robinson <[email protected]>2014-11-07 02:18:24 -0800
commit4c3f27193f7379513b3e45398711cfe1238184fd (patch)
tree93499e0af78b28be8568bd4ac689d3a40728b96f /OpenAL32/Include/alMain.h
parent6c954e71dbd99a2ceb072c08481aee92ef8461c0 (diff)
Use a separate macro for the max output channel count
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 6a0df589..e18a238b 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -524,10 +524,9 @@ enum Channel {
SideLeft,
SideRight,
- MaxChannels,
- InvalidChannel = MaxChannels
+ InvalidChannel
};
-
+#define MAX_OUTPUT_CHANNELS (8)
/* Device formats */
enum DevFmtType {
@@ -658,10 +657,10 @@ struct ALCdevice_struct
// Device flags
ALuint Flags;
- enum Channel ChannelName[MaxChannels];
+ enum Channel ChannelName[MAX_OUTPUT_CHANNELS];
/* This only counts positional speakers, i.e. not including LFE. */
- ChannelConfig Speaker[MaxChannels];
+ ChannelConfig Speaker[MAX_OUTPUT_CHANNELS];
ALuint NumSpeakers;
ALuint64 ClockBase;
@@ -673,7 +672,7 @@ struct ALCdevice_struct
alignas(16) ALfloat FilteredData[BUFFERSIZE];
// Dry path buffer mix
- alignas(16) ALfloat DryBuffer[MaxChannels][BUFFERSIZE];
+ alignas(16) ALfloat DryBuffer[MAX_OUTPUT_CHANNELS][BUFFERSIZE];
/* Running count of the mixer invocations, in 31.1 fixed point. This
* actually increments *twice* when mixing, first at the start and then at
@@ -840,7 +839,7 @@ const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans) DECL_CONST;
inline ALint GetChannelIdxByName(const ALCdevice *device, enum Channel chan)
{
ALint i = 0;
- for(i = 0;i < MaxChannels;i++)
+ for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
{
if(device->ChannelName[i] == chan)
return i;