aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-07-23 00:13:15 -0700
committerChris Robinson <[email protected]>2013-07-23 00:13:15 -0700
commit94884ed04b88697acd851f1b4ab492221b809ad6 (patch)
treeb657ae90b4362a89a6a18bdae3fb6c86ddc8e131 /OpenAL32/alBuffer.c
parent2219ce2475dff2b819599b447f9b014be8d3e398 (diff)
Use a separate value for the maximum buffer channels
Unlike the device, input buffers are accessed based on channel numbers instead of enums. This means the maximum number of channels they hold depends on the number of channels any one format can have, rather than the total number of recognized channels. Currently, this is 8 for 7.1.
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 44eacaff..d12fe80a 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -1087,8 +1087,8 @@ static ALalaw EncodeALaw(ALshort val)
static void DecodeIMA4Block(ALshort *dst, const ALima4 *src, ALint numchans)
{
- ALint sample[MaxChannels], index[MaxChannels];
- ALuint code[MaxChannels];
+ ALint sample[MAX_INPUT_CHANNELS], index[MAX_INPUT_CHANNELS];
+ ALuint code[MAX_INPUT_CHANNELS];
ALsizei j,k,c;
for(c = 0;c < numchans;c++)
@@ -1749,7 +1749,7 @@ DECL_TEMPLATE(ALubyte3, ALubyte3)
static void Convert_##T##_ALima4(T *dst, const ALima4 *src, ALuint numchans, \
ALuint len) \
{ \
- ALshort tmp[65*MaxChannels]; /* Max samples an IMA4 frame can be */ \
+ ALshort tmp[65*MAX_INPUT_CHANNELS]; /* Max samples an IMA4 frame can be */\
ALuint i, j, k; \
\
i = 0; \
@@ -1785,7 +1785,7 @@ DECL_TEMPLATE(ALubyte3)
static void Convert_ALima4_##T(ALima4 *dst, const T *src, ALuint numchans, \
ALuint len) \
{ \
- ALshort tmp[65*MaxChannels]; /* Max samples an IMA4 frame can be */ \
+ ALshort tmp[65*MAX_INPUT_CHANNELS]; /* Max samples an IMA4 frame can be */\
ALint sample[MaxChannels] = {0,0,0,0,0,0,0,0}; \
ALint index[MaxChannels] = {0,0,0,0,0,0,0,0}; \
ALuint i, j; \