aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-27 22:55:20 -0800
committerChris Robinson <[email protected]>2010-11-27 22:55:20 -0800
commit2fd8d6916bae6b681f065e5dfe1f962641f41533 (patch)
treeb7571b820aa7cc8ada05ebd58c7efa7f4b8d5c95 /Alc/mixer.c
parentb4eaf1ab5a675ff0d75fbec2239fb0ce44d3e06c (diff)
Support rear formats directly in the mixer
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 6f2bf005..ecf3d062 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -525,6 +525,24 @@ DECL_TEMPLATE(ALubyte, QuadChans, lerp8)
DECL_TEMPLATE(ALubyte, QuadChans, cubic8)
+static const Channel RearChans[] = { BACK_LEFT, BACK_RIGHT };
+DECL_TEMPLATE(ALdouble, RearChans, point64)
+DECL_TEMPLATE(ALdouble, RearChans, lerp64)
+DECL_TEMPLATE(ALdouble, RearChans, cubic64)
+
+DECL_TEMPLATE(ALfloat, RearChans, point32)
+DECL_TEMPLATE(ALfloat, RearChans, lerp32)
+DECL_TEMPLATE(ALfloat, RearChans, cubic32)
+
+DECL_TEMPLATE(ALshort, RearChans, point16)
+DECL_TEMPLATE(ALshort, RearChans, lerp16)
+DECL_TEMPLATE(ALshort, RearChans, cubic16)
+
+DECL_TEMPLATE(ALubyte, RearChans, point8)
+DECL_TEMPLATE(ALubyte, RearChans, lerp8)
+DECL_TEMPLATE(ALubyte, RearChans, cubic8)
+
+
static const Channel X51Chans[] = { FRONT_LEFT, FRONT_RIGHT,
FRONT_CENTER, LFE,
BACK_LEFT, BACK_RIGHT };
@@ -612,6 +630,11 @@ static void Mix_##T##_##sampler(ALsource *Source, ALCdevice *Device, \
Data, DataPosInt, DataPosFrac, \
OutPos, SamplesToDo, BufferSize); \
break; \
+ case FmtRear: \
+ Mix_##T##_RearChans_##sampler(Source, Device, \
+ Data, DataPosInt, DataPosFrac, \
+ OutPos, SamplesToDo, BufferSize); \
+ break; \
case Fmt51ChanWFX: \
Mix_##T##_X51Chans_##sampler(Source, Device, \
Data, DataPosInt, DataPosFrac, \