Fix 5.1 surround sound
Apparently, 5.1 surround sound is supposed to use the "side" channels, not the back channels, and we've been wrong this whole time. That means the "5.1 Side" is actually the correct 5.1 setup, and using the back channels is anomalous. Additionally, this means the 5.1 buffer format should also use the the side channels instead of the back channels. A final note: the 5.1 mixing coefficients are changed so both use the original 5.1 surround sound set (with the surround channels at +/-110 degrees). So the only difference now between 5.1 "side" and 5.1 "back" is the channel labels.
This commit is contained in:
parent
7a98e92117
commit
0051a96376
129
Alc/ALc.c
129
Alc/ALc.c
@ -1324,7 +1324,7 @@ const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans)
|
||||
case DevFmtStereo: return "Stereo";
|
||||
case DevFmtQuad: return "Quadraphonic";
|
||||
case DevFmtX51: return "5.1 Surround";
|
||||
case DevFmtX51Side: return "5.1 Side";
|
||||
case DevFmtX51Rear: return "5.1 Surround (Rear)";
|
||||
case DevFmtX61: return "6.1 Surround";
|
||||
case DevFmtX71: return "7.1 Surround";
|
||||
}
|
||||
@ -1354,7 +1354,7 @@ ALuint ChannelsFromDevFmt(enum DevFmtChannels chans)
|
||||
case DevFmtStereo: return 2;
|
||||
case DevFmtQuad: return 4;
|
||||
case DevFmtX51: return 6;
|
||||
case DevFmtX51Side: return 6;
|
||||
case DevFmtX51Rear: return 6;
|
||||
case DevFmtX61: return 7;
|
||||
case DevFmtX71: return 8;
|
||||
}
|
||||
@ -1475,47 +1475,54 @@ void SetDefaultWFXChannelOrder(ALCdevice *device)
|
||||
|
||||
switch(device->FmtChans)
|
||||
{
|
||||
case DevFmtMono: device->ChannelName[0] = FrontCenter;
|
||||
break;
|
||||
case DevFmtStereo: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
break;
|
||||
case DevFmtQuad: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = BackLeft;
|
||||
device->ChannelName[3] = BackRight;
|
||||
break;
|
||||
case DevFmtX51: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = BackLeft;
|
||||
device->ChannelName[5] = BackRight;
|
||||
break;
|
||||
case DevFmtX51Side: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = SideLeft;
|
||||
device->ChannelName[5] = SideRight;
|
||||
break;
|
||||
case DevFmtX61: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = BackCenter;
|
||||
device->ChannelName[5] = SideLeft;
|
||||
device->ChannelName[6] = SideRight;
|
||||
break;
|
||||
case DevFmtX71: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = BackLeft;
|
||||
device->ChannelName[5] = BackRight;
|
||||
device->ChannelName[6] = SideLeft;
|
||||
device->ChannelName[7] = SideRight;
|
||||
break;
|
||||
case DevFmtMono:
|
||||
device->ChannelName[0] = FrontCenter;
|
||||
break;
|
||||
case DevFmtStereo:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
break;
|
||||
case DevFmtQuad:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = BackLeft;
|
||||
device->ChannelName[3] = BackRight;
|
||||
break;
|
||||
case DevFmtX51:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = SideLeft;
|
||||
device->ChannelName[5] = SideRight;
|
||||
break;
|
||||
case DevFmtX51Rear:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = BackLeft;
|
||||
device->ChannelName[5] = BackRight;
|
||||
break;
|
||||
case DevFmtX61:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = BackCenter;
|
||||
device->ChannelName[5] = SideLeft;
|
||||
device->ChannelName[6] = SideRight;
|
||||
break;
|
||||
case DevFmtX71:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = FrontCenter;
|
||||
device->ChannelName[3] = LFE;
|
||||
device->ChannelName[4] = BackLeft;
|
||||
device->ChannelName[5] = BackRight;
|
||||
device->ChannelName[6] = SideLeft;
|
||||
device->ChannelName[7] = SideRight;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1532,28 +1539,30 @@ void SetDefaultChannelOrder(ALCdevice *device)
|
||||
|
||||
switch(device->FmtChans)
|
||||
{
|
||||
case DevFmtX51: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = BackLeft;
|
||||
device->ChannelName[3] = BackRight;
|
||||
device->ChannelName[4] = FrontCenter;
|
||||
device->ChannelName[5] = LFE;
|
||||
return;
|
||||
case DevFmtX71: device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = BackLeft;
|
||||
device->ChannelName[3] = BackRight;
|
||||
device->ChannelName[4] = FrontCenter;
|
||||
device->ChannelName[5] = LFE;
|
||||
device->ChannelName[6] = SideLeft;
|
||||
device->ChannelName[7] = SideRight;
|
||||
return;
|
||||
case DevFmtX51Rear:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = BackLeft;
|
||||
device->ChannelName[3] = BackRight;
|
||||
device->ChannelName[4] = FrontCenter;
|
||||
device->ChannelName[5] = LFE;
|
||||
return;
|
||||
case DevFmtX71:
|
||||
device->ChannelName[0] = FrontLeft;
|
||||
device->ChannelName[1] = FrontRight;
|
||||
device->ChannelName[2] = BackLeft;
|
||||
device->ChannelName[3] = BackRight;
|
||||
device->ChannelName[4] = FrontCenter;
|
||||
device->ChannelName[5] = LFE;
|
||||
device->ChannelName[6] = SideLeft;
|
||||
device->ChannelName[7] = SideRight;
|
||||
return;
|
||||
|
||||
/* Same as WFX order */
|
||||
case DevFmtMono:
|
||||
case DevFmtStereo:
|
||||
case DevFmtQuad:
|
||||
case DevFmtX51Side:
|
||||
case DevFmtX51:
|
||||
case DevFmtX61:
|
||||
SetDefaultWFXChannelOrder(device);
|
||||
break;
|
||||
|
@ -257,8 +257,8 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
|
||||
{ FrontRight, DEG2RAD( 30.0f), DEG2RAD(0.0f) },
|
||||
{ FrontCenter, DEG2RAD( 0.0f), DEG2RAD(0.0f) },
|
||||
{ LFE, 0.0f, 0.0f },
|
||||
{ BackLeft, DEG2RAD(-110.0f), DEG2RAD(0.0f) },
|
||||
{ BackRight, DEG2RAD( 110.0f), DEG2RAD(0.0f) }
|
||||
{ SideLeft, DEG2RAD(-110.0f), DEG2RAD(0.0f) },
|
||||
{ SideRight, DEG2RAD( 110.0f), DEG2RAD(0.0f) }
|
||||
};
|
||||
static const struct ChanMap X61Map[7] = {
|
||||
{ FrontLeft, DEG2RAD(-30.0f), DEG2RAD(0.0f) },
|
||||
|
@ -519,7 +519,7 @@ static ALCenum ca_open_capture(ALCdevice *device, const ALCchar *deviceName)
|
||||
|
||||
case DevFmtQuad:
|
||||
case DevFmtX51:
|
||||
case DevFmtX51Side:
|
||||
case DevFmtX51Rear:
|
||||
case DevFmtX61:
|
||||
case DevFmtX71:
|
||||
ERR("%s not supported\n", DevFmtChannelsString(device->FmtChans));
|
||||
|
@ -43,6 +43,9 @@
|
||||
#ifndef DSSPEAKER_5POINT1
|
||||
# define DSSPEAKER_5POINT1 0x00000006
|
||||
#endif
|
||||
#ifndef DSSPEAKER_5POINT1_BACK
|
||||
# define DSSPEAKER_5POINT1_BACK 0x00000006
|
||||
#endif
|
||||
#ifndef DSSPEAKER_7POINT1
|
||||
# define DSSPEAKER_7POINT1 0x00000007
|
||||
#endif
|
||||
@ -450,8 +453,10 @@ static ALCboolean ALCdsoundPlayback_reset(ALCdsoundPlayback *self)
|
||||
device->FmtChans = DevFmtStereo;
|
||||
else if(speakers == DSSPEAKER_QUAD)
|
||||
device->FmtChans = DevFmtQuad;
|
||||
else if(speakers == DSSPEAKER_5POINT1 || speakers == DSSPEAKER_5POINT1_SURROUND)
|
||||
else if(speakers == DSSPEAKER_5POINT1_SURROUND)
|
||||
device->FmtChans = DevFmtX51;
|
||||
else if(speakers == DSSPEAKER_5POINT1_BACK)
|
||||
device->FmtChans = DevFmtX51Rear;
|
||||
else if(speakers == DSSPEAKER_7POINT1 || speakers == DSSPEAKER_7POINT1_SURROUND)
|
||||
device->FmtChans = DevFmtX71;
|
||||
else
|
||||
@ -478,16 +483,16 @@ static ALCboolean ALCdsoundPlayback_reset(ALCdsoundPlayback *self)
|
||||
SPEAKER_FRONT_RIGHT |
|
||||
SPEAKER_FRONT_CENTER |
|
||||
SPEAKER_LOW_FREQUENCY |
|
||||
SPEAKER_BACK_LEFT |
|
||||
SPEAKER_BACK_RIGHT;
|
||||
SPEAKER_SIDE_LEFT |
|
||||
SPEAKER_SIDE_RIGHT;
|
||||
break;
|
||||
case DevFmtX51Side:
|
||||
case DevFmtX51Rear:
|
||||
OutputType.dwChannelMask = SPEAKER_FRONT_LEFT |
|
||||
SPEAKER_FRONT_RIGHT |
|
||||
SPEAKER_FRONT_CENTER |
|
||||
SPEAKER_LOW_FREQUENCY |
|
||||
SPEAKER_SIDE_LEFT |
|
||||
SPEAKER_SIDE_RIGHT;
|
||||
SPEAKER_BACK_LEFT |
|
||||
SPEAKER_BACK_RIGHT;
|
||||
break;
|
||||
case DevFmtX61:
|
||||
OutputType.dwChannelMask = SPEAKER_FRONT_LEFT |
|
||||
@ -745,16 +750,16 @@ static ALCenum ALCdsoundCapture_open(ALCdsoundCapture *self, const ALCchar *devi
|
||||
SPEAKER_FRONT_RIGHT |
|
||||
SPEAKER_FRONT_CENTER |
|
||||
SPEAKER_LOW_FREQUENCY |
|
||||
SPEAKER_BACK_LEFT |
|
||||
SPEAKER_BACK_RIGHT;
|
||||
SPEAKER_SIDE_LEFT |
|
||||
SPEAKER_SIDE_RIGHT;
|
||||
break;
|
||||
case DevFmtX51Side:
|
||||
case DevFmtX51Rear:
|
||||
InputType.dwChannelMask = SPEAKER_FRONT_LEFT |
|
||||
SPEAKER_FRONT_RIGHT |
|
||||
SPEAKER_FRONT_CENTER |
|
||||
SPEAKER_LOW_FREQUENCY |
|
||||
SPEAKER_SIDE_LEFT |
|
||||
SPEAKER_SIDE_RIGHT;
|
||||
SPEAKER_BACK_LEFT |
|
||||
SPEAKER_BACK_RIGHT;
|
||||
break;
|
||||
case DevFmtX61:
|
||||
InputType.dwChannelMask = SPEAKER_FRONT_LEFT |
|
||||
|
@ -55,8 +55,8 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80,
|
||||
#define MONO SPEAKER_FRONT_CENTER
|
||||
#define STEREO (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT)
|
||||
#define QUAD (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT)
|
||||
#define X5DOT1 (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT)
|
||||
#define X5DOT1SIDE (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT)
|
||||
#define X5DOT1 (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT)
|
||||
#define X5DOT1REAR (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT)
|
||||
#define X6DOT1 (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_CENTER|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT)
|
||||
#define X7DOT1 (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT)
|
||||
|
||||
@ -800,8 +800,8 @@ static HRESULT ALCmmdevPlayback_resetProxy(ALCmmdevPlayback *self)
|
||||
device->FmtChans = DevFmtQuad;
|
||||
else if(OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1)
|
||||
device->FmtChans = DevFmtX51;
|
||||
else if(OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1SIDE)
|
||||
device->FmtChans = DevFmtX51Side;
|
||||
else if(OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1REAR)
|
||||
device->FmtChans = DevFmtX51Rear;
|
||||
else if(OutputType.Format.nChannels == 7 && OutputType.dwChannelMask == X6DOT1)
|
||||
device->FmtChans = DevFmtX61;
|
||||
else if(OutputType.Format.nChannels == 8 && OutputType.dwChannelMask == X7DOT1)
|
||||
@ -828,9 +828,9 @@ static HRESULT ALCmmdevPlayback_resetProxy(ALCmmdevPlayback *self)
|
||||
OutputType.Format.nChannels = 6;
|
||||
OutputType.dwChannelMask = X5DOT1;
|
||||
break;
|
||||
case DevFmtX51Side:
|
||||
case DevFmtX51Rear:
|
||||
OutputType.Format.nChannels = 6;
|
||||
OutputType.dwChannelMask = X5DOT1SIDE;
|
||||
OutputType.dwChannelMask = X5DOT1REAR;
|
||||
break;
|
||||
case DevFmtX61:
|
||||
OutputType.Format.nChannels = 7;
|
||||
@ -911,8 +911,8 @@ static HRESULT ALCmmdevPlayback_resetProxy(ALCmmdevPlayback *self)
|
||||
device->FmtChans = DevFmtQuad;
|
||||
else if(OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1)
|
||||
device->FmtChans = DevFmtX51;
|
||||
else if(OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1SIDE)
|
||||
device->FmtChans = DevFmtX51Side;
|
||||
else if(OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1REAR)
|
||||
device->FmtChans = DevFmtX51Rear;
|
||||
else if(OutputType.Format.nChannels == 7 && OutputType.dwChannelMask == X6DOT1)
|
||||
device->FmtChans = DevFmtX61;
|
||||
else if(OutputType.Format.nChannels == 8 && OutputType.dwChannelMask == X7DOT1)
|
||||
|
@ -67,7 +67,10 @@ static SLuint32 GetChannelMask(enum DevFmtChannels chans)
|
||||
SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT;
|
||||
case DevFmtX51: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT|
|
||||
SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY|
|
||||
SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT;
|
||||
SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT;
|
||||
case DevFmtX51Rear: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT|
|
||||
SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY|
|
||||
SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT;
|
||||
case DevFmtX61: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT|
|
||||
SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY|
|
||||
SL_SPEAKER_BACK_CENTER|
|
||||
@ -76,9 +79,6 @@ static SLuint32 GetChannelMask(enum DevFmtChannels chans)
|
||||
SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY|
|
||||
SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT|
|
||||
SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT;
|
||||
case DevFmtX51Side: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT|
|
||||
SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY|
|
||||
SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -671,10 +671,10 @@ static void ALCpulsePlayback_sinkInfoCallback(pa_context *UNUSED(context), const
|
||||
DevFmtX71 },
|
||||
{ "front-left,front-right,front-center,lfe,rear-center,side-left,side-right",
|
||||
DevFmtX61 },
|
||||
{ "front-left,front-right,front-center,lfe,rear-left,rear-right",
|
||||
DevFmtX51 },
|
||||
{ "front-left,front-right,front-center,lfe,side-left,side-right",
|
||||
DevFmtX51Side },
|
||||
DevFmtX51 },
|
||||
{ "front-left,front-right,front-center,lfe,rear-left,rear-right",
|
||||
DevFmtX51Rear },
|
||||
{ "front-left,front-right,rear-left,rear-right", DevFmtQuad },
|
||||
{ "front-left,front-right", DevFmtStereo },
|
||||
{ "mono", DevFmtMono },
|
||||
@ -994,11 +994,11 @@ static ALCboolean ALCpulsePlayback_reset(ALCpulsePlayback *self)
|
||||
mapname = "front-left,front-right,rear-left,rear-right";
|
||||
break;
|
||||
case DevFmtX51:
|
||||
mapname = "front-left,front-right,front-center,lfe,rear-left,rear-right";
|
||||
break;
|
||||
case DevFmtX51Side:
|
||||
mapname = "front-left,front-right,front-center,lfe,side-left,side-right";
|
||||
break;
|
||||
case DevFmtX51Rear:
|
||||
mapname = "front-left,front-right,front-center,lfe,rear-left,rear-right";
|
||||
break;
|
||||
case DevFmtX61:
|
||||
mapname = "front-left,front-right,front-center,lfe,rear-center,side-left,side-right";
|
||||
break;
|
||||
|
@ -260,8 +260,8 @@ static ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self)
|
||||
case DevFmtMono: chanmask = 0x04; break;
|
||||
case DevFmtStereo: chanmask = 0x01 | 0x02; break;
|
||||
case DevFmtQuad: chanmask = 0x01 | 0x02 | 0x10 | 0x20; break;
|
||||
case DevFmtX51Side: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x200 | 0x400; break;
|
||||
case DevFmtX51: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020; break;
|
||||
case DevFmtX51: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x200 | 0x400; break;
|
||||
case DevFmtX51Rear: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020; break;
|
||||
case DevFmtX61: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x100 | 0x200 | 0x400; break;
|
||||
case DevFmtX71: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020 | 0x200 | 0x400; break;
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ static ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *name)
|
||||
|
||||
case DevFmtQuad:
|
||||
case DevFmtX51:
|
||||
case DevFmtX51Side:
|
||||
case DevFmtX51Rear:
|
||||
case DevFmtX61:
|
||||
case DevFmtX71:
|
||||
return ALC_INVALID_ENUM;
|
||||
|
@ -120,20 +120,20 @@ ALvoid aluInitPanning(ALCdevice *device)
|
||||
{ FrontRight, { DEG2RAD( 45.0f), DEG2RAD(0.0f), { 0.353543f, 0.306181f, -0.306192f, 0.0f, 0.0f, 0.0f, 0.0f, 0.000000f, -0.117193f }, { 0.353553f, 0.250000f, -0.250000f, 0.0f } } },
|
||||
{ BackLeft, { DEG2RAD(-135.0f), DEG2RAD(0.0f), { 0.353543f, -0.306192f, 0.306181f, 0.0f, 0.0f, 0.0f, 0.0f, 0.000000f, -0.117193f }, { 0.353553f, -0.250000f, 0.250000f, 0.0f } } },
|
||||
{ BackRight, { DEG2RAD( 135.0f), DEG2RAD(0.0f), { 0.353558f, -0.306192f, -0.306181f, 0.0f, 0.0f, 0.0f, 0.0f, 0.000000f, 0.117183f }, { 0.353553f, -0.250000f, -0.250000f, 0.0f } } },
|
||||
}, X51Cfg[6] = {
|
||||
}, X51SideCfg[6] = {
|
||||
{ FrontLeft, { DEG2RAD( -30.0f), DEG2RAD(0.0f), { 0.208954f, 0.212846f, 0.238350f, 0.0f, 0.0f, 0.0f, 0.0f, -0.017738f, 0.204014f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.051023f, 0.047490f }, { 0.208954f, 0.162905f, 0.182425f, 0.0f } } },
|
||||
{ FrontRight, { DEG2RAD( 30.0f), DEG2RAD(0.0f), { 0.208954f, 0.212846f, -0.238350f, 0.0f, 0.0f, 0.0f, 0.0f, -0.017738f, -0.204014f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.051023f, -0.047490f }, { 0.208954f, 0.162905f, -0.182425f, 0.0f } } },
|
||||
{ FrontCenter, { DEG2RAD( 0.0f), DEG2RAD(0.0f), { 0.109403f, 0.179490f, 0.000000f, 0.0f, 0.0f, 0.0f, 0.0f, 0.142031f, -0.000002f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.072024f, -0.000001f }, { 0.109403f, 0.137375f, 0.000000f, 0.0f } } },
|
||||
{ LFE, { 0.0f, 0.0f, { 0.0f }, { 0.0f } } },
|
||||
{ SideLeft, { DEG2RAD(-110.0f), DEG2RAD(0.0f), { 0.470936f, -0.369626f, 0.349386f, 0.0f, 0.0f, 0.0f, 0.0f, -0.031375f, -0.058144f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.007119f, -0.043968f }, { 0.470934f, -0.282903f, 0.267406f, 0.0f } } },
|
||||
{ SideRight, { DEG2RAD( 110.0f), DEG2RAD(0.0f), { 0.470936f, -0.369626f, -0.349386f, 0.0f, 0.0f, 0.0f, 0.0f, -0.031375f, 0.058144f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.007119f, 0.043968f }, { 0.470934f, -0.282903f, -0.267406f, 0.0f } } },
|
||||
}, X51RearCfg[6] = {
|
||||
{ FrontLeft, { DEG2RAD( -30.0f), DEG2RAD(0.0f), { 0.208954f, 0.212846f, 0.238350f, 0.0f, 0.0f, 0.0f, 0.0f, -0.017738f, 0.204014f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.051023f, 0.047490f }, { 0.208954f, 0.162905f, 0.182425f, 0.0f } } },
|
||||
{ FrontRight, { DEG2RAD( 30.0f), DEG2RAD(0.0f), { 0.208954f, 0.212846f, -0.238350f, 0.0f, 0.0f, 0.0f, 0.0f, -0.017738f, -0.204014f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.051023f, -0.047490f }, { 0.208954f, 0.162905f, -0.182425f, 0.0f } } },
|
||||
{ FrontCenter, { DEG2RAD( 0.0f), DEG2RAD(0.0f), { 0.109403f, 0.179490f, 0.000000f, 0.0f, 0.0f, 0.0f, 0.0f, 0.142031f, -0.000002f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.072024f, -0.000001f }, { 0.109403f, 0.137375f, 0.000000f, 0.0f } } },
|
||||
{ LFE, { 0.0f, 0.0f, { 0.0f }, { 0.0f } } },
|
||||
{ BackLeft, { DEG2RAD(-110.0f), DEG2RAD(0.0f), { 0.470936f, -0.369626f, 0.349386f, 0.0f, 0.0f, 0.0f, 0.0f, -0.031375f, -0.058144f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.007119f, -0.043968f }, { 0.470934f, -0.282903f, 0.267406f, 0.0f } } },
|
||||
{ BackRight, { DEG2RAD( 110.0f), DEG2RAD(0.0f), { 0.470936f, -0.369626f, -0.349386f, 0.0f, 0.0f, 0.0f, 0.0f, -0.031375f, 0.058144f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.007119f, 0.043968f }, { 0.470934f, -0.282903f, -0.267406f, 0.0f } } },
|
||||
}, X51SideCfg[6] = {
|
||||
{ FrontLeft, { DEG2RAD(-30.0f), DEG2RAD(0.0f), { 0.167065f, 0.200583f, 0.172695f, 0.0f, 0.0f, 0.0f, 0.0f, 0.029855f, 0.186407f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.039241f, 0.068910f }, { 0.167065f, 0.153519f, 0.132175f, 0.0f } } },
|
||||
{ FrontRight, { DEG2RAD( 30.0f), DEG2RAD(0.0f), { 0.167065f, 0.200583f, -0.172695f, 0.0f, 0.0f, 0.0f, 0.0f, 0.029855f, -0.186407f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.039241f, -0.068910f }, { 0.167065f, 0.153519f, -0.132175f, 0.0f } } },
|
||||
{ FrontCenter, { DEG2RAD( 0.0f), DEG2RAD(0.0f), { 0.109403f, 0.179490f, 0.000000f, 0.0f, 0.0f, 0.0f, 0.0f, 0.142031f, 0.000000f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.072024f, 0.000000f }, { 0.109403f, 0.137375f, 0.000000f, 0.0f } } },
|
||||
{ LFE, { 0.0f, 0.0f, { 0.0f }, { 0.0f } } },
|
||||
{ SideLeft, { DEG2RAD(-90.0f), DEG2RAD(0.0f), { 0.289151f, -0.081301f, 0.401292f, 0.0f, 0.0f, 0.0f, 0.0f, -0.188208f, -0.071420f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.010099f, -0.032897f }, { 0.289151f, -0.062225f, 0.307136f, 0.0f } } },
|
||||
{ SideRight, { DEG2RAD( 90.0f), DEG2RAD(0.0f), { 0.289151f, -0.081301f, -0.401292f, 0.0f, 0.0f, 0.0f, 0.0f, -0.188208f, 0.071420f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.010099f, 0.032897f }, { 0.289151f, -0.062225f, -0.307136f, 0.0f } } },
|
||||
}, X61Cfg[7] = {
|
||||
{ FrontLeft, { DEG2RAD(-30.0f), DEG2RAD(0.0f), { 0.167065f, 0.200583f, 0.172695f, 0.0f, 0.0f, 0.0f, 0.0f, 0.029855f, 0.186407f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.039241f, 0.068910f }, { 0.167065f, 0.153519f, 0.132175f, 0.0f } } },
|
||||
{ FrontRight, { DEG2RAD( 30.0f), DEG2RAD(0.0f), { 0.167065f, 0.200583f, -0.172695f, 0.0f, 0.0f, 0.0f, 0.0f, 0.029855f, -0.186407f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.039241f, -0.068910f }, { 0.167065f, 0.153519f, -0.132175f, 0.0f } } },
|
||||
@ -177,15 +177,15 @@ ALvoid aluInitPanning(ALCdevice *device)
|
||||
break;
|
||||
|
||||
case DevFmtX51:
|
||||
count = COUNTOF(X51Cfg);
|
||||
chanmap = X51Cfg;
|
||||
break;
|
||||
|
||||
case DevFmtX51Side:
|
||||
count = COUNTOF(X51SideCfg);
|
||||
chanmap = X51SideCfg;
|
||||
break;
|
||||
|
||||
case DevFmtX51Rear:
|
||||
count = COUNTOF(X51RearCfg);
|
||||
chanmap = X51RearCfg;
|
||||
break;
|
||||
|
||||
case DevFmtX61:
|
||||
count = COUNTOF(X61Cfg);
|
||||
chanmap = X61Cfg;
|
||||
|
@ -549,8 +549,8 @@ enum DevFmtChannels {
|
||||
DevFmtX61 = ALC_6POINT1_SOFT,
|
||||
DevFmtX71 = ALC_7POINT1_SOFT,
|
||||
|
||||
/* Similar to 5.1, except using the side channels instead of back */
|
||||
DevFmtX51Side = 0x80000000,
|
||||
/* Similar to 5.1, except using rear channels instead of sides */
|
||||
DevFmtX51Rear = 0x80000000,
|
||||
|
||||
DevFmtChannelsDefault = DevFmtStereo
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user