mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 14:40:56 +00:00
dsound: Support IKsPropertySet in the primary buffer too.
This commit is contained in:
parent
48ca5924b4
commit
3ec0b056d5
@ -1159,8 +1159,12 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface)
|
||||
|
||||
TRACE("(%p) ref was %d\n", This, ref + 1);
|
||||
|
||||
if (!ref && !InterlockedDecrement(&This->numIfaces))
|
||||
secondarybuffer_destroy(This);
|
||||
if (!ref && !InterlockedDecrement(&This->numIfaces)) {
|
||||
if (is_primary_buffer(This))
|
||||
primarybuffer_destroy(This);
|
||||
else
|
||||
secondarybuffer_destroy(This);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
@ -1165,8 +1165,9 @@ static HRESULT WINAPI PrimaryBufferImpl_QueryInterface(IDirectSoundBuffer *iface
|
||||
}
|
||||
|
||||
if ( IsEqualGUID( &IID_IKsPropertySet, riid ) ) {
|
||||
FIXME("app requested IKsPropertySet on primary buffer\n");
|
||||
return E_NOINTERFACE;
|
||||
*ppobj = &This->IKsPropertySet_iface;
|
||||
IKsPropertySet_AddRef(&This->IKsPropertySet_iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME( "Unknown IID %s\n", debugstr_guid( riid ) );
|
||||
@ -1220,10 +1221,12 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
|
||||
|
||||
dsb->ref = 0;
|
||||
dsb->ref3D = 0;
|
||||
dsb->refiks = 0;
|
||||
dsb->numIfaces = 0;
|
||||
dsb->device = device;
|
||||
dsb->IDirectSoundBuffer8_iface.lpVtbl = (IDirectSoundBuffer8Vtbl *)&dspbvt;
|
||||
dsb->IDirectSound3DListener_iface.lpVtbl = &ds3dlvt;
|
||||
dsb->IKsPropertySet_iface.lpVtbl = &iksbvt;
|
||||
dsb->dsbd = *dsbd;
|
||||
|
||||
/* IDirectSound3DListener */
|
||||
|
@ -1213,15 +1213,13 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
|
||||
!(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,
|
||||
listener,0,0,FALSE,0);
|
||||
|
||||
todo_wine {
|
||||
temp_buffer = NULL;
|
||||
rc=IDirectSound3DListener_QueryInterface(listener,
|
||||
&IID_IKsPropertySet,(LPVOID *)&temp_buffer);
|
||||
ok(rc==DS_OK && temp_buffer!=NULL,
|
||||
"IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc);
|
||||
if(temp_buffer)
|
||||
IKsPropertySet_Release(temp_buffer);
|
||||
}
|
||||
temp_buffer = NULL;
|
||||
rc = IDirectSound3DListener_QueryInterface(listener, &IID_IKsPropertySet,
|
||||
(void **)&temp_buffer);
|
||||
ok(rc==DS_OK && temp_buffer!=NULL,
|
||||
"IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc);
|
||||
if(temp_buffer)
|
||||
IKsPropertySet_Release(temp_buffer);
|
||||
}
|
||||
|
||||
/* Testing the reference counting */
|
||||
@ -1230,15 +1228,12 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
|
||||
"references, should have 0\n",ref);
|
||||
}
|
||||
|
||||
todo_wine {
|
||||
temp_buffer = NULL;
|
||||
rc=IDirectSoundBuffer_QueryInterface(primary,
|
||||
&IID_IKsPropertySet,(LPVOID *)&temp_buffer);
|
||||
ok(rc==DS_OK && temp_buffer!=NULL,
|
||||
"IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc);
|
||||
if(temp_buffer)
|
||||
IKsPropertySet_Release(temp_buffer);
|
||||
}
|
||||
temp_buffer = NULL;
|
||||
rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IKsPropertySet, (void **)&temp_buffer);
|
||||
ok(rc==DS_OK && temp_buffer!=NULL,
|
||||
"IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc);
|
||||
if(temp_buffer)
|
||||
IKsPropertySet_Release(temp_buffer);
|
||||
|
||||
/* Testing the reference counting */
|
||||
ref=IDirectSoundBuffer_Release(primary);
|
||||
|
Loading…
Reference in New Issue
Block a user