dsound: Unofficially support 5.1 sound.

This commit is contained in:
Maarten Lankhorst 2010-06-08 00:28:56 +02:00 committed by Alexandre Julliard
parent f5edb4aea3
commit 2d5c4944c1
1 changed files with 2 additions and 1 deletions

View File

@ -277,7 +277,8 @@ static inline void cp_fields(const IDirectSoundBufferImpl *dsb, const BYTE *ibuf
DirectSoundDevice *device = dsb->device;
INT istep = dsb->pwfx->wBitsPerSample / 8, ostep = device->pwfx->wBitsPerSample / 8;
if (device->pwfx->nChannels == dsb->pwfx->nChannels) {
if (device->pwfx->nChannels == dsb->pwfx->nChannels ||
(device->pwfx->nChannels == 2 && dsb->pwfx->nChannels == 6)) {
dsb->convert(ibuf, obuf, istride, ostride, count, freqAcc, adj);
if (device->pwfx->nChannels == 2)
dsb->convert(ibuf + istep, obuf + ostep, istride, ostride, count, freqAcc, adj);