dsound: PrimarySetFormat patch, dsound does not properly support audio > 2 channel - try 2

Dylan Taft d13f00l at gmail.com
Mon Apr 30 06:15:41 CDT 2007


mlankhorst had me clean this up a little and make the fixme a little bit
more verbose...

diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index 0725bd2..5742ff6 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -345,6 +345,11 @@ HRESULT DSOUND_PrimarySetFormat(DirectSo
              wfex->wFormatTag, wfex->nChannels, wfex->nSamplesPerSec,
              wfex->nAvgBytesPerSec, wfex->nBlockAlign,
              wfex->wBitsPerSample, wfex->cbSize);
+
+       if (wfex->nChannels > 2) {
+                FIXME("Currently only supports 2 channels, returning
DSERR_BADFORMAT. (requested channels=%d)\n",wfex->nChannels);
+                return DSERR_BADFORMAT;
+       }

        /* **** */
        RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20070430/c095965b/attachment.html


More information about the wine-patches mailing list