Commit 26bd2ec9 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dsound: Win64 printf format warning fixes.

parent 0f08667c
......@@ -6,7 +6,6 @@ MODULE = dsound.dll
IMPORTLIB = libdsound.$(IMPLIBEXT)
IMPORTS = winmm ole32 user32 advapi32 kernel32 ntdll
EXTRALIBS = -ldxguid -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \
buffer.c \
......
......@@ -119,7 +119,7 @@ const char * dumpCooperativeLevel(DWORD level)
LE(DSSCL_WRITEPRIMARY);
}
#undef LE
sprintf(unknown, "Unknown(%08lx)", level);
sprintf(unknown, "Unknown(%08x)", level);
return unknown;
}
......@@ -285,7 +285,7 @@ static ULONG IDirectSoundImpl_AddRef(
{
IDirectSoundImpl *This = (IDirectSoundImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -294,7 +294,7 @@ static ULONG IDirectSoundImpl_Release(
{
IDirectSoundImpl *This = (IDirectSoundImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
if (This->device)
......@@ -345,7 +345,7 @@ static ULONG WINAPI IDirectSound_IUnknown_AddRef(
{
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -354,7 +354,7 @@ static ULONG WINAPI IDirectSound_IUnknown_Release(
{
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This);
......@@ -423,7 +423,7 @@ static ULONG WINAPI IDirectSound_IDirectSound_AddRef(
{
IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -432,7 +432,7 @@ static ULONG WINAPI IDirectSound_IDirectSound_Release(
{
IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This);
......@@ -503,7 +503,7 @@ static HRESULT WINAPI IDirectSound_IDirectSound_SetSpeakerConfig(
DWORD config)
{
IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface;
TRACE("(%p,0x%08lx)\n",This,config);
TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config);
}
......@@ -584,7 +584,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_AddRef(
{
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -593,7 +593,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_Release(
{
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This);
......@@ -662,7 +662,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound_AddRef(
{
IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -671,7 +671,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound_Release(
{
IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This);
......@@ -742,7 +742,7 @@ static HRESULT WINAPI IDirectSound8_IDirectSound_SetSpeakerConfig(
DWORD config)
{
IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface;
TRACE("(%p,0x%08lx)\n",This,config);
TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config);
}
......@@ -823,7 +823,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound8_AddRef(
{
IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -832,7 +832,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound8_Release(
{
IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This);
......@@ -903,7 +903,7 @@ static HRESULT WINAPI IDirectSound8_IDirectSound8_SetSpeakerConfig(
DWORD config)
{
IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface;
TRACE("(%p,0x%08lx)\n",This,config);
TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config);
}
......@@ -1236,7 +1236,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
static ULONG DirectSoundDevice_AddRef(DirectSoundDevice * device)
{
ULONG ref = InterlockedIncrement(&(device->ref));
TRACE("(%p) ref was %ld\n", device, ref - 1);
TRACE("(%p) ref was %d\n", device, ref - 1);
return ref;
}
......@@ -1244,7 +1244,7 @@ ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
{
HRESULT hr;
ULONG ref = InterlockedDecrement(&(device->ref));
TRACE("(%p) ref was %lu\n", device, ref + 1);
TRACE("(%p) ref was %u\n", device, ref + 1);
if (!ref) {
int i;
timeKillEvent(device->timerID);
......@@ -1314,13 +1314,13 @@ HRESULT DirectSoundDevice_GetCaps(
/* check if there is enough room */
if (lpDSCaps->dwSize < sizeof(*lpDSCaps)) {
WARN("invalid parameter: lpDSCaps->dwSize = %ld\n", lpDSCaps->dwSize);
WARN("invalid parameter: lpDSCaps->dwSize = %d\n", lpDSCaps->dwSize);
return DSERR_INVALIDPARAM;
}
lpDSCaps->dwFlags = device->drvcaps.dwFlags;
if (TRACE_ON(dsound)) {
TRACE("(flags=0x%08lx:\n",lpDSCaps->dwFlags);
TRACE("(flags=0x%08x:\n",lpDSCaps->dwFlags);
_dump_DSCAPS(lpDSCaps->dwFlags);
DPRINTF(")\n");
}
......@@ -1561,11 +1561,11 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
}
if (TRACE_ON(dsound)) {
TRACE("(structsize=%ld)\n",dsbd->dwSize);
TRACE("(flags=0x%08lx:\n",dsbd->dwFlags);
TRACE("(structsize=%d)\n",dsbd->dwSize);
TRACE("(flags=0x%08x:\n",dsbd->dwFlags);
_dump_DSBCAPS(dsbd->dwFlags);
DPRINTF(")\n");
TRACE("(bufferbytes=%ld)\n",dsbd->dwBufferBytes);
TRACE("(bufferbytes=%d)\n",dsbd->dwBufferBytes);
TRACE("(lpwfxFormat=%p)\n",dsbd->lpwfxFormat);
}
......@@ -1598,8 +1598,8 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
return DSERR_INVALIDPARAM;
}
TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
"bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"
"bytespersec=%d,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
dsbd->lpwfxFormat->wFormatTag, dsbd->lpwfxFormat->nChannels,
dsbd->lpwfxFormat->nSamplesPerSec,
dsbd->lpwfxFormat->nAvgBytesPerSec,
......@@ -1741,7 +1741,7 @@ HRESULT DirectSoundDevice_SetSpeakerConfig(
DirectSoundDevice * device,
DWORD config)
{
TRACE("(%p,0x%08lx)\n",device,config);
TRACE("(%p,0x%08x)\n",device,config);
if (device == NULL) {
WARN("not initialized\n");
......
......@@ -449,7 +449,7 @@ static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface)
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -457,7 +457,7 @@ static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
/* static class, won't be freed */
return ref;
}
......@@ -583,7 +583,7 @@ HRESULT WINAPI DllCanUnloadNow(void)
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
int i;
TRACE("(%p %ld %p)\n", hInstDLL, fdwReason, lpvReserved);
TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpvReserved);
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
......
......@@ -57,7 +57,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IUnknown_AddRef(
{
IDirectSoundFullDuplex_IUnknown *This = (IDirectSoundFullDuplex_IUnknown *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -66,7 +66,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IUnknown_Release(
{
IDirectSoundFullDuplex_IUnknown *This = (IDirectSoundFullDuplex_IUnknown *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSound_Release(This->pdsfd->pUnknown);
HeapFree(GetProcessHeap(), 0, This);
......@@ -133,7 +133,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound_AddRef(
{
IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -142,7 +142,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound_Release(
{
IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSound_Release(This->pdsfd->pDS);
HeapFree(GetProcessHeap(), 0, This);
......@@ -213,7 +213,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound_SetSpeakerConfig(
DWORD config)
{
IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface;
TRACE("(%p,0x%08lx)\n",This,config);
TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(This->pdsfd->renderer_device,config);
}
......@@ -298,7 +298,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound8_AddRef(
{
IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -307,7 +307,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound8_Release(
{
IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSound_Release(This->pdsfd->pDS8);
HeapFree(GetProcessHeap(), 0, This);
......@@ -378,7 +378,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_SetSpeakerConfig(
DWORD config)
{
IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface;
TRACE("(%p,0x%08lx)\n",This,config);
TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(This->pdsfd->renderer_device,config);
}
......@@ -463,7 +463,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_AddRef(
{
IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -472,7 +472,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_Release(
{
IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1);
TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) {
IDirectSoundCapture_Release(This->pdsfd->pDSC);
HeapFree(GetProcessHeap(), 0, This);
......@@ -567,7 +567,7 @@ IDirectSoundFullDuplexImpl_AddRef( LPDIRECTSOUNDFULLDUPLEX iface )
{
IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
return ref;
}
......@@ -649,7 +649,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface )
{
IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1);
TRACE("(%p) ref was %d\n", This, ref - 1);
if (!ref) {
if (This->capture_device)
......@@ -678,7 +678,7 @@ IDirectSoundFullDuplexImpl_Initialize(
IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface;
IDirectSoundBufferImpl * dsb;
TRACE("(%p,%s,%s,%p,%p,%lx,%lx,%p,%p)\n", This,
TRACE("(%p,%s,%s,%p,%p,%x,%x,%p,%p)\n", This,
debugstr_guid(pCaptureGuid), debugstr_guid(pRendererGuid),
lpDscBufferDesc, lpDsBufferDesc, (DWORD)hWnd, dwLevel,
lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8);
......@@ -837,7 +837,7 @@ DirectSoundFullDuplexCreate(
{
HRESULT hres;
IDirectSoundFullDuplexImpl *This = NULL;
TRACE("(%s,%s,%p,%p,%p,%lx,%p,%p,%p,%p)\n",
TRACE("(%s,%s,%p,%p,%p,%x,%p,%p,%p,%p)\n",
debugstr_guid(pcGuidCaptureDevice), debugstr_guid(pcGuidRenderDevice),
pcDSCBufferDesc, pcDSBufferDesc, hWnd, dwLevel, ppDSFD, ppDSCBuffer8,
ppDSBuffer8, pUnkOuter);
......
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