Mark Harmstone : dsound: Implement GetObjectInPath.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 10 10:10:04 CDT 2015
Module: wine
Branch: master
Commit: 862d7dae75d70ea23acf78c68e8129b46e200aaf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=862d7dae75d70ea23acf78c68e8129b46e200aaf
Author: Mark Harmstone <hellas at burntcomma.com>
Date: Tue Mar 3 07:47:52 2015 +0000
dsound: Implement GetObjectInPath.
---
dlls/dsound/buffer.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 51796b7..92849a6 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -844,10 +844,23 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetObjectInPath(IDirectSoundBuffer8
{
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
- FIXME("(%p,%s,%u,%s,%p): stub\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject);
+ TRACE("(%p,%s,%u,%s,%p)\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject);
- WARN("control unavailable\n");
- return DSERR_CONTROLUNAVAIL;
+ if (dwIndex >= This->num_filters)
+ return DSERR_OBJECTNOTFOUND;
+
+ if (!ppObject)
+ return E_INVALIDARG;
+
+ if (IsEqualGUID(rguidObject, &This->filters[dwIndex].guid) || IsEqualGUID(rguidObject, &GUID_All_Objects)) {
+ if (SUCCEEDED(IMediaObject_QueryInterface(This->filters[dwIndex].obj, rguidInterface, ppObject)))
+ return DS_OK;
+ else
+ return E_NOINTERFACE;
+ } else {
+ WARN("control unavailable\n");
+ return DSERR_OBJECTNOTFOUND;
+ }
}
static HRESULT WINAPI IDirectSoundBufferImpl_Initialize(IDirectSoundBuffer8 *iface,
More information about the wine-cvs
mailing list