aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mmdevapi.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-28 19:35:32 -0700
committerChris Robinson <[email protected]>2011-05-28 19:35:32 -0700
commit7da2eea8f073aa63d2ef0dfb995510af3463c097 (patch)
treea70b139a5d252a6b3c17d3542e7a594402d2796f /Alc/mmdevapi.c
parent596a1af7d97d9ca34bad6bd1b64296d97a94c864 (diff)
Add a 5.1 device format that uses side channels instead of back
Diffstat (limited to 'Alc/mmdevapi.c')
-rw-r--r--Alc/mmdevapi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Alc/mmdevapi.c b/Alc/mmdevapi.c
index 39628c95..cbeba71e 100644
--- a/Alc/mmdevapi.c
+++ b/Alc/mmdevapi.c
@@ -47,6 +47,7 @@ DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0
#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 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)
@@ -276,6 +277,8 @@ static ALCboolean MMDevApiResetPlayback(ALCdevice *device)
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 == 7 && OutputType.dwChannelMask == X6DOT1)
device->FmtChans = DevFmtX61;
else if(OutputType.Format.nChannels == 8 && OutputType.dwChannelMask == X7DOT1)
@@ -302,6 +305,10 @@ static ALCboolean MMDevApiResetPlayback(ALCdevice *device)
OutputType.Format.nChannels = 6;
OutputType.dwChannelMask = X5DOT1;
break;
+ case DevFmtX51Side:
+ OutputType.Format.nChannels = 6;
+ OutputType.dwChannelMask = X5DOT1SIDE;
+ break;
case DevFmtX61:
OutputType.Format.nChannels = 7;
OutputType.dwChannelMask = X6DOT1;
@@ -373,6 +380,7 @@ static ALCboolean MMDevApiResetPlayback(ALCdevice *device)
(device->FmtChans == DevFmtStereo && OutputType.Format.nChannels == 2 && OutputType.dwChannelMask == STEREO) ||
(device->FmtChans == DevFmtQuad && OutputType.Format.nChannels == 4 && OutputType.dwChannelMask == QUAD) ||
(device->FmtChans == DevFmtX51 && OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1) ||
+ (device->FmtChans == DevFmtX51Side && OutputType.Format.nChannels == 6 && OutputType.dwChannelMask == X5DOT1SIDE) ||
(device->FmtChans == DevFmtX61 && OutputType.Format.nChannels == 7 && OutputType.dwChannelMask == X6DOT1) ||
(device->FmtChans == DevFmtX71 && OutputType.Format.nChannels == 8 && OutputType.dwChannelMask == X7DOT1)))
{
@@ -388,6 +396,8 @@ static ALCboolean MMDevApiResetPlayback(ALCdevice *device)
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 == 7 && OutputType.dwChannelMask == X6DOT1)
device->FmtChans = DevFmtX61;
else if(OutputType.Format.nChannels == 8 && OutputType.dwChannelMask == X7DOT1)