Fix crash in dsound test

Robert Reif reif at earthlink.net
Sun Jul 18 17:30:25 CDT 2004


How did this fail in windows.  Since it doesn't crash with wine,
wine is doing something wrong.  Lets try to figure out what is wrong
and correct wine to have the same behavior as windows or at least
notify someone that something is wrong.

Is anyone working on getting direct sound into the windows port
of our regression tests?

Francois Gouget wrote:

>
> Changelog:
>
>  * dlls/dsound/tests/dsound.c
>
>    Francois Gouget <fgouget at codeweavers.com>
>    Call IDirectSound::Initialize() as per MSDN before using the 
> DirectSound object. Fixes a crash on Windows.
>
>------------------------------------------------------------------------
>
>Index: dlls/dsound/tests/dsound.c
>===================================================================
>RCS file: /var/cvs/wine/dlls/dsound/tests/dsound.c,v
>retrieving revision 1.24
>diff -u -r1.24 dsound.c
>--- dlls/dsound/tests/dsound.c	13 Jul 2004 23:35:09 -0000	1.24
>+++ dlls/dsound/tests/dsound.c	16 Jul 2004 16:23:51 -0000
>@@ -69,6 +69,9 @@
>         if (rc==DS_OK)
>             IDirectSound8_Release(ds8);
> 
>+        rc=IDirectSound_Initialize(dso,NULL);
>+        ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString9(rc));
>+
>         /* DSOUND: Error: Invalid caps buffer */
>         rc=IDirectSound_GetCaps(dso,0);
>         ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
>@@ -168,6 +171,9 @@
>         if (rc==DS_OK)
>             IDirectSound8_Release(ds8);
> 
>+        rc=IDirectSound8_Initialize(dso,NULL);
>+        ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString9(rc));
>+
>         /* DSOUND: Error: Invalid caps buffer */
>         rc=IDirectSound8_GetCaps(dso,0);
>         ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
>  
>





More information about the wine-devel mailing list