diff options
author | Chris Robinson <[email protected]> | 2007-12-26 23:29:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-26 23:29:32 -0800 |
commit | 8011ad97b558fae4fb3c5fc44912dd7e99eed4e5 (patch) | |
tree | 1fe70d140dc06cf95d9f09118c7875431d07b3ee /Alc/dsound.c | |
parent | ab8d342df06fdfcc1b630e318e121bcfb6a1cdfa (diff) |
Don't check explicitly against formats, but rather their byte/channel count
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r-- | Alc/dsound.c | 2 |
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; |