aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-17 01:55:25 -0700
committerChris Robinson <[email protected]>2011-07-17 01:55:25 -0700
commita7a1f802a80955dda90d8dfdeb7e549e541d5f01 (patch)
treef4a5436eff4db8c68d2df3d1156e1b18741a24b8 /Alc/ALc.c
parent163cc62a00f755e0df5d83f4196178bd85be9bde (diff)
Invert the device channel map
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 6f165fb9..8d1792c3 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2440,22 +2440,22 @@ void SetDefaultChannelOrder(ALCdevice *device)
{
switch(device->FmtChans)
{
- case DevFmtX51: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[BACK_LEFT] = 2;
- device->DevChannels[BACK_RIGHT] = 3;
- device->DevChannels[FRONT_CENTER] = 4;
- device->DevChannels[LFE] = 5;
+ case DevFmtX51: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = BACK_LEFT;
+ device->DevChannels[3] = BACK_RIGHT;
+ device->DevChannels[4] = FRONT_CENTER;
+ device->DevChannels[5] = LFE;
return;
- case DevFmtX71: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[BACK_LEFT] = 2;
- device->DevChannels[BACK_RIGHT] = 3;
- device->DevChannels[FRONT_CENTER] = 4;
- device->DevChannels[LFE] = 5;
- device->DevChannels[SIDE_LEFT] = 6;
- device->DevChannels[SIDE_RIGHT] = 7;
+ case DevFmtX71: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = BACK_LEFT;
+ device->DevChannels[3] = BACK_RIGHT;
+ device->DevChannels[4] = FRONT_CENTER;
+ device->DevChannels[5] = LFE;
+ device->DevChannels[6] = SIDE_LEFT;
+ device->DevChannels[7] = SIDE_RIGHT;
return;
/* Same as WFX order */
@@ -2473,46 +2473,46 @@ void SetDefaultWFXChannelOrder(ALCdevice *device)
{
switch(device->FmtChans)
{
- case DevFmtMono: device->DevChannels[FRONT_CENTER] = 0; break;
-
- case DevFmtStereo: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1; break;
-
- case DevFmtQuad: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[BACK_LEFT] = 2;
- device->DevChannels[BACK_RIGHT] = 3; break;
-
- case DevFmtX51: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[FRONT_CENTER] = 2;
- device->DevChannels[LFE] = 3;
- device->DevChannels[BACK_LEFT] = 4;
- device->DevChannels[BACK_RIGHT] = 5; break;
-
- case DevFmtX51Side: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[FRONT_CENTER] = 2;
- device->DevChannels[LFE] = 3;
- device->DevChannels[SIDE_LEFT] = 4;
- device->DevChannels[SIDE_RIGHT] = 5; break;
-
- case DevFmtX61: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[FRONT_CENTER] = 2;
- device->DevChannels[LFE] = 3;
- device->DevChannels[BACK_CENTER] = 4;
- device->DevChannels[SIDE_LEFT] = 5;
- device->DevChannels[SIDE_RIGHT] = 6; break;
-
- case DevFmtX71: device->DevChannels[FRONT_LEFT] = 0;
- device->DevChannels[FRONT_RIGHT] = 1;
- device->DevChannels[FRONT_CENTER] = 2;
- device->DevChannels[LFE] = 3;
- device->DevChannels[BACK_LEFT] = 4;
- device->DevChannels[BACK_RIGHT] = 5;
- device->DevChannels[SIDE_LEFT] = 6;
- device->DevChannels[SIDE_RIGHT] = 7; break;
+ case DevFmtMono: device->DevChannels[0] = FRONT_CENTER; break;
+
+ case DevFmtStereo: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT; break;
+
+ case DevFmtQuad: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = BACK_LEFT;
+ device->DevChannels[3] = BACK_RIGHT; break;
+
+ case DevFmtX51: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = FRONT_CENTER;
+ device->DevChannels[3] = LFE;
+ device->DevChannels[4] = BACK_LEFT;
+ device->DevChannels[5] = BACK_RIGHT; break;
+
+ case DevFmtX51Side: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = FRONT_CENTER;
+ device->DevChannels[3] = LFE;
+ device->DevChannels[4] = SIDE_LEFT;
+ device->DevChannels[5] = SIDE_RIGHT; break;
+
+ case DevFmtX61: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = FRONT_CENTER;
+ device->DevChannels[3] = LFE;
+ device->DevChannels[4] = BACK_CENTER;
+ device->DevChannels[5] = SIDE_LEFT;
+ device->DevChannels[6] = SIDE_RIGHT; break;
+
+ case DevFmtX71: device->DevChannels[0] = FRONT_LEFT;
+ device->DevChannels[1] = FRONT_RIGHT;
+ device->DevChannels[2] = FRONT_CENTER;
+ device->DevChannels[3] = LFE;
+ device->DevChannels[4] = BACK_LEFT;
+ device->DevChannels[5] = BACK_RIGHT;
+ device->DevChannels[6] = SIDE_LEFT;
+ device->DevChannels[7] = SIDE_RIGHT; break;
}
}