Commit 1ec90490 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

dsound/tests: Call interface methods properly.

parent 264267fc
...@@ -114,7 +114,7 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco, ...@@ -114,7 +114,7 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
ok(rc==DS_OK, "IDirectSoundCapture_QueryInterface(IID_IUnknown) " ok(rc==DS_OK, "IDirectSoundCapture_QueryInterface(IID_IUnknown) "
"failed: %08x\n", rc); "failed: %08x\n", rc);
if (rc==DS_OK) if (rc==DS_OK)
IDirectSoundCapture_Release(unknown); IUnknown_Release(unknown);
rc=IDirectSoundCapture_QueryInterface(dsco, &IID_IDirectSoundCapture, rc=IDirectSoundCapture_QueryInterface(dsco, &IID_IDirectSoundCapture,
(LPVOID*)&dsc); (LPVOID*)&dsc);
...@@ -162,7 +162,7 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco, ...@@ -162,7 +162,7 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
ZeroMemory(&dsccaps, sizeof(dsccaps)); ZeroMemory(&dsccaps, sizeof(dsccaps));
/* DSOUND: Error: Invalid caps buffer */ /* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dsco, &dsccaps); rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps);
ok(rc==DSERR_INVALIDPARAM, "IDirectSound_GetCaps() " ok(rc==DSERR_INVALIDPARAM, "IDirectSound_GetCaps() "
"should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
......
...@@ -535,18 +535,6 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, ...@@ -535,18 +535,6 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " ok(ref==1,"IDirectSoundBuffer_Release() has %d references, "
"should have 1\n",ref); "should have 1\n",ref);
temp_buffer=NULL;
rc=IDirectSound3DBuffer_QueryInterface(*dsbo,
&IID_IDirectSoundBuffer,
(LPVOID *)&temp_buffer);
ok(rc==DS_OK && temp_buffer!=NULL,
"IDirectSound3DBuffer_QueryInterface() failed: %08x\n", rc);
ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n",
temp_buffer,*dsbo);
ref=IDirectSoundBuffer_Release(temp_buffer);
ok(ref==1,"IDirectSoundBuffer_Release() has %d references, "
"should have 1\n",ref);
ref=IDirectSoundBuffer_Release(*dsbo); ref=IDirectSoundBuffer_Release(*dsbo);
ok(ref==0,"IDirectSoundBuffer_Release() has %d references, " ok(ref==0,"IDirectSoundBuffer_Release() has %d references, "
"should have 0\n",ref); "should have 0\n",ref);
...@@ -1193,6 +1181,8 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) ...@@ -1193,6 +1181,8 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
if (rc==DS_OK && primary!=NULL) { if (rc==DS_OK && primary!=NULL) {
LPDIRECTSOUND3DLISTENER listener=NULL; LPDIRECTSOUND3DLISTENER listener=NULL;
LPDIRECTSOUNDBUFFER temp_buffer=NULL; LPDIRECTSOUNDBUFFER temp_buffer=NULL;
IKsPropertySet *propset;
rc=IDirectSoundBuffer_QueryInterface(primary, rc=IDirectSoundBuffer_QueryInterface(primary,
&IID_IDirectSound3DListener,(void **)&listener); &IID_IDirectSound3DListener,(void **)&listener);
ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() " ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() "
...@@ -1231,11 +1221,10 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) ...@@ -1231,11 +1221,10 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
temp_buffer = NULL; temp_buffer = NULL;
rc = IDirectSound3DListener_QueryInterface(listener, &IID_IKsPropertySet, rc = IDirectSound3DListener_QueryInterface(listener, &IID_IKsPropertySet,
(void **)&temp_buffer); (void **)&propset);
ok(rc==DS_OK && temp_buffer!=NULL, ok(rc == DS_OK && propset != NULL,
"IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc); "IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc);
if(temp_buffer) IKsPropertySet_Release(propset);
IKsPropertySet_Release(temp_buffer);
} }
/* Testing the reference counting */ /* Testing the reference counting */
...@@ -1244,12 +1233,11 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) ...@@ -1244,12 +1233,11 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
"references, should have 0\n",ref); "references, should have 0\n",ref);
} }
temp_buffer = NULL; propset = NULL;
rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IKsPropertySet, (void **)&temp_buffer); rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IKsPropertySet, (void **)&propset);
ok(rc==DS_OK && temp_buffer!=NULL, ok(rc == DS_OK && propset != NULL,
"IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc); "IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc);
if(temp_buffer) IKsPropertySet_Release(propset);
IKsPropertySet_Release(temp_buffer);
/* Testing the reference counting */ /* Testing the reference counting */
ref=IDirectSoundBuffer_Release(primary); ref=IDirectSoundBuffer_Release(primary);
......
...@@ -371,17 +371,6 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, ...@@ -371,17 +371,6 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " ok(ref==1,"IDirectSoundBuffer_Release() has %d references, "
"should have 1\n",ref); "should have 1\n",ref);
temp_buffer=NULL;
rc=IDirectSound3DBuffer_QueryInterface(*dsbo, &IID_IDirectSoundBuffer,
(LPVOID *)&temp_buffer);
ok(rc==DS_OK && temp_buffer!=NULL,
"IDirectSound3DBuffer_QueryInterface() failed: %08x\n", rc);
ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n",
temp_buffer,*dsbo);
ref=IDirectSoundBuffer_Release(temp_buffer);
ok(ref==1,"IDirectSoundBuffer_Release() has %d references, "
"should have 1\n",ref);
ref=IDirectSoundBuffer_Release(*dsbo); ref=IDirectSoundBuffer_Release(*dsbo);
ok(ref==0,"IDirectSoundBuffer_Release() has %d references, " ok(ref==0,"IDirectSoundBuffer_Release() has %d references, "
"should have 0\n",ref); "should have 0\n",ref);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "wine/test.h" #include "wine/test.h"
#include "mmsystem.h" #include "mmsystem.h"
#define COBJMACROS
#include "dsound.h" #include "dsound.h"
#include "dsconf.h" #include "dsconf.h"
#include "initguid.h" #include "initguid.h"
...@@ -61,7 +62,7 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, ...@@ -61,7 +62,7 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown); rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %08x\n", rc); ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
if (rc==DS_OK) if (rc==DS_OK)
IDirectSound_Release(unknown); IUnknown_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds); rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %08x\n", rc);
...@@ -337,7 +338,7 @@ static HRESULT test_dsound(LPGUID lpGuid) ...@@ -337,7 +338,7 @@ static HRESULT test_dsound(LPGUID lpGuid)
"buffer %08x\n",rc); "buffer %08x\n",rc);
if (rc==DS_OK && secondary!=NULL) { if (rc==DS_OK && secondary!=NULL) {
LPDIRECTSOUND3DBUFFER buffer3d; LPDIRECTSOUND3DBUFFER buffer3d;
rc=IDirectSound_QueryInterface(secondary, &IID_IDirectSound3DBuffer, rc = IDirectSoundBuffer_QueryInterface(secondary, &IID_IDirectSound3DBuffer,
(void **)&buffer3d); (void **)&buffer3d);
ok(rc==DS_OK && buffer3d!=NULL,"IDirectSound_QueryInterface() " ok(rc==DS_OK && buffer3d!=NULL,"IDirectSound_QueryInterface() "
"failed: %08x\n",rc); "failed: %08x\n",rc);
......
...@@ -72,7 +72,7 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, ...@@ -72,7 +72,7 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown); rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %08x\n", rc); ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
if (rc==DS_OK) if (rc==DS_OK)
IDirectSound8_Release(unknown); IUnknown_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds); rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %08x\n", rc);
...@@ -353,7 +353,7 @@ static HRESULT test_dsound8(LPGUID lpGuid) ...@@ -353,7 +353,7 @@ static HRESULT test_dsound8(LPGUID lpGuid)
if (rc==DS_OK && secondary!=NULL) { if (rc==DS_OK && secondary!=NULL) {
LPDIRECTSOUND3DBUFFER buffer3d; LPDIRECTSOUND3DBUFFER buffer3d;
LPDIRECTSOUNDBUFFER8 buffer8; LPDIRECTSOUNDBUFFER8 buffer8;
rc=IDirectSound8_QueryInterface(secondary, rc=IDirectSoundBuffer_QueryInterface(secondary,
&IID_IDirectSound3DBuffer, &IID_IDirectSound3DBuffer,
(void **)&buffer3d); (void **)&buffer3d);
ok(rc==DS_OK && buffer3d!=NULL, ok(rc==DS_OK && buffer3d!=NULL,
...@@ -363,7 +363,7 @@ static HRESULT test_dsound8(LPGUID lpGuid) ...@@ -363,7 +363,7 @@ static HRESULT test_dsound8(LPGUID lpGuid)
ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, " ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, "
"should have 2\n",ref); "should have 2\n",ref);
} }
rc=IDirectSound8_QueryInterface(secondary, rc=IDirectSoundBuffer_QueryInterface(secondary,
&IID_IDirectSoundBuffer8, &IID_IDirectSoundBuffer8,
(void **)&buffer8); (void **)&buffer8);
if (rc==DS_OK && buffer8!=NULL) { if (rc==DS_OK && buffer8!=NULL) {
...@@ -645,7 +645,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) ...@@ -645,7 +645,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,format_tags[tag], wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels,format_tags[tag],
wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels); wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels);
} }
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(rc==DS_OK && secondary!=NULL, ok(rc==DS_OK && secondary!=NULL,
"IDirectSound_CreateSoundBuffer() failed to create a secondary " "IDirectSound_CreateSoundBuffer() failed to create a secondary "
"buffer %08x\n",rc); "buffer %08x\n",rc);
...@@ -756,7 +756,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -756,7 +756,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000, bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000,
wfx.nBlockAlign); wfx.nBlockAlign);
bufdesc.lpwfxFormat=&wfx; bufdesc.lpwfxFormat=&wfx;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
if (wfx.wBitsPerSample != 8 && wfx.wBitsPerSample != 16) if (wfx.wBitsPerSample != 8 && wfx.wBitsPerSample != 16)
ok(((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL || rc == DSERR_INVALIDPARAM /* 2003 */) && !secondary) ok(((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL || rc == DSERR_INVALIDPARAM /* 2003 */) && !secondary)
|| rc == DS_OK, /* driver dependent? */ || rc == DS_OK, /* driver dependent? */
...@@ -779,7 +779,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -779,7 +779,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
wfxe.Samples.wValidBitsPerSample = wfx.wBitsPerSample; wfxe.Samples.wValidBitsPerSample = wfx.wBitsPerSample;
wfxe.dwChannelMask = (wfx.nChannels == 1 ? KSAUDIO_SPEAKER_MONO : KSAUDIO_SPEAKER_STEREO); wfxe.dwChannelMask = (wfx.nChannels == 1 ? KSAUDIO_SPEAKER_MONO : KSAUDIO_SPEAKER_STEREO);
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(rc==DSERR_INVALIDPARAM && !secondary, ok(rc==DSERR_INVALIDPARAM && !secondary,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
...@@ -791,7 +791,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -791,7 +791,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx) + 1; wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx) + 1;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL /* 2003 */ || rc==DSERR_INVALIDPARAM) && !secondary) ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL /* 2003 */ || rc==DSERR_INVALIDPARAM) && !secondary)
|| rc==DS_OK /* driver dependent? */, || rc==DS_OK /* driver dependent? */,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
...@@ -804,7 +804,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -804,7 +804,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx);
wfxe.SubFormat = GUID_NULL; wfxe.SubFormat = GUID_NULL;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary, ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
...@@ -815,7 +815,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -815,7 +815,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
} }
wfxe.Format.cbSize = sizeof(wfxe); wfxe.Format.cbSize = sizeof(wfxe);
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL || rc==DSERR_INVALIDPARAM) && !secondary, ok((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL || rc==DSERR_INVALIDPARAM) && !secondary,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
...@@ -826,7 +826,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -826,7 +826,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
} }
wfxe.SubFormat = (format_tags[tag] == WAVE_FORMAT_PCM ? KSDATAFORMAT_SUBTYPE_PCM : KSDATAFORMAT_SUBTYPE_IEEE_FLOAT); wfxe.SubFormat = (format_tags[tag] == WAVE_FORMAT_PCM ? KSDATAFORMAT_SUBTYPE_PCM : KSDATAFORMAT_SUBTYPE_IEEE_FLOAT);
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(rc==DS_OK && secondary, ok(rc==DS_OK && secondary,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
...@@ -837,7 +837,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -837,7 +837,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
} }
wfxe.Format.cbSize = sizeof(wfxe) + 1; wfxe.Format.cbSize = sizeof(wfxe) + 1;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL /* 2003 */ || rc==DSERR_INVALIDPARAM) && !secondary) ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL /* 2003 */ || rc==DSERR_INVALIDPARAM) && !secondary)
|| rc==DS_OK /* driver dependent? */, || rc==DS_OK /* driver dependent? */,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
...@@ -850,7 +850,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -850,7 +850,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx);
++wfxe.Samples.wValidBitsPerSample; ++wfxe.Samples.wValidBitsPerSample;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(rc==DSERR_INVALIDPARAM && !secondary, ok(rc==DSERR_INVALIDPARAM && !secondary,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
...@@ -862,7 +862,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -862,7 +862,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
--wfxe.Samples.wValidBitsPerSample; --wfxe.Samples.wValidBitsPerSample;
wfxe.Samples.wValidBitsPerSample = 0; wfxe.Samples.wValidBitsPerSample = 0;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(rc==DS_OK && secondary, ok(rc==DS_OK && secondary,
"IDirectSound_CreateSoundBuffer() returned: %08x %p\n", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
...@@ -873,7 +873,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -873,7 +873,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
} }
wfxe.Samples.wValidBitsPerSample = wfxe.Format.wBitsPerSample; wfxe.Samples.wValidBitsPerSample = wfxe.Format.wBitsPerSample;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
ok(rc==DS_OK && secondary!=NULL, ok(rc==DS_OK && secondary!=NULL,
"IDirectSound_CreateSoundBuffer() failed to create a secondary " "IDirectSound_CreateSoundBuffer() failed to create a secondary "
"buffer %08x\n",rc); "buffer %08x\n",rc);
...@@ -1162,7 +1162,7 @@ static void test_COM(void) ...@@ -1162,7 +1162,7 @@ static void test_COM(void)
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
refcount = IUnknown_AddRef(unk); refcount = IUnknown_AddRef(unk);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount); ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
hr = IDirectSound_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8); hr = IDirectSound8_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
refcount = IUnknown_AddRef(unk8); refcount = IUnknown_AddRef(unk8);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount); ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
...@@ -1194,7 +1194,7 @@ static void test_effects(void) ...@@ -1194,7 +1194,7 @@ static void test_effects(void)
rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY);
ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc);
if (rc!=DS_OK) { if (rc!=DS_OK) {
IDirectSound_Release(dso); IDirectSound8_Release(dso);
return; return;
} }
...@@ -1372,7 +1372,7 @@ static void test_effects(void) ...@@ -1372,7 +1372,7 @@ static void test_effects(void)
IDirectSoundBuffer_Release(primary); IDirectSoundBuffer_Release(primary);
} }
while (IDirectSound_Release(dso)); while (IDirectSound8_Release(dso));
} }
START_TEST(dsound8) START_TEST(dsound8)
......
...@@ -49,7 +49,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo, ...@@ -49,7 +49,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo,
rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IUnknown,(LPVOID*)&unknown); rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IUnknown) failed: %08x\n", rc); ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
if (rc==DS_OK) { if (rc==DS_OK) {
ref=IDirectSoundFullDuplex_Release(unknown); ref = IUnknown_Release(unknown);
ok(ref==0, "IDirectSoundFullDuplex_Release() has %d references, " ok(ref==0, "IDirectSoundFullDuplex_Release() has %d references, "
"should have 0\n", ref); "should have 0\n", ref);
} }
...@@ -94,7 +94,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo, ...@@ -94,7 +94,7 @@ static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo,
"failed: %08x\n",rc); "failed: %08x\n",rc);
if (rc==DS_OK) { if (rc==DS_OK) {
ok(dsfdo==dsfd, "different interfaces\n"); ok(dsfdo==dsfd, "different interfaces\n");
ref=IDirectSound8_Release(dsfd); ref=IDirectSoundFullDuplex_Release(dsfd);
ok(ref==1, "IDirectSoundFullDuplex_Release() has %d references, should have 1\n", ref); ok(ref==1, "IDirectSoundFullDuplex_Release() has %d references, should have 1\n", ref);
} }
...@@ -319,7 +319,7 @@ static void test_COM(void) ...@@ -319,7 +319,7 @@ static void test_COM(void)
ok(refcount == 2, "refcount == %u, expected 2\n", refcount); ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
refcount = IDirectSoundFullDuplex_AddRef(dsfd); refcount = IDirectSoundFullDuplex_AddRef(dsfd);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount); ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
hr = IDirectSoundCapture_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8); hr = IDirectSound8_QueryInterface(ds8, &IID_IUnknown, (void**)&unk8);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
ok(unk == unk8, ok(unk == unk8,
"Got different IUnknown when QI'ing IDirectSoundFullDuplex and IDirectSoundCapture\n"); "Got different IUnknown when QI'ing IDirectSoundFullDuplex and IDirectSoundCapture\n");
......
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