aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-17 13:25:15 -0700
committerChris Robinson <[email protected]>2011-05-17 13:25:15 -0700
commit06f5f0b7c8bf22fe24acd2baf0cffd7a75456672 (patch)
tree56295c0e3827e66dfb95bffbaf4c015df6683f52 /OpenAL32
parent9f91ff4734259259290f7fcf0248ad0147c4ce1a (diff)
Make mixers channel-count agnostic
As a result, this combines/removes a bunch of mixers
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alSource.h2
-rw-r--r--OpenAL32/alSource.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 1b9d92ad..806019e0 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -86,6 +86,8 @@ typedef struct ALsource
// Source Type (Static, Streaming, or Undetermined)
ALint lSourceType;
+ ALuint NumChannels;
+
/* HRTF info */
ALfloat HrtfHistory[MAXCHANNELS][HRTF_LENGTH];
ALuint HrtfOffset;
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index fd77527f..11f472c2 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -566,6 +566,7 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
Source->queue = BufferListItem;
Source->BuffersInQueue = 1;
+ Source->NumChannels = ChannelsFromFmt(buffer->FmtChannels);
if(buffer->FmtChannels == FmtMono)
Source->Update = CalcSourceParams;
else
@@ -1611,6 +1612,7 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei n, const A
{
BufferFmt = buffer;
+ Source->NumChannels = ChannelsFromFmt(buffer->FmtChannels);
if(buffer->FmtChannels == FmtMono)
Source->Update = CalcSourceParams;
else