aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-08-05 01:07:20 -0700
committerChris Robinson <[email protected]>2010-08-05 01:07:20 -0700
commit98bc60cfb72939cfabcdd118597a02a015091756 (patch)
tree7604d53bc502bdc156707299567aef1801b670da /OpenAL32
parent2aacca76de7577db8632b796ce8e205207b23d68 (diff)
Combine stereo and stereo-duplicate mixers
Use a separate update method for stereo sources to the set appropriate channel gains
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h1
-rw-r--r--OpenAL32/alSource.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index bd28771f..73f70224 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -183,6 +183,7 @@ ALvoid aluInitPanning(ALCdevice *Device);
ALvoid CalcSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
ALvoid CalcNonAttnSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
+ALvoid CalcNonAttnStereoSourceParams(struct ALsource *ALSource, const ALCcontext *ALContext);
ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size);
ALvoid aluHandleDisconnect(ALCdevice *device);
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 0db6f76b..5488003c 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -576,6 +576,8 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
if(aluChannelsFromFormat(buffer->format) == 1)
Source->Update = CalcSourceParams;
+ else if(aluChannelsFromFormat(buffer->format) == 2)
+ Source->Update = CalcNonAttnStereoSourceParams;
else
Source->Update = CalcNonAttnSourceParams;
@@ -1626,6 +1628,8 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei n, const A
Format = buffer->eOriginalFormat;
if(aluChannelsFromFormat(buffer->format) == 1)
Source->Update = CalcSourceParams;
+ else if(aluChannelsFromFormat(buffer->format) == 2)
+ Source->Update = CalcNonAttnStereoSourceParams;
else
Source->Update = CalcNonAttnSourceParams;
Source->NeedsUpdate = AL_TRUE;