Commit 097e2812 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Fix some places where no driver present causes problems.

parent 68419717
...@@ -636,7 +636,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, ...@@ -636,7 +636,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -877,7 +878,8 @@ static HRESULT test_primary(LPGUID lpGuid) ...@@ -877,7 +878,8 @@ static HRESULT test_primary(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -959,7 +961,8 @@ static HRESULT test_primary_3d(LPGUID lpGuid) ...@@ -959,7 +961,8 @@ static HRESULT test_primary_3d(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -1031,7 +1034,8 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) ...@@ -1031,7 +1034,8 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
......
...@@ -538,7 +538,8 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play, ...@@ -538,7 +538,8 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -791,7 +792,8 @@ static HRESULT test_primary8(LPGUID lpGuid) ...@@ -791,7 +792,8 @@ static HRESULT test_primary8(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -873,7 +875,8 @@ static HRESULT test_primary_3d8(LPGUID lpGuid) ...@@ -873,7 +875,8 @@ static HRESULT test_primary_3d8(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -946,7 +949,8 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid) ...@@ -946,7 +949,8 @@ static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
......
...@@ -94,8 +94,10 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, ...@@ -94,8 +94,10 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
DXGetErrorString8(rc)); DXGetErrorString8(rc));
rc=IDirectSound_Initialize(dso,lpGuid); rc=IDirectSound_Initialize(dso,lpGuid);
ok(rc==DS_OK,"IDirectSound_Initialize() failed: %s\n", ok(rc==DS_OK||rc==DSERR_NODRIVER,"IDirectSound_Initialize() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DSERR_NODRIVER)
return;
} }
/* DSOUND: Error: Invalid caps buffer */ /* DSOUND: Error: Invalid caps buffer */
...@@ -245,7 +247,8 @@ static HRESULT test_dsound(LPGUID lpGuid) ...@@ -245,7 +247,8 @@ static HRESULT test_dsound(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -344,7 +347,8 @@ static HRESULT test_primary(LPGUID lpGuid) ...@@ -344,7 +347,8 @@ static HRESULT test_primary(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -485,7 +489,8 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) ...@@ -485,7 +489,8 @@ static HRESULT test_primary_secondary(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -621,7 +626,8 @@ static HRESULT test_secondary(LPGUID lpGuid) ...@@ -621,7 +626,8 @@ static HRESULT test_secondary(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
......
...@@ -103,8 +103,10 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, ...@@ -103,8 +103,10 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
DXGetErrorString8(rc)); DXGetErrorString8(rc));
rc=IDirectSound8_Initialize(dso,lpGuid); rc=IDirectSound8_Initialize(dso,lpGuid);
ok(rc==DS_OK,"IDirectSound8_Initialize() failed: %s\n", ok(rc==DS_OK||rc==DSERR_NODRIVER,"IDirectSound8_Initialize() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DSERR_NODRIVER)
return;
} }
/* DSOUND: Error: Invalid caps buffer */ /* DSOUND: Error: Invalid caps buffer */
...@@ -255,7 +257,8 @@ static HRESULT test_dsound8(LPGUID lpGuid) ...@@ -255,7 +257,8 @@ static HRESULT test_dsound8(LPGUID lpGuid)
/* Create the DirectSound8 object */ /* Create the DirectSound8 object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -365,7 +368,8 @@ static HRESULT test_primary8(LPGUID lpGuid) ...@@ -365,7 +368,8 @@ static HRESULT test_primary8(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -506,7 +510,8 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) ...@@ -506,7 +510,8 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
...@@ -642,7 +647,8 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -642,7 +647,8 @@ static HRESULT test_secondary8(LPGUID lpGuid)
/* Create the DirectSound object */ /* Create the DirectSound object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL); rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
return rc; return rc;
......
...@@ -268,7 +268,8 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ...@@ -268,7 +268,8 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule); trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
rc=DirectSoundCreate(lpGuid,&dso,NULL); rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %s\n",
DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
goto EXIT; goto EXIT;
......
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