Commit 4c64f9bd authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Call IDirectSound::Initialize() as per MSDN before using the

DirectSound object. Fixes a crash on Windows.
parent acb7207a
......@@ -69,6 +69,9 @@ static void dsound_dsound_tests()
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 @@ static void dsound_dsound8_tests()
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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment