aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
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 /Alc
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 'Alc')
-rw-r--r--Alc/ALu.c4
-rw-r--r--Alc/mixer_c.c4
-rw-r--r--Alc/mixer_sse.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 18188d74..50a21755 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -313,7 +313,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
}
SrcMatrix = ALSource->Params.Direct.Gains;
- for(i = 0;i < MaxChannels;i++)
+ for(i = 0;i < MAX_INPUT_CHANNELS;i++)
{
for(c = 0;c < MaxChannels;c++)
SrcMatrix[i][c] = 0.0f;
@@ -859,7 +859,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
ALfloat DirGain = 0.0f;
ALfloat AmbientGain;
- for(i = 0;i < MaxChannels;i++)
+ for(i = 0;i < MAX_INPUT_CHANNELS;i++)
{
for(j = 0;j < MaxChannels;j++)
Matrix[i][j] = 0.0f;
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c
index 2cfbcedc..045a8b1f 100644
--- a/Alc/mixer_c.c
+++ b/Alc/mixer_c.c
@@ -96,7 +96,7 @@ void MixDirect_C(const DirectParams *params, const ALfloat *restrict data, ALuin
for(c = 0;c < MaxChannels;c++)
{
DrySend = params->Gains[srcchan][c];
- if(DrySend < 0.00001f)
+ if(!(DrySend > 0.00001f))
continue;
if(OutPos == 0)
@@ -119,7 +119,7 @@ void MixSend_C(const SendParams *params, const ALfloat *restrict data,
ALfloat WetSend = params->Gain;
ALuint pos;
- if(WetSend < 0.00001f)
+ if(!(WetSend > 0.00001f))
return;
if(OutPos == 0)
diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c
index f929469c..d348f9da 100644
--- a/Alc/mixer_sse.c
+++ b/Alc/mixer_sse.c
@@ -155,7 +155,7 @@ void MixDirect_SSE(const DirectParams *params, const ALfloat *restrict data, ALu
__m128 gain;
DrySend = params->Gains[srcchan][c];
- if(DrySend < 0.00001f)
+ if(!(DrySend > 0.00001f))
continue;
if(OutPos == 0)
@@ -189,7 +189,7 @@ void MixSend_SSE(const SendParams *params, const ALfloat *restrict data,
__m128 gain;
ALuint pos;
- if(WetGain < 0.00001f)
+ if(!(WetGain > 0.00001f))
return;
if(OutPos == 0)