Commit 57aa9ebc authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Get and print the DirectSound primary buffer volume.

parent 910b6958
...@@ -543,10 +543,12 @@ static HRESULT test_primary(LPGUID lpGuid) ...@@ -543,10 +543,12 @@ static HRESULT test_primary(LPGUID lpGuid)
primary=NULL; primary=NULL;
ZeroMemory(&bufdesc, sizeof(bufdesc)); ZeroMemory(&bufdesc, sizeof(bufdesc));
bufdesc.dwSize=sizeof(bufdesc); bufdesc.dwSize=sizeof(bufdesc);
bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL);
ok(rc==DS_OK && primary!=NULL,"CreateSoundBuffer failed to create a primary buffer: 0x%lx\n",rc); ok(rc==DS_OK && primary!=NULL,"CreateSoundBuffer failed to create a primary buffer: 0x%lx\n",rc);
if (rc==DS_OK && primary!=NULL) { if (rc==DS_OK && primary!=NULL) {
LONG vol;
/* Try to create a second primary buffer */ /* Try to create a second primary buffer */
/* DSOUND: Error: The primary buffer already exists. Any changes made to the buffer description will be ignored. */ /* DSOUND: Error: The primary buffer already exists. Any changes made to the buffer description will be ignored. */
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&second,NULL); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&second,NULL);
...@@ -560,9 +562,14 @@ static HRESULT test_primary(LPGUID lpGuid) ...@@ -560,9 +562,14 @@ static HRESULT test_primary(LPGUID lpGuid)
/* rc=0x88780032 */ /* rc=0x88780032 */
ok(rc!=DS_OK,"IDirectSound_DuplicateSoundBuffer primary buffer should have failed 0x%lx\n",rc); ok(rc!=DS_OK,"IDirectSound_DuplicateSoundBuffer primary buffer should have failed 0x%lx\n",rc);
rc=IDirectSoundBuffer_GetVolume(primary,&vol);
ok(rc==DS_OK,"GetVolume failed: 0x%lx\n",rc);
if (winetest_interactive) if (winetest_interactive)
{ {
trace("Playing a 5 seconds reference tone.\n"); trace("Playing a 5 seconds reference tone at the current volume.\n");
if (rc==DS_OK)
trace("(the current volume is %ld according to DirectSound)\n",vol);
trace("All subsequent tones should be identical to this one.\n"); trace("All subsequent tones should be identical to this one.\n");
trace("Listen for stutter, changes in pitch, volume, etc.\n"); trace("Listen for stutter, changes in pitch, volume, etc.\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