aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/dsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-31 19:34:52 -0800
committerChris Robinson <[email protected]>2007-12-31 19:34:52 -0800
commit3d78d93b4033ea94d38981e75f10c6dee5264860 (patch)
treeeff0ee8b22ea032075fd16046d6cb24fa52a8243 /Alc/dsound.c
parent5a2f509104b196bbef336b6c772cd621473f2e55 (diff)
parent9382956b0ec459a696805a23656a9e94b6ed94d9 (diff)
Merge branch 'master' into efx-experiment
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r--Alc/dsound.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index a2b036a1..90a422a2 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -129,7 +129,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
memset(&OutputType, 0, sizeof(WAVEFORMATEX));
OutputType.wFormatTag = WAVE_FORMAT_PCM;
OutputType.nChannels = device->Channels;
- OutputType.wBitsPerSample = (((device->Format==AL_FORMAT_MONO16)||(device->Format==AL_FORMAT_STEREO16)||(device->Format==AL_FORMAT_QUAD16))?16:8);
+ OutputType.wBitsPerSample = aluBytesFromFormat(device->Format) * 8;
OutputType.nBlockAlign = OutputType.nChannels*OutputType.wBitsPerSample/8;
OutputType.nSamplesPerSec = device->Frequency;
OutputType.nAvgBytesPerSec = OutputType.nSamplesPerSec*OutputType.nBlockAlign;