Fix tests to work with drivers that don't support a primary buffer.
This commit is contained in:
parent
0aec9906cf
commit
7d9340b864
|
@ -674,11 +674,12 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
|
|||
else
|
||||
bufdesc.dwFlags|=(DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN);
|
||||
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
|
||||
ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() "
|
||||
"failed to create a %sprimary buffer: %s\n",has_3d?"3D ":"",
|
||||
DXGetErrorString8(rc));
|
||||
|
||||
if (rc==DS_OK && primary!=NULL) {
|
||||
ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL),
|
||||
"IDirectSound_CreateSoundBuffer() failed to create a %sprimary buffer: "
|
||||
"%s\n",has_3d?"3D ":"", DXGetErrorString8(rc));
|
||||
if (rc==DSERR_CONTROLUNAVAIL)
|
||||
trace(" No Primary\n");
|
||||
else if (rc==DS_OK && primary!=NULL) {
|
||||
rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL);
|
||||
ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %s\n",
|
||||
DXGetErrorString8(rc));
|
||||
|
@ -953,9 +954,12 @@ static HRESULT test_primary(LPGUID lpGuid)
|
|||
bufdesc.dwSize=sizeof(bufdesc);
|
||||
bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN;
|
||||
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
|
||||
ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() failed "
|
||||
"to create a primary buffer: %s\n",DXGetErrorString8(rc));
|
||||
if (rc==DS_OK && primary!=NULL) {
|
||||
ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL),
|
||||
"IDirectSound_CreateSoundBuffer() failed to create a primary buffer: "
|
||||
"%s\n",DXGetErrorString8(rc));
|
||||
if (rc==DSERR_CONTROLUNAVAIL)
|
||||
trace(" No Primary\n");
|
||||
else if (rc==DS_OK && primary!=NULL) {
|
||||
test_buffer(dso,primary,1,TRUE,0,TRUE,0,winetest_interactive &&
|
||||
!(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,NULL,0,0,
|
||||
FALSE,0);
|
||||
|
|
|
@ -556,11 +556,12 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
|
|||
else
|
||||
bufdesc.dwFlags|=(DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN);
|
||||
rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
|
||||
ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() "
|
||||
"failed to create a %sprimary buffer: %s\n",has_3d?"3D ":"",
|
||||
DXGetErrorString8(rc));
|
||||
|
||||
if (rc==DS_OK && primary!=NULL) {
|
||||
ok((rc==DS_OK && primary!=NULL) || (rc == DSERR_CONTROLUNAVAIL),
|
||||
"IDirectSound8_CreateSoundBuffer() failed to create a %sprimary buffer: "
|
||||
"%s\n",has_3d?"3D ":"", DXGetErrorString8(rc));
|
||||
if (rc == DSERR_CONTROLUNAVAIL)
|
||||
trace(" No Primary\n");
|
||||
else if (rc==DS_OK && primary!=NULL) {
|
||||
rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL);
|
||||
ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %s\n",
|
||||
DXGetErrorString8(rc));
|
||||
|
@ -847,9 +848,12 @@ static HRESULT test_primary8(LPGUID lpGuid)
|
|||
bufdesc.dwSize=sizeof(bufdesc);
|
||||
bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN;
|
||||
rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
|
||||
ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() failed "
|
||||
"to create a primary buffer: 0x%lx\n",rc);
|
||||
if (rc==DS_OK && primary!=NULL) {
|
||||
ok((rc==DS_OK && primary!=NULL) || (rc == DSERR_CONTROLUNAVAIL),
|
||||
"IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: "
|
||||
"%s\n",DXGetErrorString8(rc));
|
||||
if (rc == DSERR_CONTROLUNAVAIL)
|
||||
trace(" No Primary\n");
|
||||
else if (rc==DS_OK && primary!=NULL) {
|
||||
test_buffer8(dso,primary,1,TRUE,0,TRUE,0,winetest_interactive &&
|
||||
!(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,NULL,0,0);
|
||||
if (winetest_interactive) {
|
||||
|
|
|
@ -428,10 +428,12 @@ static HRESULT test_primary(LPGUID lpGuid)
|
|||
bufdesc.dwSize=sizeof(bufdesc);
|
||||
bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME;
|
||||
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
|
||||
ok(rc==DS_OK && primary!=NULL,
|
||||
ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL),
|
||||
"IDirectSound_CreateSoundBuffer() failed to create a primary buffer: "
|
||||
"%s\n",DXGetErrorString8(rc));
|
||||
if (rc==DS_OK && primary!=NULL) {
|
||||
if (rc==DSERR_CONTROLUNAVAIL)
|
||||
trace(" No Primary\n");
|
||||
else if (rc==DS_OK && primary!=NULL) {
|
||||
LONG vol;
|
||||
|
||||
/* Try to create a second primary buffer */
|
||||
|
|
|
@ -454,10 +454,12 @@ static HRESULT test_primary8(LPGUID lpGuid)
|
|||
bufdesc.dwSize=sizeof(bufdesc);
|
||||
bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME;
|
||||
rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
|
||||
ok(rc==DS_OK && primary!=NULL,
|
||||
ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL),
|
||||
"IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: "
|
||||
"%s\n",DXGetErrorString8(rc));
|
||||
if (rc==DS_OK && primary!=NULL) {
|
||||
if (rc==DSERR_CONTROLUNAVAIL)
|
||||
trace(" No Primary\n");
|
||||
else if (rc==DS_OK && primary!=NULL) {
|
||||
LONG vol;
|
||||
|
||||
/* Try to create a second primary buffer */
|
||||
|
|
Loading…
Reference in New Issue