Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/xaudio2_7/tests/Makefile.in | 1 - dlls/xaudio2_7/tests/xaudio2.c | 182 +++++++++++++++---------------- 2 files changed, 91 insertions(+), 92 deletions(-)
diff --git a/dlls/xaudio2_7/tests/Makefile.in b/dlls/xaudio2_7/tests/Makefile.in index e44130a1d7a..ba56d94a1f3 100644 --- a/dlls/xaudio2_7/tests/Makefile.in +++ b/dlls/xaudio2_7/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = xaudio2_7.dll IMPORTS = ole32
diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index 9821553166e..9d50944b8d3 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -192,18 +192,18 @@ static void test_simple_streaming(IXAudio2 *xa) * XA2.7 does all mixing from a single thread, so call sequence can be * tested. */ XA2CALL(RegisterForCallbacks, &ecb); - ok(hr == S_OK, "RegisterForCallbacks failed: %08x\n", hr); + ok(hr == S_OK, "RegisterForCallbacks failed: %08lx\n", hr);
if(xaudio27) hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); else hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); - ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
if(!xaudio27){ chmask = 0xdeadbeef; IXAudio2MasteringVoice_GetChannelMask(master, &chmask); - ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%x\n", chmask); + ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%lx\n", chmask); }
/* create first source voice */ @@ -216,7 +216,7 @@ static void test_simple_streaming(IXAudio2 *xa) fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &vcb1, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
if(xaudio27){ XAUDIO27_VOICE_DETAILS details; @@ -239,14 +239,14 @@ static void test_simple_streaming(IXAudio2 *xa) fill_buf((float*)buf.pAudioData, &fmt, 440, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
/* create second source voice */ XA2CALL(CreateSourceVoice, &src2, &fmt, 0, 1.f, &vcb2, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
if(xaudio27){ XAUDIO27_VOICE_DETAILS details; @@ -269,13 +269,13 @@ static void test_simple_streaming(IXAudio2 *xa) fill_buf((float*)buf2.pAudioData, &fmt, 220, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src2, &buf2, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src2, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine); - ok(hr == S_OK, "StartEngine failed: %08x\n", hr); + ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
/* hook up volume meter */ if(xaudio27){ @@ -283,20 +283,20 @@ static void test_simple_streaming(IXAudio2 *xa)
hr = CoCreateInstance(&CLSID_AudioVolumeMeter27, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&vumeter); - ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08x\n", hr); + ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO27, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); }else{ IXAPO *xapo;
hr = pCreateAudioVolumeMeter(&vumeter); - ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr); + ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); } @@ -309,7 +309,7 @@ static void test_simple_streaming(IXAudio2 *xa) chain.pEffectDescriptors = &effect;
hr = IXAudio2MasteringVoice_SetEffectChain(master, &chain); - ok(hr == S_OK, "SetEffectchain failed: %08x\n", hr); + ok(hr == S_OK, "SetEffectchain failed: %08lx\n", hr);
IUnknown_Release(vumeter);
@@ -488,7 +488,7 @@ static void test_buffer_callbacks(IXAudio2 *xa) hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); else hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); - ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
/* test OnBufferStart/End callbacks */ fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; @@ -500,7 +500,7 @@ static void test_buffer_callbacks(IXAudio2 *xa) fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &vcb_buf, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf)); buf.AudioBytes = 4410 * fmt.nBlockAlign; @@ -514,22 +514,22 @@ static void test_buffer_callbacks(IXAudio2 *xa) buf.pContext = &testdata[i];
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr); }
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine); - ok(hr == S_OK, "StartEngine failed: %08x\n", hr); + ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
if(xaudio27){ hr = IXAudio27SourceVoice_SetSourceSampleRate((IXAudio27SourceVoice*)src, 48000); - ok(hr == S_OK, "SetSourceSampleRate failed: %08x\n", hr); + ok(hr == S_OK, "SetSourceSampleRate failed: %08lx\n", hr); }else{ hr = IXAudio2SourceVoice_SetSourceSampleRate(src, 48000); - ok(hr == XAUDIO2_E_INVALID_CALL, "SetSourceSampleRate should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SetSourceSampleRate should have failed: %08lx\n", hr); }
while(1){ @@ -552,15 +552,15 @@ static void test_buffer_callbacks(IXAudio2 *xa)
/* test OnStreamEnd callback */ XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &loop_buf, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
buf.Flags = XAUDIO2_END_OF_STREAM;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
timeout = 0; while(nstreamends == 0 && timeout < 1000){ @@ -596,7 +596,7 @@ static UINT32 play_to_completion(IXAudio2SourceVoice *src, UINT32 max_samples) nloopends = 0;
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
while(1){ if(xaudio27) @@ -615,7 +615,7 @@ static UINT32 play_to_completion(IXAudio2SourceVoice *src, UINT32 max_samples) }
hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
return state.SamplesPlayed; } @@ -635,7 +635,7 @@ static void test_looping(IXAudio2 *xa) hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); else hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); - ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; @@ -647,7 +647,7 @@ static void test_looping(IXAudio2 *xa) fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &loop_buf, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
@@ -656,7 +656,7 @@ static void test_looping(IXAudio2 *xa) fill_buf((float*)buf.pAudioData, &fmt, 440, 44100);
XA2CALL_0(StartEngine); - ok(hr == S_OK, "StartEngine failed: %08x\n", hr); + ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
/* play from middle to end */ buf.PlayBegin = 22050; @@ -666,7 +666,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 0;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 22050, "Got wrong samples played: %u\n", played - running_total); @@ -681,7 +681,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 0;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 4410, "Got wrong samples played: %u\n", played - running_total); @@ -696,7 +696,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 44100 + 4410, "Got wrong samples played: %u\n", played - running_total); @@ -711,7 +711,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 22050 + 44100, "Got wrong samples played: %u\n", played - running_total); @@ -726,7 +726,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 4410 + (22050 + 4410), "Got wrong samples played: %u\n", played - running_total); @@ -743,14 +743,14 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); if(xaudio27){ - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 4410 + (22050 + 4410 * 2), "Got wrong samples played: %u\n", played - running_total); running_total = played; ok(nloopends == 1, "Got wrong OnLoopEnd calls: %u\n", nloopends); }else - ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
/* invalid: LoopEnd must be within play range * xaudio27: plays only play range */ @@ -762,14 +762,14 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); if(xaudio27){ - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1); ok(played - running_total == 22050, "Got wrong samples played: %u\n", played - running_total); running_total = played; ok(nloopends == 0, "Got wrong OnLoopEnd calls: %u\n", nloopends); }else - ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
/* invalid: LoopBegin must be before PlayEnd * xaudio27: crashes */ @@ -781,7 +781,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr); }
/* infinite looping buffer */ @@ -792,7 +792,7 @@ static void test_looping(IXAudio2 *xa) buf.LoopCount = 255;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, running_total + 88200); ok(played - running_total == 22050 + 44100 * 2, "Got wrong samples played: %u\n", played - running_total); @@ -819,10 +819,10 @@ static void test_submix(IXAudio2 *xa) hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); else hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); - ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
XA2CALL(CreateSubmixVoice, &sub, 2, 44100, 0, 0, NULL, NULL); - ok(hr == S_OK, "CreateSubmixVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
if(xaudio27){ XAUDIO27_VOICE_DETAILS details; @@ -858,7 +858,7 @@ static void test_flush(IXAudio2 *xa) hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); else hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); - ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; fmt.nChannels = 2; @@ -869,7 +869,7 @@ static void test_flush(IXAudio2 *xa) fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf)); buf.AudioBytes = 22050 * fmt.nBlockAlign; @@ -877,13 +877,13 @@ static void test_flush(IXAudio2 *xa) fill_buf((float*)buf.pAudioData, &fmt, 440, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine); - ok(hr == S_OK, "StartEngine failed: %08x\n", hr); + ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
while(1){ if(xaudio27) @@ -896,18 +896,18 @@ static void test_flush(IXAudio2 *xa) }
hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Stop failed: %08x\n", hr); + ok(hr == S_OK, "Stop failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_FlushSourceBuffers(src); - ok(hr == S_OK, "FlushSourceBuffers failed: %08x\n", hr); + ok(hr == S_OK, "FlushSourceBuffers failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "Start failed: %08x\n", hr); + ok(hr == S_OK, "Start failed: %08lx\n", hr);
Sleep(100);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); - ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
if(xaudio27){ IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src); @@ -926,14 +926,14 @@ static UINT32 test_DeviceDetails(IXAudio27 *xa) UINT32 count, i;
hr = IXAudio27_GetDeviceCount(xa, &count); - ok(hr == S_OK, "GetDeviceCount failed: %08x\n", hr); + ok(hr == S_OK, "GetDeviceCount failed: %08lx\n", hr);
if(count == 0) return 0;
for(i = 0; i < count; ++i){ hr = IXAudio27_GetDeviceDetails(xa, i, &dd); - ok(hr == S_OK, "GetDeviceDetails failed: %08x\n", hr); + ok(hr == S_OK, "GetDeviceDetails failed: %08lx\n", hr);
if(i == 0) ok(dd.Role == GlobalDefaultDevice, "Got wrong role for index 0: 0x%x\n", dd.Role); @@ -1008,46 +1008,46 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){ hr = pCreateFX(const_clsids[i], &fx_unk); - ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i]), hr); + ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(const_clsids[i]), hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %u\n", rc); + ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %lu\n", rc); }
hr = CoCreateInstance(const_clsids[i], NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&fx_unk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(fx_unk); }
hr = pCreateFX(avm_clsids[version - 20], &fx_unk); - ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr); + ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "AudioVolumeMeter via CreateFX should have been released, got refcount: %u\n", rc); + ok(rc == 0, "AudioVolumeMeter via CreateFX should have been released, got refcount: %lu\n", rc); }
hr = pCreateFX(ar_clsids[version - 20], &fx_unk); - ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr); + ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "AudioReverb via CreateFX should have been released, got refcount: %u\n", rc); + ok(rc == 0, "AudioReverb via CreateFX should have been released, got refcount: %lu\n", rc); }
FreeLibrary(xapofxdll); @@ -1093,65 +1093,65 @@ static void test_xapo_creation_modern(const char *module)
for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){ hr = pCreateFX(const_clsids[i], &fx_unk, NULL, 0); - ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i]), hr); + ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(const_clsids[i]), hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %u\n", rc); + ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %lu\n", rc); }
hr = CoCreateInstance(const_clsids[i], NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&fx_unk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(fx_unk); }
/* test legacy CLSID */ hr = pCreateFX(&CLSID_AudioVolumeMeter27, &fx_unk, NULL, 0); - ok(hr == S_OK, "%s: CreateFX(CLSID_AudioVolumeMeter) failed: %08x\n", module, hr); + ok(hr == S_OK, "%s: CreateFX(CLSID_AudioVolumeMeter) failed: %08lx\n", module, hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "XAPO via legacy CreateFX should have been released, got refcount: %u\n", rc); + ok(rc == 0, "XAPO via legacy CreateFX should have been released, got refcount: %lu\n", rc); }
pCAVM = (void*)GetProcAddress(xaudio2dll, "CreateAudioVolumeMeter"); ok(pCAVM != NULL, "%s did not have CreateAudioVolumeMeter?\n", module);
hr = pCAVM(&fx_unk); - ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr); + ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08lx\n", hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "XAPO via CreateAudioVolumeMeter should have been released, got refcount: %u\n", rc); + ok(rc == 0, "XAPO via CreateAudioVolumeMeter should have been released, got refcount: %lu\n", rc); }
pCAR = (void*)GetProcAddress(xaudio2dll, "CreateAudioReverb"); ok(pCAR != NULL, "%s did not have CreateAudioReverb?\n", module);
hr = pCAR(&fx_unk); - ok(hr == S_OK, "CreateAudioReverb failed: %08x\n", hr); + ok(hr == S_OK, "CreateAudioReverb failed: %08lx\n", hr); if(SUCCEEDED(hr)){ IXAPO *xapo; hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo); - ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr); + ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr); if(SUCCEEDED(hr)) IXAPO_Release(xapo); rc = IUnknown_Release(fx_unk); - ok(rc == 0, "XAPO via CreateAudioReverb should have been released, got refcount: %u\n", rc); + ok(rc == 0, "XAPO via CreateAudioReverb should have been released, got refcount: %lu\n", rc); }
FreeLibrary(xaudio2dll); @@ -1180,7 +1180,7 @@ static void test_setchannelvolumes(IXAudio2 *xa) hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 8, 44100, 0, 0, NULL); else hr = IXAudio2_CreateMasteringVoice(xa, &master, 8, 44100, 0, NULL, NULL, AudioCategory_GameEffects); - ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt_2ch.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; fmt_2ch.nChannels = 2; @@ -1199,32 +1199,32 @@ static void test_setchannelvolumes(IXAudio2 *xa) fmt_8ch.cbSize = 0;
XA2CALL(CreateSourceVoice, &src_2ch, &fmt_2ch, 0, 1.f, NULL, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
XA2CALL(CreateSourceVoice, &src_8ch, &fmt_8ch, 0, 1.f, NULL, NULL, NULL); - ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 2, volumes, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr); + ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 8, volumes, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr); + ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
if(xaudio27){ /* XAudio 2.7 doesn't check the number of channels */ hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 2, volumes, XAUDIO2_COMMIT_NOW); - ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr); + ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr); }else{ /* the number of channels must be the same as the number of channels on the source voice */ hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 2, volumes, XAUDIO2_COMMIT_NOW); - ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 8, volumes, XAUDIO2_COMMIT_NOW); - ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
/* volumes must not be NULL, XAudio 2.7 doesn't check this */ hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 2, NULL, XAUDIO2_COMMIT_NOW); - ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr); + ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr); }
if(xaudio27){ @@ -1281,7 +1281,7 @@ START_TEST(xaudio2) ok(hr != S_OK, "QueryInterface with IID_IXAudio28 on IXAudio27 object returned success. Expected to fail\n");
hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR); - ok(hr == S_OK, "Initialize failed: %08x\n", hr); + ok(hr == S_OK, "Initialize failed: %08lx\n", hr);
has_devices = test_DeviceDetails(xa27); if(has_devices){ @@ -1295,7 +1295,7 @@ START_TEST(xaudio2) skip("No audio devices available\n");
rc = IXAudio27_Release(xa27); - ok(rc == 0, "IXAudio2.7 object should have been released, got refcount %u\n", rc); + ok(rc == 0, "IXAudio2.7 object should have been released, got refcount %lu\n", rc); }else win_skip("XAudio 2.7 not available\n");
@@ -1304,10 +1304,10 @@ START_TEST(xaudio2) xaudio27 = FALSE;
hr = pXAudio2Create(&xa, 0, XAUDIO2_DEFAULT_PROCESSOR); - ok(hr == S_OK, "XAudio2Create failed: %08x\n", hr); + ok(hr == S_OK, "XAudio2Create failed: %08lx\n", hr);
hr = IXAudio2_QueryInterface(xa, &IID_IXAudio27, (void**)&xa27); - ok(hr == E_NOINTERFACE, "XA28 object should support IXAudio27, gave: %08x\n", hr); + ok(hr == E_NOINTERFACE, "XA28 object should support IXAudio27, gave: %08lx\n", hr);
has_devices = check_has_devices(xa); if(has_devices){ @@ -1321,7 +1321,7 @@ START_TEST(xaudio2) skip("No audio devices available\n");
rc = IXAudio2_Release(xa); - ok(rc == 0, "IXAudio2 object should have been released, got refcount %u\n", rc); + ok(rc == 0, "IXAudio2 object should have been released, got refcount %lu\n", rc); }else win_skip("XAudio 2.8 not available\n");