aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-21 02:57:17 -0700
committerChris Robinson <[email protected]>2009-09-21 02:57:17 -0700
commite2905b6bc9056f148b0e7ebcb8201ac32c730c4a (patch)
tree40e0ad4538b66738dda38b1ed18d2d584a69a26e /Alc
parente11b59a80f542e08bc877d1447f885fb0f5cc439 (diff)
Properly handle forced 32-bit float output with DSound
Diffstat (limited to 'Alc')
-rw-r--r--Alc/dsound.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 6846886d..ac172344 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -227,15 +227,15 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device)
hr = IDirectSound_GetSpeakerConfig(pData->lpDS, &speakers);
if(SUCCEEDED(hr) && *(GetConfigValue(NULL, "format", "")) != 0)
{
- if(device->Format == AL_FORMAT_MONO8 || device->Format == AL_FORMAT_MONO16)
+ if(aluChannelsFromFormat(device->Format) == 1)
speakers = DSSPEAKER_COMBINED(DSSPEAKER_MONO, 0);
- else if(device->Format == AL_FORMAT_STEREO8 || device->Format == AL_FORMAT_STEREO16)
+ else if(aluChannelsFromFormat(device->Format) == 2)
speakers = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, 0);
- else if(device->Format == AL_FORMAT_QUAD8 || device->Format == AL_FORMAT_QUAD16)
+ else if(aluChannelsFromFormat(device->Format) == 4)
speakers = DSSPEAKER_COMBINED(DSSPEAKER_QUAD, 0);
- else if(device->Format == AL_FORMAT_51CHN8 || device->Format == AL_FORMAT_51CHN16)
+ else if(aluChannelsFromFormat(device->Format) == 6)
speakers = DSSPEAKER_COMBINED(DSSPEAKER_5POINT1, 0);
- else if(device->Format == AL_FORMAT_71CHN8 || device->Format == AL_FORMAT_71CHN16)
+ else if(aluChannelsFromFormat(device->Format) == 8)
speakers = DSSPEAKER_COMBINED(DSSPEAKER_7POINT1, 0);
else
{