[DSOUND_WINETEST]
authorChristoph von Wittich <christoph_vw@reactos.org>
Fri, 5 Mar 2010 18:44:59 +0000 (18:44 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Fri, 5 Mar 2010 18:44:59 +0000 (18:44 +0000)
sync dsound_winetest to wine 1.1.39

svn path=/trunk/; revision=45883

rostests/winetests/dsound/ds3d.c
rostests/winetests/dsound/dsound.c
rostests/winetests/dsound/dsound8.c
rostests/winetests/dsound/propset.c

index 71ff2ab..ad380d8 100644 (file)
@@ -1158,13 +1158,12 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
        "to create a 3D primary buffer: %08x\n",rc);
     if (rc==DS_OK && primary!=NULL) {
         LPDIRECTSOUND3DLISTENER listener=NULL;
        "to create a 3D primary buffer: %08x\n",rc);
     if (rc==DS_OK && primary!=NULL) {
         LPDIRECTSOUND3DLISTENER listener=NULL;
+        LPDIRECTSOUNDBUFFER temp_buffer=NULL;
         rc=IDirectSoundBuffer_QueryInterface(primary,
             &IID_IDirectSound3DListener,(void **)&listener);
         ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() "
            "failed to get a 3D listener: %08x\n",rc);
         if (rc==DS_OK && listener!=NULL) {
         rc=IDirectSoundBuffer_QueryInterface(primary,
             &IID_IDirectSound3DListener,(void **)&listener);
         ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() "
            "failed to get a 3D listener: %08x\n",rc);
         if (rc==DS_OK && listener!=NULL) {
-            LPDIRECTSOUNDBUFFER temp_buffer=NULL;
-
             /* Checking the COM interface */
             rc=IDirectSoundBuffer_QueryInterface(primary,
                 &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer);
             /* Checking the COM interface */
             rc=IDirectSoundBuffer_QueryInterface(primary,
                 &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer);
@@ -1195,6 +1194,16 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
                             winetest_interactive &&
                             !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,
                             listener,0,0,FALSE,0);
                             winetest_interactive &&
                             !(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);
+                }
             }
 
             /* Testing the reference counting */
             }
 
             /* Testing the reference counting */
@@ -1203,6 +1212,16 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
                "references, should have 0\n",ref);
         }
 
                "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);
+        }
+
         /* Testing the reference counting */
         ref=IDirectSoundBuffer_Release(primary);
         ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, "
         /* Testing the reference counting */
         ref=IDirectSoundBuffer_Release(primary);
         ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, "
index 114dbb6..f059c20 100644 (file)
@@ -55,7 +55,7 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
     IUnknown * unknown;
     IDirectSound * ds;
     IDirectSound8 * ds8;
     IUnknown * unknown;
     IDirectSound * ds;
     IDirectSound8 * ds8;
-    DWORD speaker_config, new_speaker_config;
+    DWORD speaker_config, new_speaker_config, ref_speaker_config;
 
     /* Try to Query for objects */
     rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
 
     /* Try to Query for objects */
     rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
@@ -144,11 +144,17 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
 
     rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config);
     ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc);
 
     rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config);
     ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc);
+    ref_speaker_config = speaker_config;
 
     speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO,
                                         DSSPEAKER_GEOMETRY_WIDE);
 
     speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO,
                                         DSSPEAKER_GEOMETRY_WIDE);
-    rc=IDirectSound_SetSpeakerConfig(dso,speaker_config);
-    ok(rc==DS_OK,"IDirectSound_SetSpeakerConfig() failed: %08x\n", rc);
+    if (speaker_config == ref_speaker_config)
+        speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO,
+                                            DSSPEAKER_GEOMETRY_NARROW);
+    if(rc==DS_OK) {
+        rc=IDirectSound_SetSpeakerConfig(dso,speaker_config);
+        ok(rc==DS_OK,"IDirectSound_SetSpeakerConfig() failed: %08x\n", rc);
+    }
     if (rc==DS_OK) {
         rc=IDirectSound_GetSpeakerConfig(dso,&new_speaker_config);
         ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc);
     if (rc==DS_OK) {
         rc=IDirectSound_GetSpeakerConfig(dso,&new_speaker_config);
         ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc);
@@ -156,6 +162,7 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
                trace("IDirectSound_GetSpeakerConfig() failed to set speaker "
                "config: expected 0x%08x, got 0x%08x\n",
                speaker_config,new_speaker_config);
                trace("IDirectSound_GetSpeakerConfig() failed to set speaker "
                "config: expected 0x%08x, got 0x%08x\n",
                speaker_config,new_speaker_config);
+        IDirectSound_SetSpeakerConfig(dso,ref_speaker_config);
     }
 
 EXIT:
     }
 
 EXIT:
index a2b16d8..5eb7c05 100644 (file)
@@ -54,7 +54,7 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
     IUnknown * unknown;
     IDirectSound * ds;
     IDirectSound8 * ds8;
     IUnknown * unknown;
     IDirectSound * ds;
     IDirectSound8 * ds8;
-    DWORD speaker_config, new_speaker_config;
+    DWORD speaker_config, new_speaker_config, ref_speaker_config;
     DWORD certified;
 
     /* Try to Query for objects */
     DWORD certified;
 
     /* Try to Query for objects */
@@ -148,11 +148,17 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
 
     rc=IDirectSound8_GetSpeakerConfig(dso,&speaker_config);
     ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc);
 
     rc=IDirectSound8_GetSpeakerConfig(dso,&speaker_config);
     ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc);
+    ref_speaker_config = speaker_config;
 
     speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO,
                                         DSSPEAKER_GEOMETRY_WIDE);
 
     speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO,
                                         DSSPEAKER_GEOMETRY_WIDE);
-    rc=IDirectSound8_SetSpeakerConfig(dso,speaker_config);
-    ok(rc==DS_OK,"IDirectSound8_SetSpeakerConfig() failed: %08x\n", rc);
+    if (speaker_config == ref_speaker_config)
+        speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO,
+                                            DSSPEAKER_GEOMETRY_NARROW);
+    if(rc==DS_OK) {
+        rc=IDirectSound8_SetSpeakerConfig(dso,speaker_config);
+        ok(rc==DS_OK,"IDirectSound8_SetSpeakerConfig() failed: %08x\n", rc);
+    }
     if (rc==DS_OK) {
         rc=IDirectSound8_GetSpeakerConfig(dso,&new_speaker_config);
         ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc);
     if (rc==DS_OK) {
         rc=IDirectSound8_GetSpeakerConfig(dso,&new_speaker_config);
         ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc);
@@ -160,6 +166,7 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
                trace("IDirectSound8_GetSpeakerConfig() failed to set speaker "
                "config: expected 0x%08x, got 0x%08x\n",
                speaker_config,new_speaker_config);
                trace("IDirectSound8_GetSpeakerConfig() failed to set speaker "
                "config: expected 0x%08x, got 0x%08x\n",
                speaker_config,new_speaker_config);
+        IDirectSound8_SetSpeakerConfig(dso,ref_speaker_config);
     }
 
     rc=IDirectSound8_VerifyCertification(dso, &certified);
     }
 
     rc=IDirectSound8_VerifyCertification(dso, &certified);
index 70a8e0d..5007fcc 100644 (file)
@@ -550,6 +550,7 @@ static void propset_private_tests(void)
                               NULL, 0, &data, sizeof(data), &bytes);
         ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc);
     }
                               NULL, 0, &data, sizeof(data), &bytes);
         ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc);
     }
+    IKsPropertySet_Release(pps);
 }
 
 static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
 }
 
 static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,