Commit 1bd7986c authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Only print format info when in interactive mode for capture test.

Cleanup error and info messges.
parent d2145850
...@@ -39,17 +39,66 @@ ...@@ -39,17 +39,66 @@
#define NOTIFICATIONS 5 #define NOTIFICATIONS 5
static const char * get_format_str(WORD format)
{
static char msg[32];
#define WAVE_FORMAT(f) case f: return #f
switch (format) {
WAVE_FORMAT(WAVE_FORMAT_PCM);
WAVE_FORMAT(WAVE_FORMAT_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_IBM_CVSD);
WAVE_FORMAT(WAVE_FORMAT_ALAW);
WAVE_FORMAT(WAVE_FORMAT_MULAW);
WAVE_FORMAT(WAVE_FORMAT_OKI_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_IMA_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_MEDIASPACE_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_SIERRA_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_G723_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_DIGISTD);
WAVE_FORMAT(WAVE_FORMAT_DIGIFIX);
WAVE_FORMAT(WAVE_FORMAT_DIALOGIC_OKI_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_YAMAHA_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_SONARC);
WAVE_FORMAT(WAVE_FORMAT_DSPGROUP_TRUESPEECH);
WAVE_FORMAT(WAVE_FORMAT_ECHOSC1);
WAVE_FORMAT(WAVE_FORMAT_AUDIOFILE_AF36);
WAVE_FORMAT(WAVE_FORMAT_APTX);
WAVE_FORMAT(WAVE_FORMAT_AUDIOFILE_AF10);
WAVE_FORMAT(WAVE_FORMAT_DOLBY_AC2);
WAVE_FORMAT(WAVE_FORMAT_GSM610);
WAVE_FORMAT(WAVE_FORMAT_ANTEX_ADPCME);
WAVE_FORMAT(WAVE_FORMAT_CONTROL_RES_VQLPC);
WAVE_FORMAT(WAVE_FORMAT_DIGIREAL);
WAVE_FORMAT(WAVE_FORMAT_DIGIADPCM);
WAVE_FORMAT(WAVE_FORMAT_CONTROL_RES_CR10);
WAVE_FORMAT(WAVE_FORMAT_NMS_VBXADPCM);
WAVE_FORMAT(WAVE_FORMAT_G721_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_MPEG);
WAVE_FORMAT(WAVE_FORMAT_MPEGLAYER3);
WAVE_FORMAT(WAVE_FORMAT_CREATIVE_ADPCM);
WAVE_FORMAT(WAVE_FORMAT_CREATIVE_FASTSPEECH8);
WAVE_FORMAT(WAVE_FORMAT_CREATIVE_FASTSPEECH10);
WAVE_FORMAT(WAVE_FORMAT_FM_TOWNS_SND);
WAVE_FORMAT(WAVE_FORMAT_OLIGSM);
WAVE_FORMAT(WAVE_FORMAT_OLIADPCM);
WAVE_FORMAT(WAVE_FORMAT_OLICELP);
WAVE_FORMAT(WAVE_FORMAT_OLISBC);
WAVE_FORMAT(WAVE_FORMAT_OLIOPR);
WAVE_FORMAT(WAVE_FORMAT_DEVELOPMENT);
WAVE_FORMAT(WAVE_FORMAT_EXTENSIBLE);
}
#undef WAVE_FORMAT
sprintf(msg, "Unknown(0x%04x)", format);
return msg;
}
static char * format_string(WAVEFORMATEX* wfx) static char * format_string(WAVEFORMATEX* wfx)
{ {
static char str[64]; static char str[64];
sprintf(str, "%ldx%dx%d %s", sprintf(str, "%5ldx%2dx%d %s",
wfx->nSamplesPerSec, wfx->wBitsPerSample, wfx->nChannels, wfx->nSamplesPerSec, wfx->wBitsPerSample, wfx->nChannels,
wfx->wFormatTag == WAVE_FORMAT_PCM ? "WAVE_FORMAT_PCM" : get_format_str(wfx->wFormatTag));
wfx->wFormatTag == WAVE_FORMAT_MULAW ? "WAVE_FORMAT_MULAW" :
wfx->wFormatTag == WAVE_FORMAT_IMA_ADPCM ? "WAVE_FORMAT_IMA_ADPCM" :
wfx->wFormatTag == WAVE_FORMAT_EXTENSIBLE ? "WAVE_FORMAT_EXTENSIBLE" :
"Unknown");
return str; return str;
} }
...@@ -131,13 +180,14 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, ...@@ -131,13 +180,14 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps); rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps);
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCaps() failed: %s\n", ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCaps() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DS_OK) { if (rc==DS_OK && winetest_debug > 1) {
trace(" Caps: size = %ld flags=0x%08lx buffer size=%ld\n", trace(" Caps: size = %ld flags=0x%08lx buffer size=%ld\n",
dscbcaps.dwSize,dscbcaps.dwFlags,dscbcaps.dwBufferBytes); dscbcaps.dwSize,dscbcaps.dwFlags,dscbcaps.dwBufferBytes);
} }
/* Query the format size. Note that it may not match sizeof(wfx) */ /* Query the format size. Note that it may not match sizeof(wfx) */
/* Private dsound.dll: Error: Either pwfxFormat or pdwSizeWritten must be non-NULL */ /* Private dsound.dll: Error: Either pwfxFormat or pdwSizeWritten must
* be non-NULL */
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,NULL); rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,NULL);
ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetFormat() should " ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetFormat() should "
"have returned DSERR_INVALIDPARAM, returned: %s\n", "have returned DSERR_INVALIDPARAM, returned: %s\n",
...@@ -152,7 +202,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, ...@@ -152,7 +202,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,&wfx,sizeof(wfx),NULL); rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,&wfx,sizeof(wfx),NULL);
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetFormat() failed: %s\n", ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetFormat() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DS_OK) { if (rc==DS_OK && winetest_debug > 1) {
trace(" Format: tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", trace(" Format: tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n",
wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample,
wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign);
...@@ -167,8 +217,8 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, ...@@ -167,8 +217,8 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status); rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status);
ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %s\n", ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DS_OK) { if (rc==DS_OK && winetest_debug > 1) {
trace(" status=0x%04lx\n",status); trace(" Status=0x%04lx\n",status);
} }
ZeroMemory(&state, sizeof(state)); ZeroMemory(&state, sizeof(state));
...@@ -256,7 +306,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ...@@ -256,7 +306,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
int ref; int ref;
/* Private dsound.dll: Error: Invalid interface buffer */ /* Private dsound.dll: Error: Invalid interface buffer */
trace("Testing %s - %s\n",lpcstrDescription,lpcstrModule); trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
rc=DirectSoundCaptureCreate(lpGuid,NULL,NULL); rc=DirectSoundCaptureCreate(lpGuid,NULL,NULL);
ok(rc==DSERR_INVALIDPARAM,"DirectSoundCaptureCreate() should have " ok(rc==DSERR_INVALIDPARAM,"DirectSoundCaptureCreate() should have "
"returned DSERR_INVALIDPARAM, returned: %s\n",DXGetErrorString8(rc)); "returned DSERR_INVALIDPARAM, returned: %s\n",DXGetErrorString8(rc));
...@@ -287,7 +337,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ...@@ -287,7 +337,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps); rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps);
ok(rc==DS_OK,"IDirectSoundCapture_GetCaps() failed: %s\n", ok(rc==DS_OK,"IDirectSoundCapture_GetCaps() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DS_OK) { if (rc==DS_OK && winetest_debug > 1) {
trace(" Caps: size=%ld flags=0x%08lx formats=%05lx channels=%ld\n", trace(" Caps: size=%ld flags=0x%08lx formats=%05lx channels=%ld\n",
dsccaps.dwSize,dsccaps.dwFlags,dsccaps.dwFormats, dsccaps.dwSize,dsccaps.dwFlags,dsccaps.dwFormats,
dsccaps.dwChannels); dsccaps.dwChannels);
...@@ -377,6 +427,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ...@@ -377,6 +427,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec; bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec;
bufdesc.dwReserved=0; bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=&wfx; bufdesc.lpwfxFormat=&wfx;
if (winetest_interactive)
trace(" Testing the capture buffer at %s\n", format_string(&wfx)); trace(" Testing the capture buffer at %s\n", format_string(&wfx));
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok((rc==DS_OK)&&(dscbo!=NULL), ok((rc==DS_OK)&&(dscbo!=NULL),
...@@ -399,6 +450,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ...@@ -399,6 +450,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec; bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec;
bufdesc.dwReserved=0; bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=&wfx; bufdesc.lpwfxFormat=&wfx;
if (winetest_interactive)
trace(" Testing the capture buffer at %s\n", format_string(&wfx)); trace(" Testing the capture buffer at %s\n", format_string(&wfx));
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok((rc==DS_OK)&&(dscbo!=NULL),"IDirectSoundCapture_CreateCaptureBuffer() " ok((rc==DS_OK)&&(dscbo!=NULL),"IDirectSoundCapture_CreateCaptureBuffer() "
...@@ -420,6 +472,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ...@@ -420,6 +472,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec; bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec;
bufdesc.dwReserved=0; bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=&wfx; bufdesc.lpwfxFormat=&wfx;
if (winetest_interactive)
trace(" Testing the capture buffer at %s\n", format_string(&wfx)); trace(" Testing the capture buffer at %s\n", format_string(&wfx));
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok(rc!=DS_OK,"IDirectSoundCapture_CreateCaptureBuffer() should have failed " ok(rc!=DS_OK,"IDirectSoundCapture_CreateCaptureBuffer() should have failed "
......
...@@ -373,8 +373,10 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER dsbo, ...@@ -373,8 +373,10 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER dsbo,
if (is_primary) { if (is_primary) {
/* We must call SetCooperativeLevel to be allowed to call Lock */ /* We must call SetCooperativeLevel to be allowed to call Lock */
/* DSOUND: Setting DirectSound cooperative level to DSSCL_WRITEPRIMARY */ /* DSOUND: Setting DirectSound cooperative level to
rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_WRITEPRIMARY); * DSSCL_WRITEPRIMARY */
rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),
DSSCL_WRITEPRIMARY);
ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_WRITEPRIMARY) " ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_WRITEPRIMARY) "
"failed: %s\n",DXGetErrorString8(rc)); "failed: %s\n",DXGetErrorString8(rc));
if (rc!=DS_OK) if (rc!=DS_OK)
...@@ -403,7 +405,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER dsbo, ...@@ -403,7 +405,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER dsbo,
"should have 1\n",ref); "should have 1\n",ref);
temp_buffer=NULL; temp_buffer=NULL;
rc=IDirectSound3DBuffer_QueryInterface(dsbo, &IID_IDirectSoundBuffer, rc=IDirectSound3DBuffer_QueryInterface(dsbo,
&IID_IDirectSoundBuffer,
(LPVOID *)&temp_buffer); (LPVOID *)&temp_buffer);
ok(rc==DS_OK && temp_buffer!=NULL, ok(rc==DS_OK && temp_buffer!=NULL,
"IDirectSound3DBuffer_QueryInterface() failed: %s\n", "IDirectSound3DBuffer_QueryInterface() failed: %s\n",
...@@ -503,7 +506,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER dsbo, ...@@ -503,7 +506,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER dsbo,
if (listener) { if (listener) {
ZeroMemory(&listener_param,sizeof(listener_param)); ZeroMemory(&listener_param,sizeof(listener_param));
listener_param.dwSize=sizeof(listener_param); listener_param.dwSize=sizeof(listener_param);
rc=IDirectSound3DListener_GetAllParameters(listener,&listener_param); rc=IDirectSound3DListener_GetAllParameters(listener,
&listener_param);
ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() "
"failed: %s\n",DXGetErrorString8(rc)); "failed: %s\n",DXGetErrorString8(rc));
if (move_listener) { if (move_listener) {
...@@ -783,7 +787,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, ...@@ -783,7 +787,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
listener,move_listener,move_sound); listener,move_listener,move_sound);
ref=IDirectSoundBuffer_Release(secondary); ref=IDirectSoundBuffer_Release(secondary);
ok(ref==0,"IDirectSoundBuffer_Release() %s has %d references, " ok(ref==0,"IDirectSoundBuffer_Release() %s has %d references, "
"should have 0\n",has_duplicate?"duplicated":"secondary",ref); "should have 0\n",has_duplicate?"duplicated":"secondary",
ref);
} }
} }
} }
...@@ -1070,7 +1075,7 @@ return DSERR_GENERIC; ...@@ -1070,7 +1075,7 @@ return DSERR_GENERIC;
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
LPCSTR lpcstrModule, LPVOID lpContext) LPCSTR lpcstrModule, LPVOID lpContext)
{ {
trace("*** Testing %s - %s\n",lpcstrDescription,lpcstrModule); trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
trace(" Testing the primary buffer\n"); trace(" Testing the primary buffer\n");
test_primary(lpGuid); test_primary(lpGuid);
......
...@@ -147,10 +147,9 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, ...@@ -147,10 +147,9 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized,
rc=IDirectSound_GetSpeakerConfig(dso,&new_speaker_config); rc=IDirectSound_GetSpeakerConfig(dso,&new_speaker_config);
ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %s\n", ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DS_OK) if (rc==DS_OK && speaker_config!=new_speaker_config)
ok(speaker_config==new_speaker_config, trace("IDirectSound_GetSpeakerConfig() failed to set speaker "
"IDirectSound_GetSpeakerConfig() failed to set speaker config: " "config: expected 0x%08lx, got 0x%08lx\n",
"expected 0x%08lx, got 0x%08lx\n",
speaker_config,new_speaker_config); speaker_config,new_speaker_config);
} }
...@@ -426,7 +425,8 @@ static HRESULT test_primary(LPGUID lpGuid) ...@@ -426,7 +425,8 @@ static HRESULT test_primary(LPGUID lpGuid)
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (winetest_interactive) { if (winetest_interactive) {
trace("Playing a 5 seconds reference tone at the current volume.\n"); trace("Playing a 5 seconds reference tone at the current "
"volume.\n");
if (rc==DS_OK) if (rc==DS_OK)
trace("(the current volume is %ld according to DirectSound)\n", trace("(the current volume is %ld according to DirectSound)\n",
vol); vol);
...@@ -502,8 +502,10 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) ...@@ -502,8 +502,10 @@ static HRESULT test_primary_secondary(LPGUID lpGuid)
if (rc==DS_OK && primary!=NULL) { if (rc==DS_OK && primary!=NULL) {
for (f=0;f<NB_FORMATS;f++) { for (f=0;f<NB_FORMATS;f++) {
/* We must call SetCooperativeLevel to be allowed to call SetFormat */ /* We must call SetCooperativeLevel to be allowed to call
/* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ * SetFormat */
/* DSOUND: Setting DirectSound cooperative level to
* DSSCL_PRIORITY */
rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY);
ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n", ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
...@@ -686,7 +688,7 @@ EXIT: ...@@ -686,7 +688,7 @@ EXIT:
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
LPCSTR lpcstrModule, LPVOID lpContext) LPCSTR lpcstrModule, LPVOID lpContext)
{ {
trace("*** Testing %s - %s\n",lpcstrDescription,lpcstrModule); trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
test_dsound(lpGuid); test_dsound(lpGuid);
test_primary(lpGuid); test_primary(lpGuid);
test_primary_secondary(lpGuid); test_primary_secondary(lpGuid);
......
...@@ -154,10 +154,9 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, ...@@ -154,10 +154,9 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized,
rc=IDirectSound8_GetSpeakerConfig(dso,&new_speaker_config); rc=IDirectSound8_GetSpeakerConfig(dso,&new_speaker_config);
ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %s\n", ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
if (rc==DS_OK) if (rc==DS_OK && speaker_config!=new_speaker_config)
ok(speaker_config==new_speaker_config, trace("IDirectSound8_GetSpeakerConfig() failed to set speaker "
"IDirectSound8_GetSpeakerConfig() failed to set speaker config: " "config: expected 0x%08lx, got 0x%08lx\n",
"expected 0x%08lx, got 0x%08lx\n",
speaker_config,new_speaker_config); speaker_config,new_speaker_config);
} }
...@@ -522,8 +521,10 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid) ...@@ -522,8 +521,10 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
if (rc==DS_OK && primary!=NULL) { if (rc==DS_OK && primary!=NULL) {
for (f=0;f<NB_FORMATS;f++) { for (f=0;f<NB_FORMATS;f++) {
/* We must call SetCooperativeLevel to be allowed to call SetFormat */ /* We must call SetCooperativeLevel to be allowed to call
/* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ * SetFormat */
/* DSOUND: Setting DirectSound cooperative level to
* DSSCL_PRIORITY */
rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY);
ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %s\n", ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %s\n",
DXGetErrorString8(rc)); DXGetErrorString8(rc));
...@@ -706,7 +707,7 @@ EXIT: ...@@ -706,7 +707,7 @@ EXIT:
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
LPCSTR lpcstrModule, LPVOID lpContext) LPCSTR lpcstrModule, LPVOID lpContext)
{ {
trace("*** Testing %s - %s\n",lpcstrDescription,lpcstrModule); trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
test_dsound8(lpGuid); test_dsound8(lpGuid);
test_primary8(lpGuid); test_primary8(lpGuid);
test_primary_secondary8(lpGuid); test_primary_secondary8(lpGuid);
......
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