[PATCH] dsound: Set dwChannelMask when limiting channels

Maarten Lankhorst m.b.lankhorst at gmail.com
Mon Nov 26 10:02:06 CST 2012


Provides a workaround for bug http://bugs.winehq.org/show_bug.cgi?id=32277

Winecoreaudio and maybe wineoss still need patching to support dwChannelMask better..

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>

---
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index 9f42250..a44dc12 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -62,6 +62,7 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *device, IAudioClient *client
             mixwfe->Format.nChannels = 2;
             mixwfe->Format.nBlockAlign = mixwfe->Format.nChannels * mixwfe->Format.wBitsPerSample / 8;
             mixwfe->Format.nAvgBytesPerSec = mixwfe->Format.nSamplesPerSec * mixwfe->Format.nBlockAlign;
+            mixwfe->dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
         }
 
         if (!IsEqualGUID(&mixwfe->SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)) {




More information about the wine-patches mailing list