dsound: Unofficially support 5.1 sound.
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Mon, 7 Jun 2010 22:28:56 +0000 (00:28 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 8 Jun 2010 10:59:58 +0000 (12:59 +0200)
dlls/dsound/mixer.c

index 698e58617490f137e2bd805a26203c12bbe464b4..185df6e1ff65019b37aed603d8bb94938e0dc5a6 100644 (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);