[PATCH] dsound: Primary buffers don't support IDirectSoundNotify

Michael Stefaniuc mstefani at winehq.org
Wed Nov 14 15:49:50 CST 2018


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/dsound/primary.c      | 1 -
 dlls/dsound/tests/dsound.c | 7 +++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index c64a6e79eb..f74db2f6e0 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -1101,7 +1101,6 @@ static HRESULT WINAPI PrimaryBufferImpl_QueryInterface(IDirectSoundBuffer8 *ifac
 
 	if ( IsEqualGUID( &IID_IDirectSoundNotify, riid ) ) {
 		ERR("app requested IDirectSoundNotify on primary buffer\n");
-		/* FIXME: should we support this? */
 		return E_NOINTERFACE;
 	}
 
diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index 0807d43788..89f0aa03ff 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -465,6 +465,7 @@ static HRESULT test_primary(LPGUID lpGuid)
         trace("  No Primary\n");
     else if (rc==DS_OK && primary!=NULL) {
         LONG vol;
+        IDirectSoundNotify *notify;
 
         /* Try to create a second primary buffer */
         /* DSOUND: Error: The primary buffer already exists.
@@ -509,8 +510,10 @@ static HRESULT test_primary(LPGUID lpGuid)
         ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references\n",ref);
 
         ref=IDirectSoundBuffer_Release(primary);
-        ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, "
-           "should have 0\n",ref);
+        ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references\n",ref);
+
+        rc=IDirectSoundBuffer_QueryInterface(primary,&IID_IDirectSoundNotify,(void **)&notify);
+        ok(rc==E_NOINTERFACE,"IDirectSoundBuffer_QueryInterface() failed %08x\n",rc);
     }
 
     /* Set the CooperativeLevel back to normal */
-- 
2.14.5




More information about the wine-devel mailing list