From 7025f5ca6767b820f7a17d564cbbc615da2796f0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 3 Aug 2011 12:06:19 -0700 Subject: [PATCH] Add a LONGFMT macro to propery handle LONG-based types Wine uses int for LONG-based types due to long being 64 bits on 64-bit targets, while Windows uses a genuine long where it is still 32 bits on 64-bit targets. --- CMakeLists.txt | 6 --- buffer.c | 112 +++++++++++++++++++++++++++---------------------------- capture.c | 38 +++++++++---------- dsound8.c | 22 +++++------ dsound_main.c | 6 +-- dsound_private.h | 2 + duplex.c | 24 ++++++------ primary.c | 68 ++++++++++++++++----------------- propset.c | 26 ++++++------- 9 files changed, 150 insertions(+), 154 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7b3502..b3ee9a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,12 +43,6 @@ if(NOT MSVC) if(HAVE_W_EXTRA) add_definitions(-Wextra) endif() - if(WIN32) - check_c_compiler_flag(-Wformat=0 HAVE_W_FORMAT_ZERO) - if(HAVE_W_FORMAT_ZERO) - add_definitions(-Wformat=0) - endif() - endif() endif() check_include_file(dsound.h HAVE_DSOUND_H) diff --git a/buffer.c b/buffer.c index 54d467b..15ba2b2 100644 --- a/buffer.c +++ b/buffer.c @@ -135,7 +135,7 @@ static void DS8Buffer_starttimer(DS8Primary *prim) triggertime = 1000 / refresh / 2; if(triggertime < time.wPeriodMin) triggertime = time.wPeriodMin; - TRACE("Calling timer every %u ms for %i refreshes per second\n", triggertime, refresh); + TRACE("Calling timer every %"LONGFMT"u ms for %i refreshes per second\n", triggertime, refresh); if (res < time.wPeriodMin) res = time.wPeriodMin; @@ -441,7 +441,7 @@ static const char *get_fmtstr_EXT(const DS8Primary *prim, const WAVEFORMATEX *fo } } - FIXME("Could not get OpenAL PCM format (%d-bit, channelmask %#x)\n", + FIXME("Could not get OpenAL PCM format (%d-bit, channelmask %#"LONGFMT"x)\n", out->Samples.wValidBitsPerSample, out->dwChannelMask); return NULL; } @@ -467,7 +467,7 @@ static const char *get_fmtstr_EXT(const DS8Primary *prim, const WAVEFORMATEX *fo return NULL; } - FIXME("Could not get OpenAL float format (%d-bit, channelmask %#x)\n", + FIXME("Could not get OpenAL float format (%d-bit, channelmask %#"LONGFMT"x)\n", out->Samples.wValidBitsPerSample, out->dwChannelMask); return NULL; } @@ -577,7 +577,7 @@ static ALenum get_fmt_EXT(const WAVEFORMATEX *format, WAVEFORMATEXTENSIBLE *out, } } - FIXME("Could not get OpenAL PCM format (%d-bit, channelmask %#x)\n", + FIXME("Could not get OpenAL PCM format (%d-bit, channelmask %#"LONGFMT"x)\n", out->Samples.wValidBitsPerSample, out->dwChannelMask); return AL_NONE; } @@ -633,7 +633,7 @@ static ALenum get_fmt_EXT(const WAVEFORMATEX *format, WAVEFORMATEXTENSIBLE *out, return AL_NONE; } - FIXME("Could not get OpenAL float format (%d-bit, channelmask %#x)\n", + FIXME("Could not get OpenAL float format (%d-bit, channelmask %#"LONGFMT"x)\n", out->Samples.wValidBitsPerSample, out->dwChannelMask); return AL_NONE; } @@ -653,8 +653,8 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar TRACE("Requested buffer format:\n" " FormatTag = 0x%04x\n" " Channels = %d\n" - " SamplesPerSec = %u\n" - " AvgBytesPerSec = %u\n" + " SamplesPerSec = %"LONGFMT"u\n" + " AvgBytesPerSec = %"LONGFMT"u\n" " BlockAlign = %d\n" " BitsPerSample = %d\n", format->wFormatTag, format->nChannels, @@ -701,7 +701,7 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar if(!prim->SupportedExt[SOFT_BUFFER_SAMPLES]) { - const char *fmt_str; + const char *fmt_str = NULL; if(!(pBuffer->dsbflags&DSBCAPS_STATIC) && !prim->SupportedExt[SOFT_BUFFER_SUB_DATA] && !prim->SupportedExt[EXT_STATIC_BUFFER]) @@ -745,7 +745,7 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar wfe = CONTAINING_RECORD(format, const WAVEFORMATEXTENSIBLE, Format); TRACE("Extensible values:\n" " Samples = %d\n" - " ChannelMask = 0x%x\n" + " ChannelMask = 0x%"LONGFMT"x\n" " SubFormat = %s\n", wfe->Samples.wReserved, wfe->dwChannelMask, debugstr_guid(&wfe->SubFormat)); @@ -785,7 +785,7 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar wfe = CONTAINING_RECORD(format, const WAVEFORMATEXTENSIBLE, Format); TRACE("Extensible values:\n" " Samples = %d\n" - " ChannelMask = 0x%x\n" + " ChannelMask = 0x%"LONGFMT"x\n" " SubFormat = %s\n", wfe->Samples.wReserved, wfe->dwChannelMask, debugstr_guid(&wfe->SubFormat)); @@ -1007,7 +1007,7 @@ static ULONG WINAPI DS8Buffer_AddRef(IDirectSoundBuffer8 *iface) InterlockedIncrement(&This->all_ref); ret = InterlockedIncrement(&This->ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -1018,7 +1018,7 @@ static ULONG WINAPI DS8Buffer_Release(IDirectSoundBuffer8 *iface) LONG ret; ret = InterlockedDecrement(&This->ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); if(InterlockedDecrement(&This->all_ref) == 0) DS8Buffer_Destroy(This); @@ -1033,7 +1033,7 @@ static HRESULT WINAPI DS8Buffer_GetCaps(IDirectSoundBuffer8 *iface, DSBCAPS *cap if(!caps || caps->dwSize < sizeof(*caps)) { - WARN("Invalid DSBCAPS (%p, %u)\n", caps, (caps ? caps->dwSize : 0)); + WARN("Invalid DSBCAPS (%p, %"LONGFMT"u)\n", caps, (caps ? caps->dwSize : 0)); return DSERR_INVALIDPARAM; } @@ -1122,7 +1122,7 @@ static HRESULT WINAPI DS8Buffer_GetFormat(IDirectSoundBuffer8 *iface, WAVEFORMAT HRESULT hr = S_OK; UINT size; - TRACE("(%p)->(%p, %u, %p)\n", iface, wfx, allocated, written); + TRACE("(%p)->(%p, %"LONGFMT"u, %p)\n", iface, wfx, allocated, written); if(!wfx && !written) { @@ -1437,7 +1437,7 @@ static HRESULT WINAPI DS8Buffer_Lock(IDirectSoundBuffer8 *iface, DWORD ofs, DWOR DS8Buffer *This = impl_from_IDirectSoundBuffer8(iface); DWORD remain; - TRACE("(%p)->(%u, %u, %p, %p, %p, %p, 0x%x)\n", This, ofs, bytes, ptr1, len1, ptr2, len2, flags); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u, %p, %p, %p, %p, 0x%"LONGFMT"x)\n", This, ofs, bytes, ptr1, len1, ptr2, len2, flags); if(!ptr1 || !len1) { @@ -1454,14 +1454,14 @@ static HRESULT WINAPI DS8Buffer_Lock(IDirectSoundBuffer8 *iface, DWORD ofs, DWOR DS8Buffer_GetCurrentPosition(iface, NULL, &ofs); else if(ofs >= This->buffer->buf_size) { - WARN("Invalid ofs %u\n", ofs); + WARN("Invalid ofs %"LONGFMT"u\n", ofs); return DSERR_INVALIDPARAM; } if((flags&DSBLOCK_ENTIREBUFFER)) bytes = This->buffer->buf_size; else if(bytes > This->buffer->buf_size) { - WARN("Invalid size %u\n", bytes); + WARN("Invalid size %"LONGFMT"u\n", bytes); return DSERR_INVALIDPARAM; } @@ -1523,7 +1523,7 @@ static HRESULT WINAPI DS8Buffer_Play(IDirectSoundBuffer8 *iface, DWORD res1, DWO } else if(prio) { - ERR("Invalid priority set for non-deferred buffer %p, %u!\n", This->buffer, prio); + ERR("Invalid priority set for non-deferred buffer %p, %"LONGFMT"u!\n", This->buffer, prio); hr = DSERR_INVALIDPARAM; goto out; } @@ -1629,11 +1629,11 @@ static HRESULT WINAPI DS8Buffer_SetVolume(IDirectSoundBuffer8 *iface, LONG vol) DS8Buffer *This = impl_from_IDirectSoundBuffer8(iface); HRESULT hr = S_OK; - TRACE("(%p)->(%d)\n", iface, vol); + TRACE("(%p)->(%"LONGFMT"d)\n", iface, vol); if(vol > DSBVOLUME_MAX || vol < DSBVOLUME_MIN) { - WARN("Invalid volume (%d)\n", vol); + WARN("Invalid volume (%"LONGFMT"d)\n", vol); return DSERR_INVALIDPARAM; } @@ -1655,11 +1655,11 @@ static HRESULT WINAPI DS8Buffer_SetPan(IDirectSoundBuffer8 *iface, LONG pan) DS8Buffer *This = impl_from_IDirectSoundBuffer8(iface); HRESULT hr = S_OK; - TRACE("(%p)->(%d)\n", iface, pan); + TRACE("(%p)->(%"LONGFMT"d)\n", iface, pan); if(pan > DSBPAN_RIGHT || pan < DSBPAN_LEFT) { - WARN("invalid parameter: pan = %d\n", pan); + WARN("invalid parameter: pan = %"LONGFMT"d\n", pan); return DSERR_INVALIDPARAM; } @@ -1692,11 +1692,11 @@ static HRESULT WINAPI DS8Buffer_SetFrequency(IDirectSoundBuffer8 *iface, DWORD f DS8Buffer *This = impl_from_IDirectSoundBuffer8(iface); HRESULT hr = S_OK; - TRACE("(%p)->(%u)\n", iface, freq); + TRACE("(%p)->(%"LONGFMT"u)\n", iface, freq); if(freq < DSBFREQUENCY_MIN || freq > DSBFREQUENCY_MAX) { - WARN("invalid parameter: freq = %d\n", freq); + WARN("invalid parameter: freq = %"LONGFMT"u\n", freq); return DSERR_INVALIDPARAM; } @@ -1758,7 +1758,7 @@ static HRESULT WINAPI DS8Buffer_Unlock(IDirectSoundBuffer8 *iface, void *ptr1, D DWORD_PTR boundary = (DWORD_PTR)buf->data; HRESULT hr; - TRACE("(%p)->(%p, %u, %p, %u)\n", iface, ptr1, len1, ptr2, len2); + TRACE("(%p)->(%p, %"LONGFMT"u, %p, %"LONGFMT"u)\n", iface, ptr1, len1, ptr2, len2); if(InterlockedExchange(&This->buffer->locked, FALSE) == FALSE) { @@ -1831,7 +1831,7 @@ static HRESULT WINAPI DS8Buffer_Unlock(IDirectSoundBuffer8 *iface, void *ptr1, D out: if(hr != S_OK) - WARN("Invalid parameters (0x%lx,%u) (%p,%u,%p,%u)\n", boundary, bufsize, ptr1, len1, ptr2, len2); + WARN("Invalid parameters (0x%lx,%"LONGFMT"u) (%p,%"LONGFMT"u,%p,%"LONGFMT"u)\n", boundary, bufsize, ptr1, len1, ptr2, len2); return hr; } @@ -1861,7 +1861,7 @@ static HRESULT WINAPI DS8Buffer_SetFX(IDirectSoundBuffer8 *iface, DWORD fxcount, DS8Buffer *This = impl_from_IDirectSoundBuffer8(iface); DWORD i; - TRACE("(%p)->(%u, %p, %p)\n", This, fxcount, desc, rescodes); + TRACE("(%p)->(%"LONGFMT"u, %p, %p)\n", This, fxcount, desc, rescodes); if(!(This->buffer->dsbflags&DSBCAPS_CTRLFX)) { @@ -1901,7 +1901,7 @@ static HRESULT WINAPI DS8Buffer_AcquireResources(IDirectSoundBuffer8 *iface, DWO { DS8Buffer *This = impl_from_IDirectSoundBuffer8(iface); - TRACE("(%p)->(%u, %u, %p)\n", This, flags, fxcount, rescodes); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u, %p)\n", This, flags, fxcount, rescodes); /* effects aren't supported at the moment.. */ if(fxcount != 0 || rescodes) @@ -1926,7 +1926,7 @@ static HRESULT WINAPI DS8Buffer_AcquireResources(IDirectSoundBuffer8 *iface, DWO static HRESULT WINAPI DS8Buffer_GetObjectInPath(IDirectSoundBuffer8 *iface, REFGUID guid, DWORD idx, REFGUID rguidiface, void **ppv) { - FIXME("(%p)->(%s, %u, %s, %p) : stub!\n", iface, debugstr_guid(guid), idx, debugstr_guid(rguidiface), ppv); + FIXME("(%p)->(%s, %"LONGFMT"u, %s, %p) : stub!\n", iface, debugstr_guid(guid), idx, debugstr_guid(rguidiface), ppv); return E_NOTIMPL; } @@ -2122,7 +2122,7 @@ static ULONG WINAPI DS8Buffer3D_AddRef(IDirectSound3DBuffer *iface) InterlockedIncrement(&This->all_ref); ret = InterlockedIncrement(&This->ds3d_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -2133,7 +2133,7 @@ static ULONG WINAPI DS8Buffer3D_Release(IDirectSound3DBuffer *iface) LONG ret; ret = InterlockedDecrement(&This->ds3d_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); if(InterlockedDecrement(&This->all_ref) == 0) DS8Buffer_Destroy(This); @@ -2150,7 +2150,7 @@ static HRESULT WINAPI DS8Buffer3D_GetAllParameters(IDirectSound3DBuffer *iface, if(!ds3dbuffer || ds3dbuffer->dwSize < sizeof(*ds3dbuffer)) { - WARN("Invalid parameters %p %u\n", ds3dbuffer, ds3dbuffer ? ds3dbuffer->dwSize : 0); + WARN("Invalid parameters %p %"LONGFMT"u\n", ds3dbuffer, ds3dbuffer ? ds3dbuffer->dwSize : 0); return DSERR_INVALIDPARAM; } ds3dbuf.dwSize = sizeof(ds3dbuf); @@ -2386,26 +2386,26 @@ static HRESULT WINAPI DS8Buffer3D_GetVelocity(IDirectSound3DBuffer *iface, D3DVE static HRESULT WINAPI DS8Buffer3D_SetAllParameters(IDirectSound3DBuffer *iface, const DS3DBUFFER *ds3dbuffer, DWORD apply) { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%p, %u)\n", This, ds3dbuffer, apply); + TRACE("(%p)->(%p, %"LONGFMT"u)\n", This, ds3dbuffer, apply); if(!ds3dbuffer || ds3dbuffer->dwSize < sizeof(*ds3dbuffer)) { - WARN("Invalid DS3DBUFFER (%p, %u)\n", ds3dbuffer, ds3dbuffer ? ds3dbuffer->dwSize : 0); + WARN("Invalid DS3DBUFFER (%p, %"LONGFMT"u)\n", ds3dbuffer, ds3dbuffer ? ds3dbuffer->dwSize : 0); return DSERR_INVALIDPARAM; } if(ds3dbuffer->dwInsideConeAngle > DS3D_MAXCONEANGLE || ds3dbuffer->dwOutsideConeAngle > DS3D_MAXCONEANGLE) { - WARN("Invalid cone angles (%u, %u)\n", ds3dbuffer->dwInsideConeAngle, - ds3dbuffer->dwOutsideConeAngle); + WARN("Invalid cone angles (%"LONGFMT"u, %"LONGFMT"u)\n", ds3dbuffer->dwInsideConeAngle, + ds3dbuffer->dwOutsideConeAngle); return DSERR_INVALIDPARAM; } if(ds3dbuffer->lConeOutsideVolume > DSBVOLUME_MAX || ds3dbuffer->lConeOutsideVolume < DSBVOLUME_MIN) { - WARN("Invalid cone outside volume (%d)\n", ds3dbuffer->lConeOutsideVolume); + WARN("Invalid cone outside volume (%"LONGFMT"d)\n", ds3dbuffer->lConeOutsideVolume); return DSERR_INVALIDPARAM; } @@ -2425,7 +2425,7 @@ static HRESULT WINAPI DS8Buffer3D_SetAllParameters(IDirectSound3DBuffer *iface, ds3dbuffer->dwMode != DS3DMODE_HEADRELATIVE && ds3dbuffer->dwMode != DS3DMODE_DISABLE) { - WARN("Invalid mode (%u)\n", ds3dbuffer->dwMode); + WARN("Invalid mode (%"LONGFMT"u)\n", ds3dbuffer->dwMode); return DSERR_INVALIDPARAM; } @@ -2449,11 +2449,11 @@ static HRESULT WINAPI DS8Buffer3D_SetConeAngles(IDirectSound3DBuffer *iface, DWO { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%u, %u, %u)\n", This, dwInsideConeAngle, dwOutsideConeAngle, apply); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u, %"LONGFMT"u)\n", This, dwInsideConeAngle, dwOutsideConeAngle, apply); if(dwInsideConeAngle > DS3D_MAXCONEANGLE || dwOutsideConeAngle > DS3D_MAXCONEANGLE) { - WARN("Invalid cone angles (%u, %u)\n", dwInsideConeAngle, dwOutsideConeAngle); + WARN("Invalid cone angles (%"LONGFMT"u, %"LONGFMT"u)\n", dwInsideConeAngle, dwOutsideConeAngle); return DSERR_INVALIDPARAM; } @@ -2481,7 +2481,7 @@ static HRESULT WINAPI DS8Buffer3D_SetConeOrientation(IDirectSound3DBuffer *iface { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%f, %f, %f, %u)\n", This, x, y, z, apply); + TRACE("(%p)->(%f, %f, %f, %"LONGFMT"u)\n", This, x, y, z, apply); EnterCriticalSection(This->crst); if(apply == DS3D_DEFERRED) @@ -2507,10 +2507,10 @@ static HRESULT WINAPI DS8Buffer3D_SetConeOutsideVolume(IDirectSound3DBuffer *ifa { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%u, %u)\n", This, vol, apply); + TRACE("(%p)->(%"LONGFMT"d, %"LONGFMT"u)\n", This, vol, apply); if(vol < DSBVOLUME_MIN || vol > DSBVOLUME_MAX) { - WARN("Invalid volume (%u)\n", vol); + WARN("Invalid volume (%"LONGFMT"d)\n", vol); return DSERR_INVALIDPARAM; } @@ -2536,7 +2536,7 @@ static HRESULT WINAPI DS8Buffer3D_SetMaxDistance(IDirectSound3DBuffer *iface, D3 { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%f, %u)\n", This, maxdist, apply); + TRACE("(%p)->(%f, %"LONGFMT"u)\n", This, maxdist, apply); if(maxdist < 0.0f) { WARN("Invalid max distance (%f)\n", maxdist); @@ -2565,7 +2565,7 @@ static HRESULT WINAPI DS8Buffer3D_SetMinDistance(IDirectSound3DBuffer *iface, D3 { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%f, %u)\n", This, mindist, apply); + TRACE("(%p)->(%f, %"LONGFMT"u)\n", This, mindist, apply); if(mindist < 0.0f) { WARN("Invalid min distance (%f)\n", mindist); @@ -2594,11 +2594,11 @@ static HRESULT WINAPI DS8Buffer3D_SetMode(IDirectSound3DBuffer *iface, DWORD mod { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%u, %u)\n", This, mode, apply); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u)\n", This, mode, apply); if(mode != DS3DMODE_NORMAL && mode != DS3DMODE_HEADRELATIVE && mode != DS3DMODE_DISABLE) { - WARN("Invalid mode (%u)\n", mode); + WARN("Invalid mode (%"LONGFMT"u)\n", mode); return DSERR_INVALIDPARAM; } @@ -2628,7 +2628,7 @@ static HRESULT WINAPI DS8Buffer3D_SetPosition(IDirectSound3DBuffer *iface, D3DVA { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%f, %f, %f, %u)\n", This, x, y, z, apply); + TRACE("(%p)->(%f, %f, %f, %"LONGFMT"u)\n", This, x, y, z, apply); EnterCriticalSection(This->crst); if(apply == DS3D_DEFERRED) @@ -2654,7 +2654,7 @@ static HRESULT WINAPI DS8Buffer3D_SetVelocity(IDirectSound3DBuffer *iface, D3DVA { DS8Buffer *This = impl_from_IDirectSound3DBuffer(iface); - TRACE("(%p)->(%f, %f, %f, %u)\n", This, x, y, z, apply); + TRACE("(%p)->(%f, %f, %f, %"LONGFMT"u)\n", This, x, y, z, apply); EnterCriticalSection(This->crst); if(apply == DS3D_DEFERRED) @@ -2715,7 +2715,7 @@ static ULONG WINAPI DS8BufferNot_AddRef(IDirectSoundNotify *iface) InterlockedIncrement(&This->all_ref); ret = InterlockedIncrement(&This->not_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -2726,7 +2726,7 @@ static ULONG WINAPI DS8BufferNot_Release(IDirectSoundNotify *iface) LONG ret; ret = InterlockedDecrement(&This->not_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); if(InterlockedDecrement(&This->all_ref) == 0) DS8Buffer_Destroy(This); @@ -2812,7 +2812,7 @@ static ULONG WINAPI DS8BufferProp_AddRef(IKsPropertySet *iface) InterlockedIncrement(&This->all_ref); ret = InterlockedIncrement(&This->prop_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -2823,7 +2823,7 @@ static ULONG WINAPI DS8BufferProp_Release(IKsPropertySet *iface) LONG ret; ret = InterlockedDecrement(&This->prop_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); if(InterlockedDecrement(&This->all_ref) == 0) DS8Buffer_Destroy(This); @@ -2841,7 +2841,7 @@ static HRESULT WINAPI DS8BufferProp_Get(IKsPropertySet *iface, DS8Buffer *This = impl_from_IKsPropertySet(iface); HRESULT hr = E_PROP_ID_UNSUPPORTED; - TRACE("(%p)->(%s, %u, %p, %u, %p, %u, %p)\n", iface, debugstr_guid(guidPropSet), + TRACE("(%p)->(%s, %"LONGFMT"u, %p, %"LONGFMT"u, %p, %"LONGFMT"u, %p)\n", iface, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData, pcbReturned); if(!pcbReturned) @@ -2872,7 +2872,7 @@ static HRESULT WINAPI DS8BufferProp_Set(IKsPropertySet *iface, DS8Buffer *This = impl_from_IKsPropertySet(iface); HRESULT hr = E_PROP_ID_UNSUPPORTED; - TRACE("(%p)->(%s, %u, %p, %u, %p, %u)\n", iface, debugstr_guid(guidPropSet), + TRACE("(%p)->(%s, %"LONGFMT"u, %p, %"LONGFMT"u, %p, %"LONGFMT"u)\n", iface, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData); #if 0 @@ -2898,7 +2898,7 @@ static HRESULT WINAPI DS8BufferProp_QuerySupport(IKsPropertySet *iface, DS8Buffer *This = impl_from_IKsPropertySet(iface); HRESULT hr = E_PROP_ID_UNSUPPORTED; - TRACE("(%p)->(%s, %u, %p)\n", iface, debugstr_guid(guidPropSet), dwPropID, pTypeSupport); + TRACE("(%p)->(%s, %"LONGFMT"u, %p)\n", iface, debugstr_guid(guidPropSet), dwPropID, pTypeSupport); if(!pTypeSupport) return E_POINTER; diff --git a/capture.c b/capture.c index 294dc7a..34cf942 100644 --- a/capture.c +++ b/capture.c @@ -185,7 +185,7 @@ static void CALLBACK DSCBuffer_timer(UINT timerID, UINT msg, DWORD_PTR dwUser, avail *= buf->format->nBlockAlign; if ((ALCuint)avail >= buf->buf_size) { - ERR("TOO MUCH AVAIL: %u/%u\n", avail, buf->buf_size); + ERR("TOO MUCH AVAIL: %u/%"LONGFMT"u\n", avail, buf->buf_size); avail = buf->buf_size; } @@ -217,7 +217,7 @@ static void DSCBuffer_starttimer(DSCImpl *prim) triggertime = 1000 / refresh; if (triggertime < time.wPeriodMin) triggertime = time.wPeriodMin; - TRACE("Calling timer every %u ms for %i refreshes per second\n", triggertime, refresh); + TRACE("Calling timer every %"LONGFMT"u ms for %i refreshes per second\n", triggertime, refresh); if (res < time.wPeriodMin) res = time.wPeriodMin; if (timeBeginPeriod(res) == TIMERR_NOCANDO) @@ -277,7 +277,7 @@ static ULONG WINAPI DSCBuffer_AddRef(IDirectSoundCaptureBuffer8 *iface) InterlockedIncrement(&This->all_ref); ref = InterlockedIncrement(&This->ref); - TRACE("Reference count incremented to %i\n", ref); + TRACE("Reference count incremented to %"LONGFMT"i\n", ref); return ref; } @@ -288,7 +288,7 @@ static ULONG WINAPI DSCBuffer_Release(IDirectSoundCaptureBuffer8 *iface) LONG ref; ref = InterlockedDecrement(&This->ref); - TRACE("Reference count decremented to %i\n", ref); + TRACE("Reference count decremented to %"LONGFMT"i\n", ref); if(InterlockedDecrement(&This->all_ref) == 0) DSCBuffer_Destroy(This); @@ -337,7 +337,7 @@ static HRESULT WINAPI DSCBuffer_GetCurrentPosition(IDirectSoundCaptureBuffer8 *i static HRESULT WINAPI DSCBuffer_GetFormat(IDirectSoundCaptureBuffer8 *iface, WAVEFORMATEX *wfx, DWORD size, DWORD *written) { DSCBuffer *This = impl_from_IDirectSoundCaptureBuffer8(iface); - TRACE("(%p,%p,%u,%p)\n", This, wfx, size, written); + TRACE("(%p,%p,%"LONGFMT"u,%p)\n", This, wfx, size, written); if (size > sizeof(WAVEFORMATEX) + This->format->cbSize) size = sizeof(WAVEFORMATEX) + This->format->cbSize; @@ -459,7 +459,7 @@ static HRESULT WINAPI DSCBuffer_Initialize(IDirectSoundCaptureBuffer8 *iface, ID This->dev = alcCaptureOpenDevice(This->parent->device, This->format->nSamplesPerSec, buf_format, This->buf_size / This->format->nBlockAlign); if (!This->dev) { - ERR("couldn't open device %s %x@%u, reason: %04x\n", This->parent->device, buf_format, This->format->nSamplesPerSec, alcGetError(NULL)); + ERR("couldn't open device %s %x@%"LONGFMT"u, reason: %04x\n", This->parent->device, buf_format, This->format->nSamplesPerSec, alcGetError(NULL)); return DSERR_INVALIDPARAM; } @@ -479,7 +479,7 @@ static HRESULT WINAPI DSCBuffer_Lock(IDirectSoundCaptureBuffer8 *iface, DWORD of DSCBuffer *This = impl_from_IDirectSoundCaptureBuffer8(iface); HRESULT hr; DWORD remain; - TRACE("(%p)->(%u, %u, %p, %p, %p, %p, %#x)\n", This, ofs, bytes, ptr1, len1, ptr2, len2, flags); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u, %p, %p, %p, %p, %#"LONGFMT"x)\n", This, ofs, bytes, ptr1, len1, ptr2, len2, flags); EnterCriticalSection(&This->parent->crst); hr = DSERR_INVALIDPARAM; @@ -491,7 +491,7 @@ static HRESULT WINAPI DSCBuffer_Lock(IDirectSoundCaptureBuffer8 *iface, DWORD of if (ofs >= This->buf_size) { - WARN("Invalid ofs %u\n", ofs); + WARN("Invalid ofs %"LONGFMT"u\n", ofs); goto out; } if (!ptr1 || !len1) @@ -503,7 +503,7 @@ static HRESULT WINAPI DSCBuffer_Lock(IDirectSoundCaptureBuffer8 *iface, DWORD of bytes = This->buf_size; else if(bytes > This->buf_size) { - WARN("Invalid size %u\n", bytes); + WARN("Invalid size %"LONGFMT"u\n", bytes); goto out; } @@ -534,7 +534,7 @@ out: static HRESULT WINAPI DSCBuffer_Start(IDirectSoundCaptureBuffer8 *iface, DWORD flags) { DSCBuffer *This = impl_from_IDirectSoundCaptureBuffer8(iface); - TRACE("(%p)->(%08x)\n", This, flags); + TRACE("(%p)->(%08"LONGFMT"x)\n", This, flags); EnterCriticalSection(&This->parent->crst); if (!This->playing) @@ -574,7 +574,7 @@ static HRESULT WINAPI DSCBuffer_Stop(IDirectSoundCaptureBuffer8 *iface) static HRESULT WINAPI DSCBuffer_Unlock(IDirectSoundCaptureBuffer8 *iface, void *ptr1, DWORD len1, void *ptr2, DWORD len2) { DSCBuffer *This = impl_from_IDirectSoundCaptureBuffer8(iface); - TRACE("(%p)->(%p,%u,%p,%u)\n", This, ptr1, len1, ptr2, len2); + TRACE("(%p)->(%p,%"LONGFMT"u,%p,%"LONGFMT"u)\n", This, ptr1, len1, ptr2, len2); if (!ptr1) return DSERR_INVALIDPARAM; @@ -584,14 +584,14 @@ static HRESULT WINAPI DSCBuffer_Unlock(IDirectSoundCaptureBuffer8 *iface, void * static HRESULT WINAPI DSCBuffer_GetObjectInPath(IDirectSoundCaptureBuffer8 *iface, REFGUID guid, DWORD num, REFGUID riid, void **ppv) { DSCBuffer *This = impl_from_IDirectSoundCaptureBuffer8(iface); - FIXME("(%p)->(%s %u %s %p) stub\n", This, debugstr_guid(guid), num, debugstr_guid(riid), ppv); + FIXME("(%p)->(%s %"LONGFMT"u %s %p) stub\n", This, debugstr_guid(guid), num, debugstr_guid(riid), ppv); return E_NOTIMPL; } static HRESULT WINAPI DSCBuffer_GetFXStatus(IDirectSoundCaptureBuffer8 *iface, DWORD count, DWORD *status) { DSCBuffer *This = impl_from_IDirectSoundCaptureBuffer8(iface); - FIXME("(%p)->(%u %p) stub\n", This, count, status); + FIXME("(%p)->(%"LONGFMT"u %p) stub\n", This, count, status); return E_NOTIMPL; } @@ -631,7 +631,7 @@ static ULONG WINAPI DSCBufferNot_AddRef(IDirectSoundNotify *iface) InterlockedIncrement(&This->all_ref); ret = InterlockedIncrement(&This->not_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -641,7 +641,7 @@ static ULONG WINAPI DSCBufferNot_Release(IDirectSoundNotify *iface) LONG ret; ret = InterlockedDecrement(&This->not_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); if(InterlockedDecrement(&This->all_ref) == 0) DSCBuffer_Destroy(This); @@ -770,7 +770,7 @@ static ULONG WINAPI DSCImpl_AddRef(IDirectSoundCapture8 *iface) LONG ref; ref = InterlockedIncrement(&This->ref); - TRACE("Reference count incremented to %i\n", ref); + TRACE("Reference count incremented to %"LONGFMT"i\n", ref); return ref; } @@ -781,7 +781,7 @@ static ULONG WINAPI DSCImpl_Release(IDirectSoundCapture8 *iface) LONG ref; ref = InterlockedDecrement(&This->ref); - TRACE("Reference count decremented to %i\n", ref); + TRACE("Reference count decremented to %"LONGFMT"i\n", ref); if(!ref) DSCImpl_Destroy(This); @@ -802,7 +802,7 @@ static HRESULT WINAPI DSCImpl_CreateCaptureBuffer(IDirectSoundCapture8 *iface, c if (!desc || desc->dwSize < sizeof(DSCBUFFERDESC1)) { - WARN("Passed invalid description %p %u\n", desc, desc?desc->dwSize:0); + WARN("Passed invalid description %p %"LONGFMT"u\n", desc, desc?desc->dwSize:0); return DSERR_INVALIDPARAM; } if (!ppv) @@ -858,7 +858,7 @@ static HRESULT WINAPI DSCImpl_GetCaps(IDirectSoundCapture8 *iface, DSCCAPS *caps } if (caps->dwSize < sizeof(*caps)) { - WARN("Invalid size %d\n", caps->dwSize); + WARN("Invalid size %"LONGFMT"d\n", caps->dwSize); return DSERR_INVALIDPARAM; } diff --git a/dsound8.c b/dsound8.c index cca689e..fd1b932 100644 --- a/dsound8.c +++ b/dsound8.c @@ -242,7 +242,7 @@ static ULONG WINAPI DS8_AddRef(IDirectSound8 *iface) LONG ref; ref = InterlockedIncrement(&This->ref); - TRACE("Reference count incremented to %d\n", ref); + TRACE("Reference count incremented to %"LONGFMT"d\n", ref); return ref; } @@ -253,7 +253,7 @@ static ULONG WINAPI DS8_Release(IDirectSound8 *iface) LONG ref; ref = InterlockedDecrement(&This->ref); - TRACE("Reference count decremented to %d\n", ref); + TRACE("Reference count decremented to %"LONGFMT"d\n", ref); if(ref == 0) DS8Impl_Destroy(This); @@ -281,7 +281,7 @@ static HRESULT WINAPI DS8_CreateSoundBuffer(IDirectSound8 *iface, LPCDSBUFFERDES } if(!desc || desc->dwSize < sizeof(DSBUFFERDESC1)) { - WARN("Invalid buffer %p/%u\n", desc, desc?desc->dwSize:0); + WARN("Invalid buffer %p/%"LONGFMT"u\n", desc, desc?desc->dwSize:0); return DSERR_INVALIDPARAM; } @@ -358,7 +358,7 @@ static HRESULT WINAPI DS8_CreateSoundBuffer(IDirectSound8 *iface, LPCDSBUFFERDES } LeaveCriticalSection(&This->primary->crst); - TRACE("%08x\n", hr); + TRACE("%08"LONGFMT"x\n", hr); return hr; } @@ -377,7 +377,7 @@ static HRESULT WINAPI DS8_GetCaps(IDirectSound8 *iface, LPDSCAPS caps) if(!caps || caps->dwSize < sizeof(*caps)) { - WARN("Invalid DSCAPS (%p, %u)\n", caps, (caps?caps->dwSize:0)); + WARN("Invalid DSCAPS (%p, %"LONGFMT"u)\n", caps, (caps?caps->dwSize:0)); return DSERR_INVALIDPARAM; } @@ -518,7 +518,7 @@ static HRESULT WINAPI DS8_SetCooperativeLevel(IDirectSound8 *iface, HWND hwnd, D DS8Impl *This = impl_from_IDirectSound8(iface); HRESULT hr = S_OK; - TRACE("(%p)->(%p, %u)\n", iface, hwnd, level); + TRACE("(%p)->(%p, %"LONGFMT"u)\n", iface, hwnd, level); if(!This->primary) { @@ -528,7 +528,7 @@ static HRESULT WINAPI DS8_SetCooperativeLevel(IDirectSound8 *iface, HWND hwnd, D if(level > DSSCL_WRITEPRIMARY || level < DSSCL_NORMAL) { - WARN("Invalid coop level: %u\n", level); + WARN("Invalid coop level: %"LONGFMT"u\n", level); return DSERR_INVALIDPARAM; } @@ -613,7 +613,7 @@ static HRESULT WINAPI DS8_Compact(IDirectSound8 *iface) EnterCriticalSection(&This->primary->crst); if(This->prio_level < DSSCL_PRIORITY) { - WARN("Coop level not high enough (%u)\n", This->prio_level); + WARN("Coop level not high enough (%"LONGFMT"u)\n", This->prio_level); hr = DSERR_PRIOLEVELNEEDED; } LeaveCriticalSection(&This->primary->crst); @@ -652,7 +652,7 @@ static HRESULT WINAPI DS8_SetSpeakerConfig(IDirectSound8 *iface, DWORD config) HKEY key; HRESULT hr; - TRACE("(%p)->(0x%08x)\n", iface, config); + TRACE("(%p)->(0x%08"LONGFMT"x)\n", iface, config); if(!This->primary) { @@ -668,12 +668,12 @@ static HRESULT WINAPI DS8_SetSpeakerConfig(IDirectSound8 *iface, DWORD config) hr = DSERR_INVALIDPARAM; if(geo && (geo < DSSPEAKER_GEOMETRY_MIN || geo > DSSPEAKER_GEOMETRY_MAX)) { - WARN("Invalid speaker angle %u\n", geo); + WARN("Invalid speaker angle %"LONGFMT"u\n", geo); goto out; } if(speaker < DSSPEAKER_HEADPHONE || speaker > DSSPEAKER_7POINT1) { - WARN("Invalid speaker config %u\n", speaker); + WARN("Invalid speaker config %"LONGFMT"u\n", speaker); goto out; } diff --git a/dsound_main.c b/dsound_main.c index 0007baf..fac4a02 100644 --- a/dsound_main.c +++ b/dsound_main.c @@ -920,7 +920,7 @@ static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface) { IClassFactoryImpl *This = impl_from_IClassFactory(iface); ULONG ref = InterlockedIncrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); return ref; } @@ -928,7 +928,7 @@ static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface) { IClassFactoryImpl *This = impl_from_IClassFactory(iface); ULONG ref = InterlockedDecrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref + 1); /* static class, won't be freed */ return ref; } @@ -1047,7 +1047,7 @@ HRESULT WINAPI DllCanUnloadNow(void) */ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { - TRACE("(%p, %d, %p)\n", hInstDLL, fdwReason, lpvReserved); + TRACE("(%p, %"LONGFMT"u, %p)\n", hInstDLL, fdwReason, lpvReserved); switch(fdwReason) { diff --git a/dsound_private.h b/dsound_private.h index 9f6ba81..b8303b2 100644 --- a/dsound_private.h +++ b/dsound_private.h @@ -36,6 +36,7 @@ #include #endif +#define LONGFMT #else #include @@ -84,6 +85,7 @@ static inline const char *debugstr_guid( const GUID *id ) static inline const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); } +#define LONGFMT "l" #endif diff --git a/duplex.c b/duplex.c index 960224c..c71bf42 100644 --- a/duplex.c +++ b/duplex.c @@ -103,7 +103,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IUnknown_AddRef(IUnknown *iface) InterlockedIncrement(&(This->all_ref)); ref = InterlockedIncrement(&(This->unkref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); return ref; } @@ -112,7 +112,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IUnknown_Release(IUnknown *iface) { IDirectSoundFullDuplexImpl *This = impl_from_IUnknown(iface); ULONG ref = InterlockedDecrement(&(This->unkref)); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref + 1); if(InterlockedDecrement(&(This->all_ref)) == 0) DSOUND_FullDuplexDestroy(This); return ref; @@ -147,7 +147,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound8_AddRef(IDirectSound8 *i InterlockedIncrement(&(This->all_ref)); ref = InterlockedIncrement(&(This->ds8ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); return ref; } @@ -156,7 +156,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound8_Release(IDirectSound8 * { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSound8(iface); ULONG ref = InterlockedDecrement(&(This->ds8ref)); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref + 1); if(InterlockedDecrement(&(This->all_ref)) == 0) DSOUND_FullDuplexDestroy(This); return ref; @@ -191,7 +191,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_SetCooperativeLevel( IDirectSound8 *iface, HWND hwnd, DWORD level) { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSound8(iface); - TRACE("(%p,%p,%u)\n",This,hwnd,level); + TRACE("(%p,%p,%"LONGFMT"u)\n",This,hwnd,level); return IDirectSound8_SetCooperativeLevel(This->renderer_device,hwnd,level); } @@ -214,7 +214,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_SetSpeakerConfig( IDirectSound8 *iface, DWORD config) { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSound8(iface); - TRACE("(%p,0x%08x)\n",This,config); + TRACE("(%p,0x%08"LONGFMT"x)\n",This,config); return IDirectSound8_SetSpeakerConfig(This->renderer_device,config); } @@ -272,7 +272,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_AddRef(IDirectSou InterlockedIncrement(&(This->all_ref)); ref = InterlockedIncrement(&(This->dscref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); return ref; } @@ -281,7 +281,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_Release(IDirectSo { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundCapture(iface); ULONG ref = InterlockedDecrement(&(This->dscref)); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref + 1); if(InterlockedDecrement(&(This->all_ref)) == 0) DSOUND_FullDuplexDestroy(This); return ref; @@ -371,7 +371,7 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_AddRef(IDirectSoundFullDuplex *if InterlockedIncrement(&(This->all_ref)); ref = InterlockedIncrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); return ref; } @@ -380,7 +380,7 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_Release(IDirectSoundFullDuplex *i { IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); ULONG ref = InterlockedDecrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); if(InterlockedDecrement(&(This->all_ref)) == 0) DSOUND_FullDuplexDestroy(This); return ref; @@ -400,7 +400,7 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize( void *ptr; HRESULT hr; - TRACE("(%p,%s,%s,%p,%p,%p,%x,%p,%p)\n", This, + TRACE("(%p,%s,%s,%p,%p,%p,%"LONGFMT"x,%p,%p)\n", This, debugstr_guid(pCaptureGuid), debugstr_guid(pRendererGuid), lpDscBufferDesc, lpDsBufferDesc, hWnd, dwLevel, lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8); @@ -557,7 +557,7 @@ DirectSoundFullDuplexCreate( void *iface = NULL; HRESULT hres; - TRACE("(%s,%s,%p,%p,%p,%x,%p,%p,%p,%p)\n", + TRACE("(%s,%s,%p,%p,%p,%"LONGFMT"x,%p,%p,%p,%p)\n", debugstr_guid(pcGuidCaptureDevice), debugstr_guid(pcGuidRenderDevice), pcDSCBufferDesc, pcDSBufferDesc, hWnd, dwLevel, ppDSFD, ppDSCBuffer8, ppDSBuffer8, pUnkOuter); diff --git a/primary.c b/primary.c index ffbbf21..f0a4b08 100644 --- a/primary.c +++ b/primary.c @@ -360,7 +360,7 @@ HRESULT DS8Primary_Create(DS8Primary **ppv, DS8Impl *parent) listener->flDopplerFactor = DS3D_DEFAULTDOPPLERFACTOR; hr = IDirectSound3DListener_SetAllParameters(&This->IDirectSound3DListener_iface, listener, DS3D_IMMEDIATE); if(FAILED(hr)) - ERR("Could not set 3d parameters: %08x\n", hr); + ERR("Could not set 3d parameters: %08"LONGFMT"x\n", hr); for(nsources = 0;nsources < sizeof(srcs)/sizeof(*srcs);nsources++) { @@ -516,7 +516,7 @@ static HRESULT WINAPI DS8Primary_GetCaps(IDirectSoundBuffer *iface, DSBCAPS *cap if(!caps || caps->dwSize < sizeof(*caps)) { - WARN("Invalid DSBCAPS (%p, %u)\n", caps, caps ? caps->dwSize : 0); + WARN("Invalid DSBCAPS (%p, %"LONGFMT"u)\n", caps, caps ? caps->dwSize : 0); return DSERR_INVALIDPARAM; } @@ -696,7 +696,7 @@ static HRESULT WINAPI DS8Primary_Initialize(IDirectSoundBuffer *iface, IDirectSo (desc->dwFlags&DSBCAPS_CTRLPOSITIONNOTIFY) || (desc->dwFlags&DSBCAPS_LOCSOFTWARE)) { - WARN("Bad dwFlags %08x\n", desc->dwFlags); + WARN("Bad dwFlags %08"LONGFMT"x\n", desc->dwFlags); return DSERR_INVALIDPARAM; } @@ -752,7 +752,7 @@ static HRESULT WINAPI DS8Primary_Lock(IDirectSoundBuffer *iface, DWORD ofs, DWOR DS8Primary *This = impl_from_IDirectSoundBuffer(iface); HRESULT hr = DSERR_PRIOLEVELNEEDED; - TRACE("(%p)->(%u, %u, %p, %p, %p, %p, %u)\n", iface, ofs, bytes, ptr1, len1, ptr2, len2, flags); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u, %p, %p, %p, %p, %"LONGFMT"u)\n", iface, ofs, bytes, ptr1, len1, ptr2, len2, flags); EnterCriticalSection(&This->crst); if(This->write_emu) @@ -767,11 +767,11 @@ static HRESULT WINAPI DS8Primary_Play(IDirectSoundBuffer *iface, DWORD res1, DWO DS8Primary *This = impl_from_IDirectSoundBuffer(iface); HRESULT hr; - TRACE("(%p)->(%u, %u, %u)\n", iface, res1, res2, flags); + TRACE("(%p)->(%"LONGFMT"u, %"LONGFMT"u, %"LONGFMT"u)\n", iface, res1, res2, flags); if(!(flags & DSBPLAY_LOOPING)) { - WARN("Flags (%08x) not set to DSBPLAY_LOOPING\n", flags); + WARN("Flags (%08"LONGFMT"x) not set to DSBPLAY_LOOPING\n", flags); return DSERR_INVALIDPARAM; } @@ -788,7 +788,7 @@ static HRESULT WINAPI DS8Primary_Play(IDirectSoundBuffer *iface, DWORD res1, DWO static HRESULT WINAPI DS8Primary_SetCurrentPosition(IDirectSoundBuffer *iface, DWORD pos) { - WARN("(%p)->(%u)\n", iface, pos); + WARN("(%p)->(%"LONGFMT"u)\n", iface, pos); return DSERR_INVALIDCALL; } @@ -873,8 +873,8 @@ static HRESULT WINAPI DS8Primary_SetFormat(IDirectSoundBuffer *iface, const WAVE TRACE("Requested primary format:\n" " FormatTag = %04x\n" " Channels = %u\n" - " SamplesPerSec = %u\n" - " AvgBytesPerSec = %u\n" + " SamplesPerSec = %"LONGFMT"u\n" + " AvgBytesPerSec = %"LONGFMT"u\n" " BlockAlign = %u\n" " BitsPerSample = %u\n", wfx->wFormatTag, wfx->nChannels, @@ -926,11 +926,11 @@ static HRESULT WINAPI DS8Primary_SetVolume(IDirectSoundBuffer *iface, LONG vol) DS8Primary *This = impl_from_IDirectSoundBuffer(iface); HRESULT hr = S_OK; - TRACE("(%p)->(%d)\n", iface, vol); + TRACE("(%p)->(%"LONGFMT"d)\n", iface, vol); if(vol > DSBVOLUME_MAX || vol < DSBVOLUME_MIN) { - WARN("Invalid volume (%d)\n", vol); + WARN("Invalid volume (%"LONGFMT"d)\n", vol); return DSERR_INVALIDPARAM; } @@ -953,11 +953,11 @@ static HRESULT WINAPI DS8Primary_SetPan(IDirectSoundBuffer *iface, LONG pan) DS8Primary *This = impl_from_IDirectSoundBuffer(iface); HRESULT hr; - TRACE("(%p)->(%d)\n", iface, pan); + TRACE("(%p)->(%"LONGFMT"d)\n", iface, pan); if(pan > DSBPAN_RIGHT || pan < DSBPAN_LEFT) { - WARN("invalid parameter: pan = %d\n", pan); + WARN("invalid parameter: pan = %"LONGFMT"d\n", pan); return DSERR_INVALIDPARAM; } @@ -981,7 +981,7 @@ static HRESULT WINAPI DS8Primary_SetPan(IDirectSoundBuffer *iface, LONG pan) static HRESULT WINAPI DS8Primary_SetFrequency(IDirectSoundBuffer *iface, DWORD freq) { - WARN("(%p)->(%u)\n", iface, freq); + WARN("(%p)->(%"LONGFMT"u)\n", iface, freq); return DSERR_CONTROLUNAVAIL; } @@ -1007,7 +1007,7 @@ static HRESULT WINAPI DS8Primary_Unlock(IDirectSoundBuffer *iface, void *ptr1, D DS8Primary *This = impl_from_IDirectSoundBuffer(iface); HRESULT hr = DSERR_INVALIDCALL; - TRACE("(%p)->(%p, %u, %p, %u)\n", iface, ptr1, len1, ptr2, len2); + TRACE("(%p)->(%p, %"LONGFMT"u, %p, %"LONGFMT"u)\n", iface, ptr1, len1, ptr2, len2); EnterCriticalSection(&This->crst); if(This->write_emu) @@ -1074,7 +1074,7 @@ static ULONG WINAPI DS8Primary3D_AddRef(IDirectSound3DListener *iface) LONG ret; ret = InterlockedIncrement(&This->ds3d_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -1089,7 +1089,7 @@ static ULONG WINAPI DS8Primary3D_Release(IDirectSound3DListener *iface) LONG ret; ret = InterlockedDecrement(&This->ds3d_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -1104,7 +1104,7 @@ static HRESULT WINAPI DS8Primary3D_GetAllParameters(IDirectSound3DListener *ifac if(!listener || listener->dwSize < sizeof(*listener)) { - WARN("Invalid DS3DLISTENER %p %u\n", listener, listener ? listener->dwSize : 0); + WARN("Invalid DS3DLISTENER %p %"LONGFMT"u\n", listener, listener ? listener->dwSize : 0); return DSERR_INVALIDPARAM; } @@ -1284,11 +1284,11 @@ static HRESULT WINAPI DS8Primary3D_SetAllParameters(IDirectSound3DListener *ifac { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%p, %u)\n", iface, listen, apply); + TRACE("(%p)->(%p, %"LONGFMT"u)\n", iface, listen, apply); if(!listen || listen->dwSize < sizeof(*listen)) { - WARN("Invalid parameter %p %u\n", listen, listen ? listen->dwSize : 0); + WARN("Invalid parameter %p %"LONGFMT"u\n", listen, listen ? listen->dwSize : 0); return DSERR_INVALIDPARAM; } @@ -1332,7 +1332,7 @@ static HRESULT WINAPI DS8Primary3D_SetDistanceFactor(IDirectSound3DListener *ifa { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%f, %u)\n", iface, factor, apply); + TRACE("(%p)->(%f, %"LONGFMT"u)\n", iface, factor, apply); if(factor < DS3D_MINDISTANCEFACTOR || factor > DS3D_MAXDISTANCEFACTOR) @@ -1365,7 +1365,7 @@ static HRESULT WINAPI DS8Primary3D_SetDopplerFactor(IDirectSound3DListener *ifac { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%f, %u)\n", iface, factor, apply); + TRACE("(%p)->(%f, %"LONGFMT"u)\n", iface, factor, apply); if(factor < DS3D_MINDOPPLERFACTOR || factor > DS3D_MAXDOPPLERFACTOR) @@ -1396,7 +1396,7 @@ static HRESULT WINAPI DS8Primary3D_SetOrientation(IDirectSound3DListener *iface, { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%f, %f, %f, %f, %f, %f, %u)\n", iface, xFront, yFront, zFront, xTop, yTop, zTop, apply); + TRACE("(%p)->(%f, %f, %f, %f, %f, %f, %"LONGFMT"u)\n", iface, xFront, yFront, zFront, xTop, yTop, zTop, apply); EnterCriticalSection(&This->crst); if(apply == DS3D_DEFERRED) @@ -1429,7 +1429,7 @@ static HRESULT WINAPI DS8Primary3D_SetPosition(IDirectSound3DListener *iface, D3 { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%f, %f, %f, %u)\n", iface, x, y, z, apply); + TRACE("(%p)->(%f, %f, %f, %"LONGFMT"u)\n", iface, x, y, z, apply); EnterCriticalSection(&This->crst); if(apply == DS3D_DEFERRED) @@ -1455,7 +1455,7 @@ static HRESULT WINAPI DS8Primary3D_SetRolloffFactor(IDirectSound3DListener *ifac { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%f, %u)\n", iface, factor, apply); + TRACE("(%p)->(%f, %"LONGFMT"u)\n", iface, factor, apply); if(factor < DS3D_MINROLLOFFFACTOR || factor > DS3D_MAXROLLOFFFACTOR) @@ -1494,7 +1494,7 @@ static HRESULT WINAPI DS8Primary3D_SetVelocity(IDirectSound3DListener *iface, D3 { DS8Primary *This = impl_from_IDirectSound3DListener(iface); - TRACE("(%p)->(%f, %f, %f, %u)\n", iface, x, y, z, apply); + TRACE("(%p)->(%f, %f, %f, %"LONGFMT"u)\n", iface, x, y, z, apply); EnterCriticalSection(&This->crst); if(apply == DS3D_DEFERRED) @@ -1665,7 +1665,7 @@ static ULONG WINAPI DS8PrimaryProp_AddRef(IKsPropertySet *iface) LONG ret; ret = InterlockedIncrement(&This->prop_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -1676,7 +1676,7 @@ static ULONG WINAPI DS8PrimaryProp_Release(IKsPropertySet *iface) LONG ret; ret = InterlockedDecrement(&This->prop_ref); - TRACE("new refcount %d\n", ret); + TRACE("new refcount %"LONGFMT"d\n", ret); return ret; } @@ -1690,7 +1690,7 @@ static HRESULT WINAPI DS8PrimaryProp_Get(IKsPropertySet *iface, DS8Primary *This = impl_from_IKsPropertySet(iface); HRESULT res = E_PROP_ID_UNSUPPORTED; - TRACE("(%p)->(%s, %u, %p, %u, %p, %u, %p)\n", iface, debugstr_guid(guidPropSet), + TRACE("(%p)->(%s, %"LONGFMT"u, %p, %"LONGFMT"u, %p, %"LONGFMT"u, %p)\n", iface, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData, pcbReturned); if(IsEqualIID(guidPropSet, &DSPROPSETID_EAX20_ListenerProperties)) @@ -1835,7 +1835,7 @@ static HRESULT WINAPI DS8PrimaryProp_Get(IKsPropertySet *iface, } } else - FIXME("Unhandled propid: 0x%08x\n", dwPropID); + FIXME("Unhandled propid: 0x%08"LONGFMT"x\n", dwPropID); LeaveCriticalSection(&This->crst); } @@ -1853,7 +1853,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, DS8Primary *This = impl_from_IKsPropertySet(iface); HRESULT res = E_PROP_ID_UNSUPPORTED; - TRACE("(%p)->(%s, %u, %p, %u, %p, %u)\n", iface, debugstr_guid(guidPropSet), + TRACE("(%p)->(%s, %"LONGFMT"u, %p, %"LONGFMT"u, %p, %"LONGFMT"u)\n", iface, debugstr_guid(guidPropSet), dwPropID, pInstanceData, cbInstanceData, pPropData, cbPropData); if(IsEqualIID(guidPropSet, &DSPROPSETID_EAX20_ListenerProperties)) @@ -2108,7 +2108,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, } } else if(propid != 0) - FIXME("Unhandled propid: 0x%08x\n", propid); + FIXME("Unhandled propid: 0x%08"LONGFMT"x\n", propid); if(res == DS_OK && immediate) IDirectSound3DListener_CommitDeferredSettings(&This->IDirectSound3DListener_iface); @@ -2129,7 +2129,7 @@ static HRESULT WINAPI DS8PrimaryProp_QuerySupport(IKsPropertySet *iface, DS8Primary *This = impl_from_IKsPropertySet(iface); HRESULT res = E_PROP_ID_UNSUPPORTED; - TRACE("(%p)->(%s, %u, %p)\n", iface, debugstr_guid(guidPropSet), dwPropID, pTypeSupport); + TRACE("(%p)->(%s, %"LONGFMT"u, %p)\n", iface, debugstr_guid(guidPropSet), dwPropID, pTypeSupport); if(IsEqualIID(guidPropSet, &DSPROPSETID_EAX20_ListenerProperties)) { @@ -2151,7 +2151,7 @@ static HRESULT WINAPI DS8PrimaryProp_QuerySupport(IKsPropertySet *iface, res = DS_OK; } else - FIXME("Unhandled propid: 0x%08x\n", dwPropID); + FIXME("Unhandled propid: 0x%08"LONGFMT"x\n", dwPropID); LeaveCriticalSection(&This->crst); } diff --git a/propset.c b/propset.c index 3e5aee4..6c9f85f 100644 --- a/propset.c +++ b/propset.c @@ -208,7 +208,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(IKsPropertySet *iface) { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); ULONG ref = InterlockedIncrement(&(This->ref)); - TRACE("(%p) ref was %u\n", This, ref - 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref - 1); return ref; } @@ -216,7 +216,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(IKsPropertySet *iface) { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); ULONG ref = InterlockedDecrement(&(This->ref)); - TRACE("(%p) ref was %u\n", This, ref + 1); + TRACE("(%p) ref was %"LONGFMT"u\n", This, ref + 1); if (!ref) { HeapFree(GetProcessHeap(), 0, This); @@ -232,7 +232,7 @@ static HRESULT DSPROPERTY_WaveDeviceMappingW( { HRESULT hr = DSERR_INVALIDPARAM; PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd; - TRACE("(pPropData=%p,cbPropData=%u,pcbReturned=%p)\n", + TRACE("(pPropData=%p,cbPropData=%"LONGFMT"u,pcbReturned=%p)\n", pPropData,cbPropData,pcbReturned); ppd = pPropData; @@ -299,7 +299,7 @@ static HRESULT DSPROPERTY_WaveDeviceMappingA( DWORD len; HRESULT hr; - TRACE("(pPropData=%p,cbPropData=%u,pcbReturned=%p)\n", + TRACE("(pPropData=%p,cbPropData=%"LONGFMT"u,pcbReturned=%p)\n", pPropData,cbPropData,pcbReturned); if (!ppd || !ppd->DeviceName) { @@ -335,7 +335,7 @@ static HRESULT DSPROPERTY_DescriptionW( ULONG wod, wid, wodn, widn; DSDRIVERDESC desc; - TRACE("pPropData=%p,cbPropData=%u,pcbReturned=%p)\n", + TRACE("pPropData=%p,cbPropData=%"LONGFMT"u,pcbReturned=%p)\n", pPropData,cbPropData,pcbReturned); TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId)); @@ -414,7 +414,7 @@ static HRESULT DSPROPERTY_DescriptionW( if (pcbReturned) { *pcbReturned = sizeof(*ppd); - TRACE("*pcbReturned=%u\n", *pcbReturned); + TRACE("*pcbReturned=%"LONGFMT"u\n", *pcbReturned); } return S_OK; @@ -429,7 +429,7 @@ static HRESULT DSPROPERTY_EnumerateW( DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data; BOOL ret; int widn, wodn, i; - TRACE("(pPropData=%p,cbPropData=%u,pcbReturned=%p)\n", + TRACE("(pPropData=%p,cbPropData=%"LONGFMT"u,pcbReturned=%p)\n", pPropData,cbPropData,pcbReturned); if (pcbReturned) @@ -653,7 +653,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get( PULONG pcbReturned ) { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); - TRACE("(iface=%p,guidPropSet=%s,dwPropID=%u,pInstanceData=%p,cbInstanceData=%u,pPropData=%p,cbPropData=%u,pcbReturned=%p)\n", + TRACE("(iface=%p,guidPropSet=%s,dwPropID=%"LONGFMT"u,pInstanceData=%p,cbInstanceData=%"LONGFMT"u,pPropData=%p,cbPropData=%"LONGFMT"u,pcbReturned=%p)\n", This,debugstr_guid(guidPropSet),dwPropID, pInstanceData,cbInstanceData, pPropData,cbPropData,pcbReturned); @@ -677,7 +677,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get( case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: return DSPROPERTY_EnumerateW(pPropData,cbPropData,pcbReturned); default: - FIXME("unsupported ID: %u\n",dwPropID); + FIXME("unsupported ID: %"LONGFMT"u\n",dwPropID); break; } } else { @@ -686,7 +686,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get( if (pcbReturned) { *pcbReturned = 0; - FIXME("*pcbReturned=%u\n", *pcbReturned); + FIXME("*pcbReturned=%"LONGFMT"u\n", *pcbReturned); } return E_PROP_ID_UNSUPPORTED; @@ -703,7 +703,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Set( { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); - FIXME("(%p)->(%s,%u,%p,%u,%p,%u), stub!\n",This, + FIXME("(%p)->(%s,%"LONGFMT"u,%p,%"LONGFMT"u,%p,%"LONGFMT"u), stub!\n",This, debugstr_guid(guidPropSet),dwPropID, pInstanceData,cbInstanceData,pPropData,cbPropData); return E_PROP_ID_UNSUPPORTED; @@ -716,7 +716,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport( PULONG pTypeSupport ) { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); - TRACE("(%p,%s,%u,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport); + TRACE("(%p,%s,%"LONGFMT"u,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport); if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) { switch (dwPropID) { @@ -745,7 +745,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport( *pTypeSupport = KSPROPERTY_SUPPORT_GET; return S_OK; default: - FIXME("unsupported ID: %u\n",dwPropID); + FIXME("unsupported ID: %"LONGFMT"u\n",dwPropID); break; } } else { -- 2.11.4.GIT