Commit 86bc819f authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dsound: Enable compilation with long types.

parent c9bff72b
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dsound.dll MODULE = dsound.dll
IMPORTLIB = dsound IMPORTLIB = dsound
IMPORTS = dxguid uuid winmm ole32 advapi32 user32 IMPORTS = dxguid uuid winmm ole32 advapi32 user32
......
...@@ -59,7 +59,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(IDirectSoundNotify *iface) ...@@ -59,7 +59,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(IDirectSoundNotify *iface)
IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface);
ULONG ref = InterlockedIncrement(&This->refn); ULONG ref = InterlockedIncrement(&This->refn);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -72,7 +72,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(IDirectSoundNotify *iface) ...@@ -72,7 +72,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(IDirectSoundNotify *iface)
IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface);
ULONG ref = InterlockedDecrement(&This->refn); ULONG ref = InterlockedDecrement(&This->refn);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
secondarybuffer_destroy(This); secondarybuffer_destroy(This);
...@@ -119,7 +119,7 @@ static void commit_next_chunk(IDirectSoundBufferImpl *dsb) ...@@ -119,7 +119,7 @@ static void commit_next_chunk(IDirectSoundBufferImpl *dsb)
dsb->use_committed = TRUE; dsb->use_committed = TRUE;
dsb->committed_mixpos = 0; dsb->committed_mixpos = 0;
TRACE("committing %u bytes from offset %u\n", dsb->writelead, dsb->sec_mixpos); TRACE("committing %lu bytes from offset %lu\n", dsb->writelead, dsb->sec_mixpos);
} }
static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSoundNotify *iface, static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSoundNotify *iface,
...@@ -127,7 +127,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou ...@@ -127,7 +127,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface);
TRACE("(%p,0x%08x,%p)\n",This,howmuch,notify); TRACE("(%p,0x%08lx,%p)\n",This,howmuch,notify);
if (howmuch > 0 && notify == NULL) { if (howmuch > 0 && notify == NULL) {
WARN("invalid parameter: notify == NULL\n"); WARN("invalid parameter: notify == NULL\n");
...@@ -137,7 +137,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou ...@@ -137,7 +137,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou
if (TRACE_ON(dsound)) { if (TRACE_ON(dsound)) {
unsigned int i; unsigned int i;
for (i=0;i<howmuch;i++) for (i=0;i<howmuch;i++)
TRACE("notify at %d to %p\n", TRACE("notify at %ld to %p\n",
notify[i].dwOffset,notify[i].hEventNotify); notify[i].dwOffset,notify[i].hEventNotify);
} }
...@@ -208,15 +208,15 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(IDirectSoundBuffer8 *ifac ...@@ -208,15 +208,15 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(IDirectSoundBuffer8 *ifac
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%d)\n",This,vol); TRACE("(%p,%ld)\n",This,vol);
if (!(This->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) { if (!(This->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) {
WARN("control unavailable: This->dsbd.dwFlags = 0x%08x\n", This->dsbd.dwFlags); WARN("control unavailable: This->dsbd.dwFlags = 0x%08lx\n", This->dsbd.dwFlags);
return DSERR_CONTROLUNAVAIL; return DSERR_CONTROLUNAVAIL;
} }
if ((vol > DSBVOLUME_MAX) || (vol < DSBVOLUME_MIN)) { if ((vol > DSBVOLUME_MAX) || (vol < DSBVOLUME_MIN)) {
WARN("invalid parameter: vol = %d\n", vol); WARN("invalid parameter: vol = %ld\n", vol);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -267,7 +267,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(IDirectSoundBuffer8 *i ...@@ -267,7 +267,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(IDirectSoundBuffer8 *i
DWORD oldFreq; DWORD oldFreq;
void *newcommitted; void *newcommitted;
TRACE("(%p,%d)\n",This,freq); TRACE("(%p,%ld)\n",This,freq);
if (is_primary_buffer(This)) { if (is_primary_buffer(This)) {
WARN("not available for primary buffers.\n"); WARN("not available for primary buffers.\n");
...@@ -283,7 +283,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(IDirectSoundBuffer8 *i ...@@ -283,7 +283,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(IDirectSoundBuffer8 *i
freq = This->pwfx->nSamplesPerSec; freq = This->pwfx->nSamplesPerSec;
if ((freq < DSBFREQUENCY_MIN) || (freq > DSBFREQUENCY_MAX)) { if ((freq < DSBFREQUENCY_MIN) || (freq > DSBFREQUENCY_MAX)) {
WARN("invalid parameter: freq = %d\n", freq); WARN("invalid parameter: freq = %ld\n", freq);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -317,7 +317,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Play(IDirectSoundBuffer8 *iface, DW ...@@ -317,7 +317,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Play(IDirectSoundBuffer8 *iface, DW
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
int i; int i;
TRACE("(%p,%08x,%08x,%08x)\n",This,reserved1,reserved2,flags); TRACE("(%p,%08lx,%08lx,%08lx)\n",This,reserved1,reserved2,flags);
AcquireSRWLockExclusive(&This->lock); AcquireSRWLockExclusive(&This->lock);
...@@ -363,7 +363,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_AddRef(IDirectSoundBuffer8 *iface) ...@@ -363,7 +363,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_AddRef(IDirectSoundBuffer8 *iface)
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -380,7 +380,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface) ...@@ -380,7 +380,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface)
ref = capped_refcount_dec(&This->ref); ref = capped_refcount_dec(&This->ref);
if(!ref) if(!ref)
capped_refcount_dec(&This->numIfaces); capped_refcount_dec(&This->numIfaces);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -388,7 +388,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface) ...@@ -388,7 +388,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface)
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
secondarybuffer_destroy(This); secondarybuffer_destroy(This);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -407,7 +407,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(IDirectSoundBuff ...@@ -407,7 +407,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(IDirectSoundBuff
/* sanity */ /* sanity */
if (pos >= This->buflen){ if (pos >= This->buflen){
FIXME("Bad play position. playpos: %d, buflen: %d\n", pos, This->buflen); FIXME("Bad play position. playpos: %ld, buflen: %ld\n", pos, This->buflen);
pos %= This->buflen; pos %= This->buflen;
} }
...@@ -424,7 +424,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(IDirectSoundBuff ...@@ -424,7 +424,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(IDirectSoundBuff
ReleaseSRWLockShared(&This->lock); ReleaseSRWLockShared(&This->lock);
TRACE("playpos = %d, writepos = %d, buflen=%d (%p, time=%d)\n", TRACE("playpos = %ld, writepos = %ld, buflen=%ld (%p, time=%ld)\n",
playpos?*playpos:-1, writepos?*writepos:-1, This->buflen, This, GetTickCount()); playpos?*playpos:-1, writepos?*writepos:-1, This->buflen, This, GetTickCount());
return DS_OK; return DS_OK;
...@@ -452,7 +452,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(IDirectSoundBuffer8 *ifac ...@@ -452,7 +452,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(IDirectSoundBuffer8 *ifac
*status |= DSBSTATUS_LOCSOFTWARE; *status |= DSBSTATUS_LOCSOFTWARE;
ReleaseSRWLockShared(&This->lock); ReleaseSRWLockShared(&This->lock);
TRACE("status=%x\n", *status); TRACE("status=%lx\n", *status);
return DS_OK; return DS_OK;
} }
...@@ -463,7 +463,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFormat(IDirectSoundBuffer8 *ifac ...@@ -463,7 +463,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFormat(IDirectSoundBuffer8 *ifac
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DWORD size; DWORD size;
TRACE("(%p,%p,%d,%p)\n",This,lpwf,wfsize,wfwritten); TRACE("(%p,%p,%ld,%p)\n",This,lpwf,wfsize,wfwritten);
size = sizeof(WAVEFORMATEX) + This->pwfx->cbSize; size = sizeof(WAVEFORMATEX) + This->pwfx->cbSize;
...@@ -498,7 +498,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW ...@@ -498,7 +498,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%d,%d,%p,%p,%p,%p,0x%08x) at %d\n", This, writecursor, writebytes, lplpaudioptr1, TRACE("(%p,%ld,%ld,%p,%p,%p,%p,0x%08lx) at %ld\n", This, writecursor, writebytes, lplpaudioptr1,
audiobytes1, lplpaudioptr2, audiobytes2, flags, GetTickCount()); audiobytes1, lplpaudioptr2, audiobytes2, flags, GetTickCount());
if (!audiobytes1) if (!audiobytes1)
...@@ -519,13 +519,13 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW ...@@ -519,13 +519,13 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW
writebytes = This->buflen; writebytes = This->buflen;
if (writecursor >= This->buflen) { if (writecursor >= This->buflen) {
WARN("Invalid parameter, writecursor: %u >= buflen: %u\n", WARN("Invalid parameter, writecursor: %lu >= buflen: %lu\n",
writecursor, This->buflen); writecursor, This->buflen);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
if (writebytes > This->buflen) { if (writebytes > This->buflen) {
WARN("Invalid parameter, writebytes: %u > buflen: %u\n", WARN("Invalid parameter, writebytes: %lu > buflen: %lu\n",
writebytes, This->buflen); writebytes, This->buflen);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -543,9 +543,9 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW ...@@ -543,9 +543,9 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW
*(LPBYTE*)lplpaudioptr2 = NULL; *(LPBYTE*)lplpaudioptr2 = NULL;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = 0; *audiobytes2 = 0;
TRACE("Locked %p(%i bytes) and %p(%i bytes) writecursor=%d\n", TRACE("Locked %p(%li bytes) and %p(%li bytes) writecursor=%ld\n",
*(LPBYTE*)lplpaudioptr1, *audiobytes1, lplpaudioptr2 ? *(LPBYTE*)lplpaudioptr2 : NULL, audiobytes2 ? *audiobytes2: 0, writecursor); *(LPBYTE*)lplpaudioptr1, *audiobytes1, lplpaudioptr2 ? *(LPBYTE*)lplpaudioptr2 : NULL, audiobytes2 ? *audiobytes2: 0, writecursor);
TRACE("->%d.0\n",writebytes); TRACE("->%ld.0\n",writebytes);
This->buffer->lockedbytes += writebytes; This->buffer->lockedbytes += writebytes;
} else { } else {
DWORD remainder = writebytes + writecursor - This->buflen; DWORD remainder = writebytes + writecursor - This->buflen;
...@@ -566,7 +566,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW ...@@ -566,7 +566,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(IDirectSoundBuffer8 *iface, DW
WARN("Overwriting mixing position, case 3\n"); WARN("Overwriting mixing position, case 3\n");
commit_next_chunk(This); commit_next_chunk(This);
} }
TRACE("Locked %p(%i bytes) and %p(%i bytes) writecursor=%d\n", *(LPBYTE*)lplpaudioptr1, *audiobytes1, lplpaudioptr2 ? *(LPBYTE*)lplpaudioptr2 : NULL, audiobytes2 ? *audiobytes2: 0, writecursor); TRACE("Locked %p(%li bytes) and %p(%li bytes) writecursor=%ld\n", *(LPBYTE*)lplpaudioptr1, *audiobytes1, lplpaudioptr2 ? *(LPBYTE*)lplpaudioptr2 : NULL, audiobytes2 ? *audiobytes2: 0, writecursor);
} }
ReleaseSRWLockShared(&This->lock); ReleaseSRWLockShared(&This->lock);
...@@ -580,7 +580,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetCurrentPosition(IDirectSoundBuff ...@@ -580,7 +580,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetCurrentPosition(IDirectSoundBuff
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%d)\n",This,newpos); TRACE("(%p,%ld)\n",This,newpos);
AcquireSRWLockExclusive(&This->lock); AcquireSRWLockExclusive(&This->lock);
...@@ -605,10 +605,10 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetPan(IDirectSoundBuffer8 *iface, ...@@ -605,10 +605,10 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetPan(IDirectSoundBuffer8 *iface,
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%d)\n",This,pan); TRACE("(%p,%ld)\n",This,pan);
if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) { if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) {
WARN("invalid parameter: pan = %d\n", pan); WARN("invalid parameter: pan = %ld\n", pan);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -656,7 +656,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(IDirectSoundBuffer8 *iface, ...@@ -656,7 +656,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(IDirectSoundBuffer8 *iface,
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface), *iter; IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface), *iter;
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%p,%d,%p,%d)\n", This,p1,x1,p2,x2); TRACE("(%p,%p,%ld,%p,%ld)\n", This,p1,x1,p2,x2);
if (!p2) if (!p2)
x2 = 0; x2 = 0;
...@@ -714,7 +714,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFrequency(IDirectSoundBuffer8 *i ...@@ -714,7 +714,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFrequency(IDirectSoundBuffer8 *i
} }
*freq = This->freq; *freq = This->freq;
TRACE("-> %d\n", *freq); TRACE("-> %ld\n", *freq);
return DS_OK; return DS_OK;
} }
...@@ -746,7 +746,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFX(IDirectSoundBuffer8 *iface, D ...@@ -746,7 +746,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFX(IDirectSoundBuffer8 *iface, D
DMO_MEDIA_TYPE dmt; DMO_MEDIA_TYPE dmt;
WAVEFORMATEX wfx; WAVEFORMATEX wfx;
TRACE("(%p,%u,%p,%p)\n", This, dwEffectsCount, pDSFXDesc, pdwResultCodes); TRACE("(%p,%lu,%p,%p)\n", This, dwEffectsCount, pDSFXDesc, pdwResultCodes);
if (pdwResultCodes) if (pdwResultCodes)
for (u=0; u<dwEffectsCount; u++) pdwResultCodes[u] = DSFXR_UNKNOWN; for (u=0; u<dwEffectsCount; u++) pdwResultCodes[u] = DSFXR_UNKNOWN;
...@@ -808,7 +808,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFX(IDirectSoundBuffer8 *iface, D ...@@ -808,7 +808,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFX(IDirectSoundBuffer8 *iface, D
dmt.pbFormat = (BYTE*)&wfx; dmt.pbFormat = (BYTE*)&wfx;
for (u = 0; u < dwEffectsCount; u++) { for (u = 0; u < dwEffectsCount; u++) {
TRACE("%d: 0x%08x, %s\n", u, pDSFXDesc[u].dwFlags, dump_DSFX_guid(&pDSFXDesc[u])); TRACE("%ld: 0x%08lx, %s\n", u, pDSFXDesc[u].dwFlags, dump_DSFX_guid(&pDSFXDesc[u]));
hr2 = CoCreateInstance(&pDSFXDesc[u].guidDSFXClass, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaObject, (LPVOID*)&filters[u].obj); hr2 = CoCreateInstance(&pDSFXDesc[u].guidDSFXClass, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaObject, (LPVOID*)&filters[u].obj);
...@@ -874,7 +874,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_AcquireResources(IDirectSoundBuffer ...@@ -874,7 +874,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_AcquireResources(IDirectSoundBuffer
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DWORD u; DWORD u;
FIXME("(%p,%08u,%u,%p): stub, faking success\n",This,dwFlags,dwEffectsCount,pdwResultCodes); FIXME("(%p,%08lu,%lu,%p): stub, faking success\n",This,dwFlags,dwEffectsCount,pdwResultCodes);
if (pdwResultCodes) if (pdwResultCodes)
for (u=0; u<dwEffectsCount; u++) pdwResultCodes[u] = DSFXR_UNKNOWN; for (u=0; u<dwEffectsCount; u++) pdwResultCodes[u] = DSFXR_UNKNOWN;
...@@ -889,7 +889,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetObjectInPath(IDirectSoundBuffer8 ...@@ -889,7 +889,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetObjectInPath(IDirectSoundBuffer8
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DWORD i, count = 0; DWORD i, count = 0;
TRACE("(%p,%s,%u,%s,%p)\n", This, debugstr_guid(clsid), index, debugstr_guid(iid), out); TRACE("(%p,%s,%lu,%s,%p)\n", This, debugstr_guid(clsid), index, debugstr_guid(iid), out);
if (!out) if (!out)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -926,7 +926,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCaps(IDirectSoundBuffer8 *iface, ...@@ -926,7 +926,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCaps(IDirectSoundBuffer8 *iface,
} }
if (caps->dwSize < sizeof(*caps)) { if (caps->dwSize < sizeof(*caps)) {
WARN("invalid parameter: caps->dwSize = %d\n",caps->dwSize); WARN("invalid parameter: caps->dwSize = %ld\n",caps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -1041,7 +1041,7 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds ...@@ -1041,7 +1041,7 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
TRACE("(%p,%p,%p)\n", device, dsbd, buffer); TRACE("(%p,%p,%p)\n", device, dsbd, buffer);
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) { if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes); WARN("invalid parameter: dsbd->dwBufferBytes = %ld\n", dsbd->dwBufferBytes);
return DSERR_INVALIDPARAM; /* FIXME: which error? */ return DSERR_INVALIDPARAM; /* FIXME: which error? */
} }
...@@ -1089,7 +1089,7 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds ...@@ -1089,7 +1089,7 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
if (wfex->wBitsPerSample==16) capf |= DSCAPS_SECONDARY16BIT; if (wfex->wBitsPerSample==16) capf |= DSCAPS_SECONDARY16BIT;
else capf |= DSCAPS_SECONDARY8BIT; else capf |= DSCAPS_SECONDARY8BIT;
TRACE("capf = 0x%08x, device->drvcaps.dwFlags = 0x%08x\n", capf, device->drvcaps.dwFlags); TRACE("capf = 0x%08lx, device->drvcaps.dwFlags = 0x%08lx\n", capf, device->drvcaps.dwFlags);
/* Allocate an empty buffer */ /* Allocate an empty buffer */
bufsize = (sizeof(*(dsb->buffer)) + sizeof(void *) - 1) & ~(sizeof(void *) - 1); bufsize = (sizeof(*(dsb->buffer)) + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
...@@ -1167,7 +1167,7 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This) ...@@ -1167,7 +1167,7 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
ULONG ref = InterlockedIncrement(&This->numIfaces); ULONG ref = InterlockedIncrement(&This->numIfaces);
if (ref > 1) if (ref > 1)
WARN("Destroying buffer with %u in use interfaces\n", ref - 1); WARN("Destroying buffer with %lu in use interfaces\n", ref - 1);
if (This->dsbd.dwFlags & DSBCAPS_LOCHARDWARE) if (This->dsbd.dwFlags & DSBCAPS_LOCHARDWARE)
This->device->drvcaps.dwFreeHwMixingAllBuffers++; This->device->drvcaps.dwFreeHwMixingAllBuffers++;
...@@ -1307,7 +1307,7 @@ static ULONG WINAPI IKsPropertySetImpl_AddRef(IKsPropertySet *iface) ...@@ -1307,7 +1307,7 @@ static ULONG WINAPI IKsPropertySetImpl_AddRef(IKsPropertySet *iface)
IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface); IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface);
ULONG ref = InterlockedIncrement(&This->refiks); ULONG ref = InterlockedIncrement(&This->refiks);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -1324,7 +1324,7 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface) ...@@ -1324,7 +1324,7 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface)
ref = capped_refcount_dec(&This->refiks); ref = capped_refcount_dec(&This->refiks);
if(!ref) if(!ref)
capped_refcount_dec(&This->numIfaces); capped_refcount_dec(&This->numIfaces);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -1332,7 +1332,7 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface) ...@@ -1332,7 +1332,7 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface)
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
secondarybuffer_destroy(This); secondarybuffer_destroy(This);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -1343,7 +1343,7 @@ static HRESULT WINAPI IKsPropertySetImpl_Get(IKsPropertySet *iface, REFGUID guid ...@@ -1343,7 +1343,7 @@ static HRESULT WINAPI IKsPropertySetImpl_Get(IKsPropertySet *iface, REFGUID guid
{ {
IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface); IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface);
TRACE("(iface=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n", TRACE("(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned); This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
...@@ -1355,7 +1355,7 @@ static HRESULT WINAPI IKsPropertySetImpl_Set(IKsPropertySet *iface, REFGUID guid ...@@ -1355,7 +1355,7 @@ static HRESULT WINAPI IKsPropertySetImpl_Set(IKsPropertySet *iface, REFGUID guid
{ {
IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface); IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface);
TRACE("(%p,%s,%d,%p,%d,%p,%d)\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData); TRACE("(%p,%s,%ld,%p,%ld,%p,%ld)\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
...@@ -1365,7 +1365,7 @@ static HRESULT WINAPI IKsPropertySetImpl_QuerySupport(IKsPropertySet *iface, REF ...@@ -1365,7 +1365,7 @@ static HRESULT WINAPI IKsPropertySetImpl_QuerySupport(IKsPropertySet *iface, REF
{ {
IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface); IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface);
TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport); TRACE("(%p,%s,%ld,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
......
...@@ -136,7 +136,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(IDirectSoundNotify *iface) ...@@ -136,7 +136,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(IDirectSoundNotify *iface)
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface);
ULONG ref = InterlockedIncrement(&This->refn); ULONG ref = InterlockedIncrement(&This->refn);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -149,7 +149,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(IDirectSoundNotify *iface) ...@@ -149,7 +149,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(IDirectSoundNotify *iface)
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface);
ULONG ref = InterlockedDecrement(&This->refn); ULONG ref = InterlockedDecrement(&This->refn);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
capturebuffer_destroy(This); capturebuffer_destroy(This);
...@@ -161,7 +161,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou ...@@ -161,7 +161,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou
DWORD howmuch, const DSBPOSITIONNOTIFY *notify) DWORD howmuch, const DSBPOSITIONNOTIFY *notify)
{ {
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface);
TRACE("(%p,0x%08x,%p)\n",This,howmuch,notify); TRACE("(%p,0x%08lx,%p)\n",This,howmuch,notify);
if (howmuch > 0 && notify == NULL) { if (howmuch > 0 && notify == NULL) {
WARN("invalid parameter: notify == NULL\n"); WARN("invalid parameter: notify == NULL\n");
...@@ -171,7 +171,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou ...@@ -171,7 +171,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou
if (TRACE_ON(dsound)) { if (TRACE_ON(dsound)) {
unsigned int i; unsigned int i;
for (i=0;i<howmuch;i++) for (i=0;i<howmuch;i++)
TRACE("notify at %d to %p\n", TRACE("notify at %ld to %p\n",
notify[i].dwOffset,notify[i].hEventNotify); notify[i].dwOffset,notify[i].hEventNotify);
} }
...@@ -262,7 +262,7 @@ static ULONG WINAPI IDirectSoundCaptureBufferImpl_AddRef(IDirectSoundCaptureBuff ...@@ -262,7 +262,7 @@ static ULONG WINAPI IDirectSoundCaptureBufferImpl_AddRef(IDirectSoundCaptureBuff
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -275,7 +275,7 @@ static ULONG WINAPI IDirectSoundCaptureBufferImpl_Release(IDirectSoundCaptureBuf ...@@ -275,7 +275,7 @@ static ULONG WINAPI IDirectSoundCaptureBufferImpl_Release(IDirectSoundCaptureBuf
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
capturebuffer_destroy(This); capturebuffer_destroy(This);
...@@ -295,7 +295,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetCaps(IDirectSoundCaptureB ...@@ -295,7 +295,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetCaps(IDirectSoundCaptureB
} }
if (lpDSCBCaps->dwSize < sizeof(DSCBCAPS)) { if (lpDSCBCaps->dwSize < sizeof(DSCBCAPS)) {
WARN("invalid parameter: lpDSCBCaps->dwSize = %d\n", lpDSCBCaps->dwSize); WARN("invalid parameter: lpDSCBCaps->dwSize = %ld\n", lpDSCBCaps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -341,7 +341,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetCurrentPosition(IDirectSo ...@@ -341,7 +341,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetCurrentPosition(IDirectSo
LeaveCriticalSection(&This->device->lock); LeaveCriticalSection(&This->device->lock);
TRACE("cappos=%d readpos=%d\n", (lpdwCapturePosition?*lpdwCapturePosition:-1), (lpdwReadPosition?*lpdwReadPosition:-1)); TRACE("cappos=%ld readpos=%ld\n", (lpdwCapturePosition?*lpdwCapturePosition:-1), (lpdwReadPosition?*lpdwReadPosition:-1));
TRACE("returning DS_OK\n"); TRACE("returning DS_OK\n");
return DS_OK; return DS_OK;
...@@ -353,7 +353,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetFormat(IDirectSoundCaptur ...@@ -353,7 +353,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetFormat(IDirectSoundCaptur
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%p,0x%08x,%p)\n", This, lpwfxFormat, dwSizeAllocated, lpdwSizeWritten); TRACE("(%p,%p,0x%08lx,%p)\n", This, lpwfxFormat, dwSizeAllocated, lpdwSizeWritten);
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
...@@ -376,7 +376,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetFormat(IDirectSoundCaptur ...@@ -376,7 +376,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetFormat(IDirectSoundCaptur
} }
} }
TRACE("returning %08x\n", hres); TRACE("returning %08lx\n", hres);
return hres; return hres;
} }
...@@ -400,7 +400,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetStatus(IDirectSoundCaptur ...@@ -400,7 +400,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetStatus(IDirectSoundCaptur
*lpdwStatus = 0; *lpdwStatus = 0;
EnterCriticalSection(&(This->device->lock)); EnterCriticalSection(&(This->device->lock));
TRACE("old This->device->state=%s, old lpdwStatus=%08x\n", TRACE("old This->device->state=%s, old lpdwStatus=%08lx\n",
captureStateString[This->device->state],*lpdwStatus); captureStateString[This->device->state],*lpdwStatus);
if ((This->device->state == STATE_STARTING) || if ((This->device->state == STATE_STARTING) ||
(This->device->state == STATE_CAPTURING)) { (This->device->state == STATE_CAPTURING)) {
...@@ -408,11 +408,11 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetStatus(IDirectSoundCaptur ...@@ -408,11 +408,11 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetStatus(IDirectSoundCaptur
if (This->flags & DSCBSTART_LOOPING) if (This->flags & DSCBSTART_LOOPING)
*lpdwStatus |= DSCBSTATUS_LOOPING; *lpdwStatus |= DSCBSTATUS_LOOPING;
} }
TRACE("new This->device->state=%s, new lpdwStatus=%08x\n", TRACE("new This->device->state=%s, new lpdwStatus=%08lx\n",
captureStateString[This->device->state],*lpdwStatus); captureStateString[This->device->state],*lpdwStatus);
LeaveCriticalSection(&(This->device->lock)); LeaveCriticalSection(&(This->device->lock));
TRACE("status=%x\n", *lpdwStatus); TRACE("status=%lx\n", *lpdwStatus);
TRACE("returning DS_OK\n"); TRACE("returning DS_OK\n");
return DS_OK; return DS_OK;
} }
...@@ -434,7 +434,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Lock(IDirectSoundCaptureBuff ...@@ -434,7 +434,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Lock(IDirectSoundCaptureBuff
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE( "(%p,%08u,%08u,%p,%p,%p,%p,0x%08x) at %d\n", This, dwReadCusor, TRACE( "(%p,%08lu,%08lu,%p,%p,%p,%p,0x%08lx) at %ld\n", This, dwReadCusor,
dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2, dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2,
lpdwAudioBytes2, dwFlags, GetTickCount() ); lpdwAudioBytes2, dwFlags, GetTickCount() );
...@@ -477,7 +477,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Lock(IDirectSoundCaptureBuff ...@@ -477,7 +477,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Lock(IDirectSoundCaptureBuff
LeaveCriticalSection(&(This->device->lock)); LeaveCriticalSection(&(This->device->lock));
TRACE("returning %08x\n", hres); TRACE("returning %08lx\n", hres);
return hres; return hres;
} }
...@@ -487,7 +487,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Start(IDirectSoundCaptureBuf ...@@ -487,7 +487,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Start(IDirectSoundCaptureBuf
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
HRESULT hres; HRESULT hres;
TRACE( "(%p,0x%08x)\n", This, dwFlags ); TRACE( "(%p,0x%08lx)\n", This, dwFlags );
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
...@@ -515,7 +515,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Start(IDirectSoundCaptureBuf ...@@ -515,7 +515,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Start(IDirectSoundCaptureBuf
hres = IAudioClient_Start(This->device->client); hres = IAudioClient_Start(This->device->client);
if(FAILED(hres)){ if(FAILED(hres)){
WARN("Start failed: %08x\n", hres); WARN("Start failed: %08lx\n", hres);
LeaveCriticalSection(&This->device->lock); LeaveCriticalSection(&This->device->lock);
return hres; return hres;
} }
...@@ -572,7 +572,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Unlock(IDirectSoundCaptureBu ...@@ -572,7 +572,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Unlock(IDirectSoundCaptureBu
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE( "(%p,%p,%08u,%p,%08u)\n", This, lpvAudioPtr1, dwAudioBytes1, TRACE( "(%p,%p,%08lu,%p,%08lu)\n", This, lpvAudioPtr1, dwAudioBytes1,
lpvAudioPtr2, dwAudioBytes2 ); lpvAudioPtr2, dwAudioBytes2 );
if (lpvAudioPtr1 == NULL) { if (lpvAudioPtr1 == NULL) {
...@@ -585,7 +585,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Unlock(IDirectSoundCaptureBu ...@@ -585,7 +585,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_Unlock(IDirectSoundCaptureBu
hres = DSERR_INVALIDCALL; hres = DSERR_INVALIDCALL;
} }
TRACE("returning %08x\n", hres); TRACE("returning %08lx\n", hres);
return hres; return hres;
} }
...@@ -594,7 +594,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetObjectInPath(IDirectSound ...@@ -594,7 +594,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetObjectInPath(IDirectSound
{ {
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
FIXME( "(%p,%s,%u,%s,%p): stub\n", This, debugstr_guid(rguidObject), FIXME( "(%p,%s,%lu,%s,%p): stub\n", This, debugstr_guid(rguidObject),
dwIndex, debugstr_guid(rguidInterface), ppObject ); dwIndex, debugstr_guid(rguidInterface), ppObject );
if (!ppObject) if (!ppObject)
...@@ -609,7 +609,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetFXStatus(IDirectSoundCapt ...@@ -609,7 +609,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetFXStatus(IDirectSoundCapt
{ {
IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
FIXME( "(%p,%u,%p): stub\n", This, dwFXCount, pdwFXStatus ); FIXME( "(%p,%lu,%p): stub\n", This, dwFXCount, pdwFXStatus );
return DS_OK; return DS_OK;
} }
...@@ -643,7 +643,7 @@ static void capture_CheckNotify(IDirectSoundCaptureBufferImpl *This, DWORD from, ...@@ -643,7 +643,7 @@ static void capture_CheckNotify(IDirectSoundCaptureBufferImpl *This, DWORD from,
for (i = 0; i < This->nrofnotifies; ++i) { for (i = 0; i < This->nrofnotifies; ++i) {
LPDSBPOSITIONNOTIFY event = This->notifies + i; LPDSBPOSITIONNOTIFY event = This->notifies + i;
DWORD offset = event->dwOffset; DWORD offset = event->dwOffset;
TRACE("checking %d, position %d, event = %p\n", i, offset, event->hEventNotify); TRACE("checking %d, position %ld, event = %p\n", i, offset, event->hEventNotify);
if (offset == DSBPN_OFFSETSTOP) { if (offset == DSBPN_OFFSETSTOP) {
if (!from && !len) { if (!from && !len) {
...@@ -698,8 +698,8 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( ...@@ -698,8 +698,8 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
wfex = lpcDSCBufferDesc->lpwfxFormat; wfex = lpcDSCBufferDesc->lpwfxFormat;
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d," TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
"bytespersec=%d,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
wfex->wFormatTag, wfex->nChannels, wfex->nSamplesPerSec, wfex->wFormatTag, wfex->nChannels, wfex->nSamplesPerSec,
wfex->nAvgBytesPerSec, wfex->nBlockAlign, wfex->nAvgBytesPerSec, wfex->nBlockAlign,
wfex->wBitsPerSample, wfex->cbSize); wfex->wBitsPerSample, wfex->cbSize);
...@@ -743,7 +743,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( ...@@ -743,7 +743,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
err = IMMDevice_Activate(device->mmdevice, &IID_IAudioClient, err = IMMDevice_Activate(device->mmdevice, &IID_IAudioClient,
CLSCTX_INPROC_SERVER, NULL, (void**)&device->client); CLSCTX_INPROC_SERVER, NULL, (void**)&device->client);
if(FAILED(err)){ if(FAILED(err)){
WARN("Activate failed: %08x\n", err); WARN("Activate failed: %08lx\n", err);
HeapFree(GetProcessHeap(), 0, This->pdscbd); HeapFree(GetProcessHeap(), 0, This->pdscbd);
This->device->capture_buffer = 0; This->device->capture_buffer = 0;
HeapFree( GetProcessHeap(), 0, This ); HeapFree( GetProcessHeap(), 0, This );
...@@ -754,7 +754,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( ...@@ -754,7 +754,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST | AUDCLNT_STREAMFLAGS_EVENTCALLBACK, AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST | AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
200 * 100000, 0, device->pwfx, NULL); 200 * 100000, 0, device->pwfx, NULL);
if(FAILED(err)){ if(FAILED(err)){
WARN("Initialize failed: %08x\n", err); WARN("Initialize failed: %08lx\n", err);
IAudioClient_Release(device->client); IAudioClient_Release(device->client);
device->client = NULL; device->client = NULL;
HeapFree(GetProcessHeap(), 0, This->pdscbd); HeapFree(GetProcessHeap(), 0, This->pdscbd);
...@@ -769,7 +769,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( ...@@ -769,7 +769,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
err = IAudioClient_SetEventHandle(device->client, This->sleepev); err = IAudioClient_SetEventHandle(device->client, This->sleepev);
if(FAILED(err)){ if(FAILED(err)){
WARN("SetEventHandle failed: %08x\n", err); WARN("SetEventHandle failed: %08lx\n", err);
IAudioClient_Release(device->client); IAudioClient_Release(device->client);
device->client = NULL; device->client = NULL;
CloseHandle(This->sleepev); CloseHandle(This->sleepev);
...@@ -782,7 +782,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( ...@@ -782,7 +782,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
err = IAudioClient_GetService(device->client, &IID_IAudioCaptureClient, err = IAudioClient_GetService(device->client, &IID_IAudioCaptureClient,
(void**)&device->capture); (void**)&device->capture);
if(FAILED(err)){ if(FAILED(err)){
WARN("GetService failed: %08x\n", err); WARN("GetService failed: %08lx\n", err);
IAudioClient_Release(device->client); IAudioClient_Release(device->client);
device->client = NULL; device->client = NULL;
CloseHandle(This->sleepev); CloseHandle(This->sleepev);
...@@ -793,7 +793,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( ...@@ -793,7 +793,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
} }
buflen = lpcDSCBufferDesc->dwBufferBytes; buflen = lpcDSCBufferDesc->dwBufferBytes;
TRACE("desired buflen=%d, old buffer=%p\n", buflen, device->buffer); TRACE("desired buflen=%ld, old buffer=%p\n", buflen, device->buffer);
if (device->buffer) if (device->buffer)
newbuf = HeapReAlloc(GetProcessHeap(),0,device->buffer,buflen); newbuf = HeapReAlloc(GetProcessHeap(),0,device->buffer,buflen);
else else
...@@ -854,7 +854,7 @@ static ULONG DirectSoundCaptureDevice_Release( ...@@ -854,7 +854,7 @@ static ULONG DirectSoundCaptureDevice_Release(
DirectSoundCaptureDevice * device) DirectSoundCaptureDevice * device)
{ {
ULONG ref = InterlockedDecrement(&(device->ref)); ULONG ref = InterlockedDecrement(&(device->ref));
TRACE("(%p) ref %d\n", device, ref); TRACE("(%p) ref %ld\n", device, ref);
if (!ref) { if (!ref) {
TRACE("deleting object\n"); TRACE("deleting object\n");
...@@ -900,7 +900,7 @@ static HRESULT DSOUND_capture_data(DirectSoundCaptureDevice *device) ...@@ -900,7 +900,7 @@ static HRESULT DSOUND_capture_data(DirectSoundCaptureDevice *device)
hr = IAudioCaptureClient_GetBuffer(device->capture, &buf, &packet_frames, hr = IAudioCaptureClient_GetBuffer(device->capture, &buf, &packet_frames,
&flags, NULL, NULL); &flags, NULL, NULL);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("GetBuffer failed: %08x\n", hr); WARN("GetBuffer failed: %08lx\n", hr);
return hr; return hr;
} }
if(hr == AUDCLNT_S_BUFFER_EMPTY) if(hr == AUDCLNT_S_BUFFER_EMPTY)
...@@ -936,7 +936,7 @@ static HRESULT DSOUND_capture_data(DirectSoundCaptureDevice *device) ...@@ -936,7 +936,7 @@ static HRESULT DSOUND_capture_data(DirectSoundCaptureDevice *device)
hr = IAudioCaptureClient_ReleaseBuffer(device->capture, packet_frames); hr = IAudioCaptureClient_ReleaseBuffer(device->capture, packet_frames);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("ReleaseBuffer failed: %08x\n", hr); WARN("ReleaseBuffer failed: %08lx\n", hr);
return hr; return hr;
} }
} }
...@@ -953,7 +953,7 @@ static DWORD WINAPI DSOUND_capture_thread(void *user) ...@@ -953,7 +953,7 @@ static DWORD WINAPI DSOUND_capture_thread(void *user)
hr = IAudioClient_GetDevicePeriod(buffer->device->client, &period, NULL); hr = IAudioClient_GetDevicePeriod(buffer->device->client, &period, NULL);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("GetDevicePeriod failed: %08x\n", hr); WARN("GetDevicePeriod failed: %08lx\n", hr);
wait_ms = 5; wait_ms = 5;
}else }else
wait_ms = MulDiv(5, period, 10000); wait_ms = MulDiv(5, period, 10000);
...@@ -971,7 +971,7 @@ static DWORD WINAPI DSOUND_capture_thread(void *user) ...@@ -971,7 +971,7 @@ static DWORD WINAPI DSOUND_capture_thread(void *user)
LeaveCriticalSection(&buffer->device->lock); LeaveCriticalSection(&buffer->device->lock);
}else if(ret != WAIT_TIMEOUT) }else if(ret != WAIT_TIMEOUT)
WARN("WaitForSingleObject failed: %u\n", GetLastError()); WARN("WaitForSingleObject failed: %lu\n", GetLastError());
} }
return 0; return 0;
...@@ -1141,7 +1141,7 @@ static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface) ...@@ -1141,7 +1141,7 @@ static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface)
IDirectSoundCaptureImpl *This = impl_from_IUnknown(iface); IDirectSoundCaptureImpl *This = impl_from_IUnknown(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -1153,7 +1153,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface) ...@@ -1153,7 +1153,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface)
IDirectSoundCaptureImpl *This = impl_from_IUnknown(iface); IDirectSoundCaptureImpl *This = impl_from_IUnknown(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
capture_destroy(This); capture_destroy(This);
...@@ -1188,7 +1188,7 @@ static ULONG WINAPI IDirectSoundCaptureImpl_AddRef(IDirectSoundCapture *iface) ...@@ -1188,7 +1188,7 @@ static ULONG WINAPI IDirectSoundCaptureImpl_AddRef(IDirectSoundCapture *iface)
IDirectSoundCaptureImpl *This = impl_from_IDirectSoundCapture(iface); IDirectSoundCaptureImpl *This = impl_from_IDirectSoundCapture(iface);
ULONG ref = InterlockedIncrement(&This->refdsc); ULONG ref = InterlockedIncrement(&This->refdsc);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -1200,7 +1200,7 @@ static ULONG WINAPI IDirectSoundCaptureImpl_Release(IDirectSoundCapture *iface) ...@@ -1200,7 +1200,7 @@ static ULONG WINAPI IDirectSoundCaptureImpl_Release(IDirectSoundCapture *iface)
IDirectSoundCaptureImpl *This = impl_from_IDirectSoundCapture(iface); IDirectSoundCaptureImpl *This = impl_from_IDirectSoundCapture(iface);
ULONG ref = InterlockedDecrement(&This->refdsc); ULONG ref = InterlockedDecrement(&This->refdsc);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
capture_destroy(This); capture_destroy(This);
...@@ -1266,7 +1266,7 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(IDirectSoundCapture *iface ...@@ -1266,7 +1266,7 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(IDirectSoundCapture *iface
} }
if (lpDSCCaps->dwSize < sizeof(*lpDSCCaps)) { if (lpDSCCaps->dwSize < sizeof(*lpDSCCaps)) {
WARN("invalid parameter: lpDSCCaps->dwSize = %d\n", lpDSCCaps->dwSize); WARN("invalid parameter: lpDSCCaps->dwSize = %ld\n", lpDSCCaps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -1274,7 +1274,7 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(IDirectSoundCapture *iface ...@@ -1274,7 +1274,7 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(IDirectSoundCapture *iface
lpDSCCaps->dwFormats = This->device->drvcaps.dwFormats; lpDSCCaps->dwFormats = This->device->drvcaps.dwFormats;
lpDSCCaps->dwChannels = This->device->drvcaps.dwChannels; lpDSCCaps->dwChannels = This->device->drvcaps.dwChannels;
TRACE("(flags=0x%08x,format=0x%08x,channels=%d)\n",lpDSCCaps->dwFlags, TRACE("(flags=0x%08lx,format=0x%08lx,channels=%ld)\n",lpDSCCaps->dwFlags,
lpDSCCaps->dwFormats, lpDSCCaps->dwChannels); lpDSCCaps->dwFormats, lpDSCCaps->dwChannels);
return DS_OK; return DS_OK;
......
...@@ -60,7 +60,7 @@ static const char * dumpCooperativeLevel(DWORD level) ...@@ -60,7 +60,7 @@ static const char * dumpCooperativeLevel(DWORD level)
LE(DSSCL_WRITEPRIMARY); LE(DSSCL_WRITEPRIMARY);
} }
#undef LE #undef LE
return wine_dbg_sprintf("Unknown(%08x)", level); return wine_dbg_sprintf("Unknown(%08lx)", level);
} }
static void _dump_DSCAPS(DWORD xmask) { static void _dump_DSCAPS(DWORD xmask) {
...@@ -190,7 +190,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice) ...@@ -190,7 +190,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
static ULONG DirectSoundDevice_AddRef(DirectSoundDevice * device) static ULONG DirectSoundDevice_AddRef(DirectSoundDevice * device)
{ {
ULONG ref = InterlockedIncrement(&(device->ref)); ULONG ref = InterlockedIncrement(&(device->ref));
TRACE("(%p) ref %d\n", device, ref); TRACE("(%p) ref %ld\n", device, ref);
return ref; return ref;
} }
...@@ -198,7 +198,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device) ...@@ -198,7 +198,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
{ {
HRESULT hr; HRESULT hr;
ULONG ref = InterlockedDecrement(&(device->ref)); ULONG ref = InterlockedDecrement(&(device->ref));
TRACE("(%p) ref %d\n", device, ref); TRACE("(%p) ref %ld\n", device, ref);
if (!ref) { if (!ref) {
int i; int i;
...@@ -328,7 +328,7 @@ static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGU ...@@ -328,7 +328,7 @@ static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGU
HeapFree(GetProcessHeap(), 0, device); HeapFree(GetProcessHeap(), 0, device);
LeaveCriticalSection(&DSOUND_renderers_lock); LeaveCriticalSection(&DSOUND_renderers_lock);
IMMDevice_Release(mmdevice); IMMDevice_Release(mmdevice);
WARN("DSOUND_ReopenDevice failed: %08x\n", hr); WARN("DSOUND_ReopenDevice failed: %08lx\n", hr);
return hr; return hr;
} }
...@@ -426,11 +426,11 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer( ...@@ -426,11 +426,11 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
*ppdsb = NULL; *ppdsb = NULL;
if (TRACE_ON(dsound)) { if (TRACE_ON(dsound)) {
TRACE("(structsize=%d)\n",dsbd->dwSize); TRACE("(structsize=%ld)\n",dsbd->dwSize);
TRACE("(flags=0x%08x:\n",dsbd->dwFlags); TRACE("(flags=0x%08lx:\n",dsbd->dwFlags);
_dump_DSBCAPS(dsbd->dwFlags); _dump_DSBCAPS(dsbd->dwFlags);
TRACE(")\n"); TRACE(")\n");
TRACE("(bufferbytes=%d)\n",dsbd->dwBufferBytes); TRACE("(bufferbytes=%ld)\n",dsbd->dwBufferBytes);
TRACE("(lpwfxFormat=%p)\n",dsbd->lpwfxFormat); TRACE("(lpwfxFormat=%p)\n",dsbd->lpwfxFormat);
} }
...@@ -526,8 +526,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer( ...@@ -526,8 +526,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
} }
} }
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d," TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
"bytespersec=%d,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
dsbd->lpwfxFormat->wFormatTag, dsbd->lpwfxFormat->nChannels, dsbd->lpwfxFormat->wFormatTag, dsbd->lpwfxFormat->nChannels,
dsbd->lpwfxFormat->nSamplesPerSec, dsbd->lpwfxFormat->nSamplesPerSec,
dsbd->lpwfxFormat->nAvgBytesPerSec, dsbd->lpwfxFormat->nAvgBytesPerSec,
...@@ -710,7 +710,7 @@ static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface) ...@@ -710,7 +710,7 @@ static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface)
IDirectSoundImpl *This = impl_from_IUnknown(iface); IDirectSoundImpl *This = impl_from_IUnknown(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -723,7 +723,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface) ...@@ -723,7 +723,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface)
IDirectSoundImpl *This = impl_from_IUnknown(iface); IDirectSoundImpl *This = impl_from_IUnknown(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
directsound_destroy(This); directsound_destroy(This);
...@@ -759,7 +759,7 @@ static ULONG WINAPI IDirectSound8Impl_AddRef(IDirectSound8 *iface) ...@@ -759,7 +759,7 @@ static ULONG WINAPI IDirectSound8Impl_AddRef(IDirectSound8 *iface)
IDirectSoundImpl *This = impl_from_IDirectSound8(iface); IDirectSoundImpl *This = impl_from_IDirectSound8(iface);
ULONG ref = InterlockedIncrement(&This->refds); ULONG ref = InterlockedIncrement(&This->refds);
TRACE("(%p) refds=%d\n", This, ref); TRACE("(%p) refds=%ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -772,7 +772,7 @@ static ULONG WINAPI IDirectSound8Impl_Release(IDirectSound8 *iface) ...@@ -772,7 +772,7 @@ static ULONG WINAPI IDirectSound8Impl_Release(IDirectSound8 *iface)
IDirectSoundImpl *This = impl_from_IDirectSound8(iface); IDirectSoundImpl *This = impl_from_IDirectSound8(iface);
ULONG ref = InterlockedDecrement(&(This->refds)); ULONG ref = InterlockedDecrement(&(This->refds));
TRACE("(%p) refds=%d\n", This, ref); TRACE("(%p) refds=%ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
directsound_destroy(This); directsound_destroy(This);
...@@ -803,7 +803,7 @@ static HRESULT WINAPI IDirectSound8Impl_GetCaps(IDirectSound8 *iface, DSCAPS *ds ...@@ -803,7 +803,7 @@ static HRESULT WINAPI IDirectSound8Impl_GetCaps(IDirectSound8 *iface, DSCAPS *ds
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
if (dscaps->dwSize < sizeof(*dscaps)) { if (dscaps->dwSize < sizeof(*dscaps)) {
WARN("invalid parameter: dscaps->dwSize = %d\n", dscaps->dwSize); WARN("invalid parameter: dscaps->dwSize = %ld\n", dscaps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -831,7 +831,7 @@ static HRESULT WINAPI IDirectSound8Impl_GetCaps(IDirectSound8 *iface, DSCAPS *ds ...@@ -831,7 +831,7 @@ static HRESULT WINAPI IDirectSound8Impl_GetCaps(IDirectSound8 *iface, DSCAPS *ds
dscaps->dwPlayCpuOverheadSwBuffers = This->device->drvcaps.dwPlayCpuOverheadSwBuffers; dscaps->dwPlayCpuOverheadSwBuffers = This->device->drvcaps.dwPlayCpuOverheadSwBuffers;
if (TRACE_ON(dsound)) { if (TRACE_ON(dsound)) {
TRACE("(flags=0x%08x:\n", dscaps->dwFlags); TRACE("(flags=0x%08lx:\n", dscaps->dwFlags);
_dump_DSCAPS(dscaps->dwFlags); _dump_DSCAPS(dscaps->dwFlags);
TRACE(")\n"); TRACE(")\n");
} }
...@@ -919,7 +919,7 @@ static HRESULT WINAPI IDirectSound8Impl_SetSpeakerConfig(IDirectSound8 *iface, D ...@@ -919,7 +919,7 @@ static HRESULT WINAPI IDirectSound8Impl_SetSpeakerConfig(IDirectSound8 *iface, D
{ {
IDirectSoundImpl *This = impl_from_IDirectSound8(iface); IDirectSoundImpl *This = impl_from_IDirectSound8(iface);
TRACE("(%p,0x%08x)\n", This, config); TRACE("(%p,0x%08lx)\n", This, config);
if (!This->device) { if (!This->device) {
WARN("not initialized\n"); WARN("not initialized\n");
...@@ -1193,6 +1193,6 @@ void DSOUND_ParseSpeakerConfig(DirectSoundDevice *device) ...@@ -1193,6 +1193,6 @@ void DSOUND_ParseSpeakerConfig(DirectSoundDevice *device)
break; break;
default: default:
WARN("unknown speaker_config %u\n", device->speaker_config); WARN("unknown speaker_config %lu\n", device->speaker_config);
} }
} }
...@@ -174,7 +174,7 @@ static HRESULT get_mmdevenum(IMMDeviceEnumerator **devenum) ...@@ -174,7 +174,7 @@ static HRESULT get_mmdevenum(IMMDeviceEnumerator **devenum)
if(SUCCEEDED(init_hr)) if(SUCCEEDED(init_hr))
CoUninitialize(); CoUninitialize();
*devenum = NULL; *devenum = NULL;
ERR("CoCreateInstance failed: %08x\n", hr); ERR("CoCreateInstance failed: %08lx\n", hr);
return hr; return hr;
} }
...@@ -197,7 +197,7 @@ static HRESULT get_mmdevice_guid(IMMDevice *device, IPropertyStore *ps, ...@@ -197,7 +197,7 @@ static HRESULT get_mmdevice_guid(IMMDevice *device, IPropertyStore *ps,
if(!ps){ if(!ps){
hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps); hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("OpenPropertyStore failed: %08x\n", hr); WARN("OpenPropertyStore failed: %08lx\n", hr);
return hr; return hr;
} }
}else }else
...@@ -208,7 +208,7 @@ static HRESULT get_mmdevice_guid(IMMDevice *device, IPropertyStore *ps, ...@@ -208,7 +208,7 @@ static HRESULT get_mmdevice_guid(IMMDevice *device, IPropertyStore *ps,
hr = IPropertyStore_GetValue(ps, &PKEY_AudioEndpoint_GUID, &pv); hr = IPropertyStore_GetValue(ps, &PKEY_AudioEndpoint_GUID, &pv);
if(FAILED(hr)){ if(FAILED(hr)){
IPropertyStore_Release(ps); IPropertyStore_Release(ps);
WARN("GetValue(GUID) failed: %08x\n", hr); WARN("GetValue(GUID) failed: %08lx\n", hr);
return hr; return hr;
} }
...@@ -276,7 +276,7 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest) ...@@ -276,7 +276,7 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(devenum, hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(devenum,
flow, role, &device); flow, role, &device);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("GetDefaultAudioEndpoint failed: %08x\n", hr); WARN("GetDefaultAudioEndpoint failed: %08lx\n", hr);
release_mmdevenum(devenum, init_hr); release_mmdevenum(devenum, init_hr);
return DSERR_NODRIVER; return DSERR_NODRIVER;
} }
...@@ -357,7 +357,7 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device) ...@@ -357,7 +357,7 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device)
hr = IMMDeviceEnumerator_EnumAudioEndpoints(devenum, flow, hr = IMMDeviceEnumerator_EnumAudioEndpoints(devenum, flow,
DEVICE_STATE_ACTIVE, &coll); DEVICE_STATE_ACTIVE, &coll);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("EnumAudioEndpoints failed: %08x\n", hr); WARN("EnumAudioEndpoints failed: %08lx\n", hr);
release_mmdevenum(devenum, init_hr); release_mmdevenum(devenum, init_hr);
return hr; return hr;
} }
...@@ -366,7 +366,7 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device) ...@@ -366,7 +366,7 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device)
if(FAILED(hr)){ if(FAILED(hr)){
IMMDeviceCollection_Release(coll); IMMDeviceCollection_Release(coll);
release_mmdevenum(devenum, init_hr); release_mmdevenum(devenum, init_hr);
WARN("GetCount failed: %08x\n", hr); WARN("GetCount failed: %08lx\n", hr);
return hr; return hr;
} }
...@@ -412,7 +412,7 @@ static BOOL send_device(IMMDevice *device, GUID *guid, ...@@ -412,7 +412,7 @@ static BOOL send_device(IMMDevice *device, GUID *guid,
hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps); hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("OpenPropertyStore failed: %08x\n", hr); WARN("OpenPropertyStore failed: %08lx\n", hr);
return TRUE; return TRUE;
} }
...@@ -426,7 +426,7 @@ static BOOL send_device(IMMDevice *device, GUID *guid, ...@@ -426,7 +426,7 @@ static BOOL send_device(IMMDevice *device, GUID *guid,
(const PROPERTYKEY *)&DEVPKEY_Device_FriendlyName, &pv); (const PROPERTYKEY *)&DEVPKEY_Device_FriendlyName, &pv);
if(FAILED(hr)){ if(FAILED(hr)){
IPropertyStore_Release(ps); IPropertyStore_Release(ps);
WARN("GetValue(FriendlyName) failed: %08x\n", hr); WARN("GetValue(FriendlyName) failed: %08lx\n", hr);
return TRUE; return TRUE;
} }
...@@ -461,7 +461,7 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, ...@@ -461,7 +461,7 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
DEVICE_STATE_ACTIVE, &coll); DEVICE_STATE_ACTIVE, &coll);
if(FAILED(hr)){ if(FAILED(hr)){
release_mmdevenum(devenum, init_hr); release_mmdevenum(devenum, init_hr);
WARN("EnumAudioEndpoints failed: %08x\n", hr); WARN("EnumAudioEndpoints failed: %08lx\n", hr);
return DS_OK; return DS_OK;
} }
...@@ -469,7 +469,7 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, ...@@ -469,7 +469,7 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
if(FAILED(hr)){ if(FAILED(hr)){
IMMDeviceCollection_Release(coll); IMMDeviceCollection_Release(coll);
release_mmdevenum(devenum, init_hr); release_mmdevenum(devenum, init_hr);
WARN("GetCount failed: %08x\n", hr); WARN("GetCount failed: %08lx\n", hr);
return DS_OK; return DS_OK;
} }
...@@ -500,7 +500,7 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, ...@@ -500,7 +500,7 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
hr = IMMDeviceCollection_Item(coll, i, &device); hr = IMMDeviceCollection_Item(coll, i, &device);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("Item failed: %08x\n", hr); WARN("Item failed: %08lx\n", hr);
continue; continue;
} }
...@@ -770,7 +770,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -770,7 +770,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/ */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpvReserved); TRACE("(%p %ld %p)\n", hInstDLL, fdwReason, lpvReserved);
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
......
...@@ -107,7 +107,7 @@ static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface) ...@@ -107,7 +107,7 @@ static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface)
IDirectSoundFullDuplexImpl *This = impl_from_IUnknown(iface); IDirectSoundFullDuplexImpl *This = impl_from_IUnknown(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -119,7 +119,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface) ...@@ -119,7 +119,7 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface)
IDirectSoundFullDuplexImpl *This = impl_from_IUnknown(iface); IDirectSoundFullDuplexImpl *This = impl_from_IUnknown(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
fullduplex_destroy(This); fullduplex_destroy(This);
...@@ -154,7 +154,7 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_AddRef(IDirectSoundFullDuplex *if ...@@ -154,7 +154,7 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_AddRef(IDirectSoundFullDuplex *if
IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface);
ULONG ref = InterlockedIncrement(&This->refdsfd); ULONG ref = InterlockedIncrement(&This->refdsfd);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -166,7 +166,7 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_Release(IDirectSoundFullDuplex *i ...@@ -166,7 +166,7 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_Release(IDirectSoundFullDuplex *i
IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface); IDirectSoundFullDuplexImpl *This = impl_from_IDirectSoundFullDuplex(iface);
ULONG ref = InterlockedDecrement(&This->refdsfd); ULONG ref = InterlockedDecrement(&This->refdsfd);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
fullduplex_destroy(This); fullduplex_destroy(This);
...@@ -183,7 +183,7 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize(IDirectSoundFullDupl ...@@ -183,7 +183,7 @@ static HRESULT WINAPI IDirectSoundFullDuplexImpl_Initialize(IDirectSoundFullDupl
IDirectSoundCapture8 *dsc8 = NULL; IDirectSoundCapture8 *dsc8 = NULL;
HRESULT hr; HRESULT hr;
TRACE("(%p,%s,%s,%p,%p,%p,%x,%p,%p)\n", This, debugstr_guid(capture_dev), TRACE("(%p,%s,%s,%p,%p,%p,%lx,%p,%p)\n", This, debugstr_guid(capture_dev),
debugstr_guid(render_dev), cbufdesc, bufdesc, hwnd, level, dscb8, dsb8); debugstr_guid(render_dev), cbufdesc, bufdesc, hwnd, level, dscb8, dsb8);
if (!dscb8 || !dsb8) if (!dscb8 || !dsb8)
...@@ -330,7 +330,7 @@ HRESULT WINAPI DirectSoundFullDuplexCreate(const GUID *capture_dev, const GUID * ...@@ -330,7 +330,7 @@ HRESULT WINAPI DirectSoundFullDuplexCreate(const GUID *capture_dev, const GUID *
{ {
HRESULT hr; HRESULT hr;
TRACE("(%s,%s,%p,%p,%p,%x,%p,%p,%p,%p)\n", debugstr_guid(capture_dev), TRACE("(%s,%s,%p,%p,%p,%lx,%p,%p,%p,%p)\n", debugstr_guid(capture_dev),
debugstr_guid(render_dev), cbufdesc, bufdesc, hwnd, level, dsfd, dscb8, dsb8, debugstr_guid(render_dev), cbufdesc, bufdesc, hwnd, level, dsfd, dscb8, dsb8,
outer_unk); outer_unk);
......
...@@ -47,7 +47,7 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan) ...@@ -47,7 +47,7 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan)
double temp; double temp;
TRACE("(%p)\n",volpan); TRACE("(%p)\n",volpan);
TRACE("Vol=%d Pan=%d\n", volpan->lVolume, volpan->lPan); TRACE("Vol=%ld Pan=%ld\n", volpan->lVolume, volpan->lPan);
/* the AmpFactors are expressed in 16.16 fixed point */ /* the AmpFactors are expressed in 16.16 fixed point */
/* FIXME: use calculated vol and pan ampfactors */ /* FIXME: use calculated vol and pan ampfactors */
...@@ -56,7 +56,7 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan) ...@@ -56,7 +56,7 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan)
temp = (double) (volpan->lVolume + (volpan->lPan < 0 ? volpan->lPan : 0)); temp = (double) (volpan->lVolume + (volpan->lPan < 0 ? volpan->lPan : 0));
volpan->dwTotalAmpFactor[1] = (ULONG) (pow(2.0, temp / 600.0) * 0xffff); volpan->dwTotalAmpFactor[1] = (ULONG) (pow(2.0, temp / 600.0) * 0xffff);
TRACE("left = %x, right = %x\n", volpan->dwTotalAmpFactor[0], volpan->dwTotalAmpFactor[1]); TRACE("left = %lx, right = %lx\n", volpan->dwTotalAmpFactor[0], volpan->dwTotalAmpFactor[1]);
} }
void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan) void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
...@@ -64,7 +64,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan) ...@@ -64,7 +64,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
double left,right; double left,right;
TRACE("(%p)\n",volpan); TRACE("(%p)\n",volpan);
TRACE("left=%x, right=%x\n",volpan->dwTotalAmpFactor[0],volpan->dwTotalAmpFactor[1]); TRACE("left=%lx, right=%lx\n",volpan->dwTotalAmpFactor[0],volpan->dwTotalAmpFactor[1]);
if (volpan->dwTotalAmpFactor[0]==0) if (volpan->dwTotalAmpFactor[0]==0)
left=-10000; left=-10000;
else else
...@@ -83,7 +83,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan) ...@@ -83,7 +83,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
if (volpan->lPan < -10000) if (volpan->lPan < -10000)
volpan->lPan=-10000; volpan->lPan=-10000;
TRACE("Vol=%d Pan=%d\n", volpan->lVolume, volpan->lPan); TRACE("Vol=%ld Pan=%ld\n", volpan->lVolume, volpan->lPan);
} }
/** /**
...@@ -142,7 +142,7 @@ void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb) ...@@ -142,7 +142,7 @@ void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb)
{ {
dsb->mix_channels = ichannels; dsb->mix_channels = ichannels;
if (ichannels > 32) { if (ichannels > 32) {
FIXME("Copying %u channels is unsupported, limiting to first 32\n", ichannels); FIXME("Copying %lu channels is unsupported, limiting to first 32\n", ichannels);
dsb->mix_channels = 32; dsb->mix_channels = 32;
} }
} }
...@@ -193,7 +193,7 @@ void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb) ...@@ -193,7 +193,7 @@ void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb)
else else
{ {
if (ichannels > 2) if (ichannels > 2)
FIXME("Conversion from %u to %u channels is not implemented, falling back to stereo\n", ichannels, ochannels); FIXME("Conversion from %lu to %lu channels is not implemented, falling back to stereo\n", ichannels, ochannels);
dsb->mix_channels = 2; dsb->mix_channels = 2;
} }
} }
...@@ -248,7 +248,7 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len ...@@ -248,7 +248,7 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len
} }
} }
TRACE("Not stopped: first notify: %u (%u), left notify: %u (%u), range: [%u,%u)\n", TRACE("Not stopped: first notify: %u (%lu), left notify: %u (%lu), range: [%lu,%lu)\n",
first, dsb->notifies[first].dwOffset, first, dsb->notifies[first].dwOffset,
left, dsb->notifies[left].dwOffset, left, dsb->notifies[left].dwOffset,
playpos, (playpos + len) % dsb->buflen); playpos, (playpos + len) % dsb->buflen);
...@@ -259,7 +259,7 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len ...@@ -259,7 +259,7 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len
if(dsb->notifies[check].dwOffset >= playpos + len) if(dsb->notifies[check].dwOffset >= playpos + len)
break; break;
TRACE("Signalling %p (%u)\n", dsb->notifies[check].hEventNotify, dsb->notifies[check].dwOffset); TRACE("Signalling %p (%lu)\n", dsb->notifies[check].hEventNotify, dsb->notifies[check].dwOffset);
SetEvent(dsb->notifies[check].hEventNotify); SetEvent(dsb->notifies[check].hEventNotify);
} }
} }
...@@ -269,7 +269,7 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len ...@@ -269,7 +269,7 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len
if(dsb->notifies[check].dwOffset >= (playpos + len) % dsb->buflen) if(dsb->notifies[check].dwOffset >= (playpos + len) % dsb->buflen)
break; break;
TRACE("Signalling %p (%u)\n", dsb->notifies[check].hEventNotify, dsb->notifies[check].dwOffset); TRACE("Signalling %p (%lu)\n", dsb->notifies[check].hEventNotify, dsb->notifies[check].dwOffset);
SetEvent(dsb->notifies[check].hEventNotify); SetEvent(dsb->notifies[check].hEventNotify);
} }
} }
...@@ -492,7 +492,7 @@ static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames) ...@@ -492,7 +492,7 @@ static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
UINT channels = dsb->device->pwfx->nChannels, chan; UINT channels = dsb->device->pwfx->nChannels, chan;
TRACE("(%p,%d)\n",dsb,frames); TRACE("(%p,%d)\n",dsb,frames);
TRACE("left = %x, right = %x\n", dsb->volpan.dwTotalAmpFactor[0], TRACE("left = %lx, right = %lx\n", dsb->volpan.dwTotalAmpFactor[0],
dsb->volpan.dwTotalAmpFactor[1]); dsb->volpan.dwTotalAmpFactor[1]);
if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->volpan.lPan == 0)) && if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->volpan.lPan == 0)) &&
...@@ -533,8 +533,8 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, float *mix_buffer, ...@@ -533,8 +533,8 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, float *mix_buffer,
float *ibuf; float *ibuf;
DWORD oldpos; DWORD oldpos;
TRACE("sec_mixpos=%d/%d\n", dsb->sec_mixpos, dsb->buflen); TRACE("sec_mixpos=%ld/%ld\n", dsb->sec_mixpos, dsb->buflen);
TRACE("(%p, frames=%d)\n",dsb,frames); TRACE("(%p, frames=%ld)\n",dsb,frames);
/* Resample buffer to temporary buffer specifically allocated for this purpose, if needed */ /* Resample buffer to temporary buffer specifically allocated for this purpose, if needed */
oldpos = dsb->sec_mixpos; oldpos = dsb->sec_mixpos;
...@@ -573,8 +573,8 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, float *mix_buffer, DWORD ...@@ -573,8 +573,8 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, float *mix_buffer, DWORD
{ {
DWORD primary_done = 0; DWORD primary_done = 0;
TRACE("(%p, frames=%d)\n",dsb,frames); TRACE("(%p, frames=%ld)\n",dsb,frames);
TRACE("looping=%d, leadin=%d\n", dsb->playflags, dsb->leadin); TRACE("looping=%ld, leadin=%ld\n", dsb->playflags, dsb->leadin);
/* If leading in, only mix about 20 ms, and 'skip' mixing the rest, for more fluid pointer advancement */ /* If leading in, only mix about 20 ms, and 'skip' mixing the rest, for more fluid pointer advancement */
/* FIXME: Is this needed? */ /* FIXME: Is this needed? */
...@@ -589,14 +589,14 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, float *mix_buffer, DWORD ...@@ -589,14 +589,14 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, float *mix_buffer, DWORD
dsb->leadin = FALSE; dsb->leadin = FALSE;
TRACE("frames (primary) = %i\n", frames); TRACE("frames (primary) = %li\n", frames);
/* First try to mix to the end of the buffer if possible /* First try to mix to the end of the buffer if possible
* Theoretically it would allow for better optimization * Theoretically it would allow for better optimization
*/ */
primary_done += DSOUND_MixInBuffer(dsb, mix_buffer, frames); primary_done += DSOUND_MixInBuffer(dsb, mix_buffer, frames);
TRACE("total mixed data=%d\n", primary_done); TRACE("total mixed data=%ld\n", primary_done);
/* Report back the total prebuffered amount for this buffer */ /* Report back the total prebuffered amount for this buffer */
return primary_done; return primary_done;
...@@ -620,14 +620,14 @@ static void DSOUND_MixToPrimary(const DirectSoundDevice *device, float *mix_buff ...@@ -620,14 +620,14 @@ static void DSOUND_MixToPrimary(const DirectSoundDevice *device, float *mix_buff
/* unless we find a running buffer, all have stopped */ /* unless we find a running buffer, all have stopped */
*all_stopped = TRUE; *all_stopped = TRUE;
TRACE("(frames %d)\n", frames); TRACE("(frames %ld)\n", frames);
for (i = 0; i < device->nrofbuffers; i++) { for (i = 0; i < device->nrofbuffers; i++) {
dsb = device->buffers[i]; dsb = device->buffers[i];
TRACE("MixToPrimary for %p, state=%d\n", dsb, dsb->state); TRACE("MixToPrimary for %p, state=%ld\n", dsb, dsb->state);
if (dsb->buflen && dsb->state) { if (dsb->buflen && dsb->state) {
TRACE("Checking %p, frames=%d\n", dsb, frames); TRACE("Checking %p, frames=%ld\n", dsb, frames);
AcquireSRWLockShared(&dsb->lock); AcquireSRWLockShared(&dsb->lock);
if (dsb->state != STATE_STOPPED) { if (dsb->state != STATE_STOPPED) {
...@@ -664,7 +664,7 @@ static void DSOUND_WaveQueue(DirectSoundDevice *device, LPBYTE pos, DWORD bytes) ...@@ -664,7 +664,7 @@ static void DSOUND_WaveQueue(DirectSoundDevice *device, LPBYTE pos, DWORD bytes)
hr = IAudioRenderClient_GetBuffer(device->render, bytes / device->pwfx->nBlockAlign, &buffer); hr = IAudioRenderClient_GetBuffer(device->render, bytes / device->pwfx->nBlockAlign, &buffer);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("GetBuffer failed: %08x\n", hr); WARN("GetBuffer failed: %08lx\n", hr);
return; return;
} }
...@@ -672,7 +672,7 @@ static void DSOUND_WaveQueue(DirectSoundDevice *device, LPBYTE pos, DWORD bytes) ...@@ -672,7 +672,7 @@ static void DSOUND_WaveQueue(DirectSoundDevice *device, LPBYTE pos, DWORD bytes)
hr = IAudioRenderClient_ReleaseBuffer(device->render, bytes / device->pwfx->nBlockAlign, 0); hr = IAudioRenderClient_ReleaseBuffer(device->render, bytes / device->pwfx->nBlockAlign, 0);
if(FAILED(hr)) { if(FAILED(hr)) {
ERR("ReleaseBuffer failed: %08x\n", hr); ERR("ReleaseBuffer failed: %08lx\n", hr);
IAudioRenderClient_ReleaseBuffer(device->render, 0, 0); IAudioRenderClient_ReleaseBuffer(device->render, 0, 0);
return; return;
} }
...@@ -705,7 +705,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) ...@@ -705,7 +705,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
hr = IAudioClient_GetCurrentPadding(device->client, &pad_frames); hr = IAudioClient_GetCurrentPadding(device->client, &pad_frames);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("GetCurrentPadding failed: %08x\n", hr); WARN("GetCurrentPadding failed: %08lx\n", hr);
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
return; return;
} }
...@@ -739,7 +739,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) ...@@ -739,7 +739,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
hr = IAudioRenderClient_GetBuffer(device->render, frames, (BYTE **)&buffer); hr = IAudioRenderClient_GetBuffer(device->render, frames, (BYTE **)&buffer);
if(FAILED(hr)){ if(FAILED(hr)){
WARN("GetBuffer failed: %08x\n", hr); WARN("GetBuffer failed: %08lx\n", hr);
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
return; return;
} }
...@@ -759,7 +759,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) ...@@ -759,7 +759,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
hr = IAudioRenderClient_ReleaseBuffer(device->render, frames, 0); hr = IAudioRenderClient_ReleaseBuffer(device->render, frames, 0);
if(FAILED(hr)) if(FAILED(hr))
ERR("ReleaseBuffer failed: %08x\n", hr); ERR("ReleaseBuffer failed: %08lx\n", hr);
device->pad += frames * block; device->pad += frames * block;
} else if (!device->stopped) { } else if (!device->stopped) {
...@@ -793,9 +793,9 @@ DWORD CALLBACK DSOUND_mixthread(void *p) ...@@ -793,9 +793,9 @@ DWORD CALLBACK DSOUND_mixthread(void *p)
*/ */
ret = WaitForSingleObject(dev->sleepev, dev->sleeptime); ret = WaitForSingleObject(dev->sleepev, dev->sleeptime);
if (ret == WAIT_FAILED) if (ret == WAIT_FAILED)
WARN("wait returned error %u %08x!\n", GetLastError(), GetLastError()); WARN("wait returned error %lu %08lx!\n", GetLastError(), GetLastError());
else if (ret != WAIT_OBJECT_0) else if (ret != WAIT_OBJECT_0)
WARN("wait returned %08x!\n", ret); WARN("wait returned %08lx!\n", ret);
if (!dev->ref) if (!dev->ref)
break; break;
......
...@@ -56,7 +56,7 @@ static DWORD speaker_config_to_channel_mask(DWORD speaker_config) ...@@ -56,7 +56,7 @@ static DWORD speaker_config_to_channel_mask(DWORD speaker_config)
return SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; return SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
} }
WARN("unknown speaker_config %u\n", speaker_config); WARN("unknown speaker_config %lu\n", speaker_config);
return SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; return SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
} }
...@@ -71,14 +71,14 @@ static DWORD DSOUND_FindSpeakerConfig(IMMDevice *mmdevice, int channels) ...@@ -71,14 +71,14 @@ static DWORD DSOUND_FindSpeakerConfig(IMMDevice *mmdevice, int channels)
hr = IMMDevice_OpenPropertyStore(mmdevice, STGM_READ, &store); hr = IMMDevice_OpenPropertyStore(mmdevice, STGM_READ, &store);
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("IMMDevice_OpenPropertyStore failed: %08x\n", hr); WARN("IMMDevice_OpenPropertyStore failed: %08lx\n", hr);
return def; return def;
} }
hr = IPropertyStore_GetValue(store, &PKEY_AudioEndpoint_PhysicalSpeakers, &pv); hr = IPropertyStore_GetValue(store, &PKEY_AudioEndpoint_PhysicalSpeakers, &pv);
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("IPropertyStore_GetValue failed: %08x\n", hr); WARN("IPropertyStore_GetValue failed: %08lx\n", hr);
IPropertyStore_Release(store); IPropertyStore_Release(store);
return def; return def;
} }
...@@ -188,7 +188,7 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *device, IAudioClient *client ...@@ -188,7 +188,7 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *device, IAudioClient *client
CoTaskMemFree(retwfe); CoTaskMemFree(retwfe);
} }
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("IsFormatSupported failed: %08x\n", hr); WARN("IsFormatSupported failed: %08lx\n", hr);
HeapFree(GetProcessHeap(), 0, w); HeapFree(GetProcessHeap(), 0, w);
return hr; return hr;
} }
...@@ -263,7 +263,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device, WAVEFORMATEX *wfx, ...@@ -263,7 +263,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device, WAVEFORMATEX *wfx,
device->writelead = (wfx->nSamplesPerSec / 100) * wfx->nBlockAlign; device->writelead = (wfx->nSamplesPerSec / 100) * wfx->nBlockAlign;
TRACE("buflen: %u, frames %u\n", device->buflen, frames); TRACE("buflen: %lu, frames %lu\n", device->buflen, frames);
if (!mixfloat) if (!mixfloat)
device->normfunction = normfunctions[wfx->wBitsPerSample/8 - 1]; device->normfunction = normfunctions[wfx->wBitsPerSample/8 - 1];
...@@ -299,7 +299,7 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) ...@@ -299,7 +299,7 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
hres = IMMDevice_Activate(device->mmdevice, &IID_IAudioClient, hres = IMMDevice_Activate(device->mmdevice, &IID_IAudioClient,
CLSCTX_INPROC_SERVER, NULL, (void **)&client); CLSCTX_INPROC_SERVER, NULL, (void **)&client);
if(FAILED(hres)){ if(FAILED(hres)){
WARN("Activate failed: %08x\n", hres); WARN("Activate failed: %08lx\n", hres);
return hres; return hres;
} }
...@@ -314,13 +314,13 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) ...@@ -314,13 +314,13 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 800000, 0, wfx, NULL); AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 800000, 0, wfx, NULL);
if(FAILED(hres)){ if(FAILED(hres)){
IAudioClient_Release(client); IAudioClient_Release(client);
ERR("Initialize failed: %08x\n", hres); ERR("Initialize failed: %08lx\n", hres);
return hres; return hres;
} }
hres = IAudioClient_SetEventHandle(client, device->sleepev); hres = IAudioClient_SetEventHandle(client, device->sleepev);
if (FAILED(hres)) { if (FAILED(hres)) {
WARN("SetEventHandle failed: %08x\n", hres); WARN("SetEventHandle failed: %08lx\n", hres);
goto err; goto err;
} }
...@@ -335,17 +335,17 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) ...@@ -335,17 +335,17 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
/* Now kick off the timer so the event fires periodically */ /* Now kick off the timer so the event fires periodically */
hres = IAudioClient_Start(client); hres = IAudioClient_Start(client);
if (FAILED(hres)) { if (FAILED(hres)) {
WARN("Start failed with %08x\n", hres); WARN("Start failed with %08lx\n", hres);
goto err; goto err;
} }
hres = IAudioClient_GetStreamLatency(client, &period); hres = IAudioClient_GetStreamLatency(client, &period);
if (FAILED(hres)) { if (FAILED(hres)) {
WARN("GetStreamLatency failed with %08x\n", hres); WARN("GetStreamLatency failed with %08lx\n", hres);
goto err; goto err;
} }
hres = IAudioClient_GetBufferSize(client, &acbuf_frames); hres = IAudioClient_GetBufferSize(client, &acbuf_frames);
if (FAILED(hres)) { if (FAILED(hres)) {
WARN("GetBufferSize failed with %08x\n", hres); WARN("GetBufferSize failed with %08lx\n", hres);
goto err; goto err;
} }
...@@ -354,7 +354,7 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) ...@@ -354,7 +354,7 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
aclen_frames = min(acbuf_frames, 3 * frag_frames); aclen_frames = min(acbuf_frames, 3 * frag_frames);
TRACE("period %u ms frag_frames %u buf_frames %u\n", period_ms, frag_frames, aclen_frames); TRACE("period %lu ms frag_frames %lu buf_frames %u\n", period_ms, frag_frames, aclen_frames);
hres = DSOUND_PrimaryOpen(device, wfx, aclen_frames, forcewave); hres = DSOUND_PrimaryOpen(device, wfx, aclen_frames, forcewave);
if(FAILED(hres)) if(FAILED(hres))
...@@ -375,7 +375,7 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) ...@@ -375,7 +375,7 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
return S_OK; return S_OK;
err_service: err_service:
WARN("GetService failed: %08x\n", hres); WARN("GetService failed: %08lx\n", hres);
err: err:
device->speaker_config = oldspeakerconfig; device->speaker_config = oldspeakerconfig;
DSOUND_ParseSpeakerConfig(device); DSOUND_ParseSpeakerConfig(device);
...@@ -396,7 +396,7 @@ HRESULT DSOUND_PrimaryDestroy(DirectSoundDevice *device) ...@@ -396,7 +396,7 @@ HRESULT DSOUND_PrimaryDestroy(DirectSoundDevice *device)
EnterCriticalSection(&(device->mixlock)); EnterCriticalSection(&(device->mixlock));
if(device->primary && (device->primary->ref || device->primary->numIfaces)) if(device->primary && (device->primary->ref || device->primary->numIfaces))
WARN("Destroying primary buffer while references held (%u %u)\n", device->primary->ref, device->primary->numIfaces); WARN("Destroying primary buffer while references held (%lu %lu)\n", device->primary->ref, device->primary->numIfaces);
HeapFree(GetProcessHeap(), 0, device->primary); HeapFree(GetProcessHeap(), 0, device->primary);
device->primary = NULL; device->primary = NULL;
...@@ -453,8 +453,8 @@ HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passe ...@@ -453,8 +453,8 @@ HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passe
WARN("invalid parameter: passed_fmt==NULL!\n"); WARN("invalid parameter: passed_fmt==NULL!\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d," TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
"bytespersec=%d,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
passed_fmt->wFormatTag, passed_fmt->nChannels, passed_fmt->nSamplesPerSec, passed_fmt->wFormatTag, passed_fmt->nChannels, passed_fmt->nSamplesPerSec,
passed_fmt->nAvgBytesPerSec, passed_fmt->nBlockAlign, passed_fmt->nAvgBytesPerSec, passed_fmt->nBlockAlign,
passed_fmt->wBitsPerSample, passed_fmt->cbSize); passed_fmt->wBitsPerSample, passed_fmt->cbSize);
...@@ -539,7 +539,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO ...@@ -539,7 +539,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO
float fvol; float fvol;
int i; int i;
TRACE("(%p,%d)\n", iface, vol); TRACE("(%p,%ld)\n", iface, vol);
if (!(This->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) { if (!(This->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) {
WARN("control unavailable\n"); WARN("control unavailable\n");
...@@ -547,7 +547,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO ...@@ -547,7 +547,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO
} }
if ((vol > DSBVOLUME_MAX) || (vol < DSBVOLUME_MIN)) { if ((vol > DSBVOLUME_MAX) || (vol < DSBVOLUME_MIN)) {
WARN("invalid parameter: vol = %d\n", vol); WARN("invalid parameter: vol = %ld\n", vol);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -559,7 +559,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO ...@@ -559,7 +559,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO
hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol); hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol);
if (FAILED(hr)){ if (FAILED(hr)){
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
WARN("GetChannelVolume failed: %08x\n", hr); WARN("GetChannelVolume failed: %08lx\n", hr);
return hr; return hr;
} }
} else } else
...@@ -579,7 +579,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO ...@@ -579,7 +579,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(IDirectSoundBuffer8 *iface, LO
hr = IAudioStreamVolume_SetChannelVolume(device->volume, i, fvol); hr = IAudioStreamVolume_SetChannelVolume(device->volume, i, fvol);
if (FAILED(hr)){ if (FAILED(hr)){
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
WARN("SetChannelVolume failed: %08x\n", hr); WARN("SetChannelVolume failed: %08lx\n", hr);
return hr; return hr;
} }
} }
...@@ -619,7 +619,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(IDirectSoundBuffer8 *iface, LO ...@@ -619,7 +619,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(IDirectSoundBuffer8 *iface, LO
hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol); hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol);
if (FAILED(hr)){ if (FAILED(hr)){
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
WARN("GetChannelVolume failed: %08x\n", hr); WARN("GetChannelVolume failed: %08lx\n", hr);
return hr; return hr;
} }
} else } else
...@@ -639,7 +639,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(IDirectSoundBuffer8 *iface, LO ...@@ -639,7 +639,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(IDirectSoundBuffer8 *iface, LO
static HRESULT WINAPI PrimaryBufferImpl_SetFrequency(IDirectSoundBuffer8 *iface, DWORD freq) static HRESULT WINAPI PrimaryBufferImpl_SetFrequency(IDirectSoundBuffer8 *iface, DWORD freq)
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
TRACE("(%p,%d)\n",This,freq); TRACE("(%p,%ld)\n",This,freq);
/* You cannot set the frequency of the primary buffer */ /* You cannot set the frequency of the primary buffer */
WARN("control unavailable\n"); WARN("control unavailable\n");
...@@ -651,10 +651,10 @@ static HRESULT WINAPI PrimaryBufferImpl_Play(IDirectSoundBuffer8 *iface, DWORD r ...@@ -651,10 +651,10 @@ static HRESULT WINAPI PrimaryBufferImpl_Play(IDirectSoundBuffer8 *iface, DWORD r
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DirectSoundDevice *device = This->device; DirectSoundDevice *device = This->device;
TRACE("(%p,%08x,%08x,%08x)\n", iface, reserved1, reserved2, flags); TRACE("(%p,%08lx,%08lx,%08lx)\n", iface, reserved1, reserved2, flags);
if (!(flags & DSBPLAY_LOOPING)) { if (!(flags & DSBPLAY_LOOPING)) {
WARN("invalid parameter: flags = %08x\n", flags); WARN("invalid parameter: flags = %08lx\n", flags);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -678,7 +678,7 @@ static ULONG WINAPI PrimaryBufferImpl_AddRef(IDirectSoundBuffer8 *iface) ...@@ -678,7 +678,7 @@ static ULONG WINAPI PrimaryBufferImpl_AddRef(IDirectSoundBuffer8 *iface)
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
return ref; return ref;
...@@ -707,7 +707,7 @@ static ULONG WINAPI PrimaryBufferImpl_Release(IDirectSoundBuffer8 *iface) ...@@ -707,7 +707,7 @@ static ULONG WINAPI PrimaryBufferImpl_Release(IDirectSoundBuffer8 *iface)
if(!ref) if(!ref)
capped_refcount_dec(&This->numIfaces); capped_refcount_dec(&This->numIfaces);
TRACE("(%p) primary ref %d\n", This, ref); TRACE("(%p) primary ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -747,7 +747,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCurrentPosition(IDirectSoundBuffer8 * ...@@ -747,7 +747,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCurrentPosition(IDirectSoundBuffer8 *
LeaveCriticalSection(&(device->mixlock)); LeaveCriticalSection(&(device->mixlock));
/* **** */ /* **** */
TRACE("playpos = %d, writepos = %d (%p, time=%d)\n", playpos?*playpos:0, writepos?*writepos:0, device, GetTickCount()); TRACE("playpos = %ld, writepos = %ld (%p, time=%ld)\n", playpos?*playpos:0, writepos?*writepos:0, device, GetTickCount());
return DS_OK; return DS_OK;
} }
...@@ -766,7 +766,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetStatus(IDirectSoundBuffer8 *iface, DW ...@@ -766,7 +766,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetStatus(IDirectSoundBuffer8 *iface, DW
if (!device->stopped) if (!device->stopped)
*status |= DSBSTATUS_PLAYING | DSBSTATUS_LOOPING; *status |= DSBSTATUS_PLAYING | DSBSTATUS_LOOPING;
TRACE("status=%x\n", *status); TRACE("status=%lx\n", *status);
return DS_OK; return DS_OK;
} }
...@@ -777,7 +777,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFormat(IDirectSoundBuffer8 *iface, WA ...@@ -777,7 +777,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFormat(IDirectSoundBuffer8 *iface, WA
DWORD size; DWORD size;
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DirectSoundDevice *device = This->device; DirectSoundDevice *device = This->device;
TRACE("(%p,%p,%d,%p)\n", iface, lpwf, wfsize, wfwritten); TRACE("(%p,%p,%ld,%p)\n", iface, lpwf, wfsize, wfwritten);
size = sizeof(WAVEFORMATEX) + device->primary_pwfx->cbSize; size = sizeof(WAVEFORMATEX) + device->primary_pwfx->cbSize;
...@@ -811,7 +811,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w ...@@ -811,7 +811,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w
HRESULT hres; HRESULT hres;
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DirectSoundDevice *device = This->device; DirectSoundDevice *device = This->device;
TRACE("(%p,%d,%d,%p,%p,%p,%p,0x%08x) at %d\n", TRACE("(%p,%ld,%ld,%p,%p,%p,%p,0x%08lx) at %ld\n",
iface, iface,
writecursor, writecursor,
writebytes, writebytes,
...@@ -846,13 +846,13 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w ...@@ -846,13 +846,13 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w
writebytes = device->buflen; writebytes = device->buflen;
if (writecursor >= device->buflen) { if (writecursor >= device->buflen) {
WARN("Invalid parameter, writecursor: %u >= buflen: %u\n", WARN("Invalid parameter, writecursor: %lu >= buflen: %lu\n",
writecursor, device->buflen); writecursor, device->buflen);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
if (writebytes > device->buflen) { if (writebytes > device->buflen) {
WARN("Invalid parameter, writebytes: %u > buflen: %u\n", WARN("Invalid parameter, writebytes: %lu > buflen: %lu\n",
writebytes, device->buflen); writebytes, device->buflen);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -864,7 +864,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w ...@@ -864,7 +864,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w
*(LPBYTE*)lplpaudioptr2 = NULL; *(LPBYTE*)lplpaudioptr2 = NULL;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = 0; *audiobytes2 = 0;
TRACE("->%d.0\n",writebytes); TRACE("->%ld.0\n",writebytes);
} else { } else {
*(LPBYTE*)lplpaudioptr1 = device->buffer+writecursor; *(LPBYTE*)lplpaudioptr1 = device->buffer+writecursor;
*audiobytes1 = device->buflen-writecursor; *audiobytes1 = device->buflen-writecursor;
...@@ -872,7 +872,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w ...@@ -872,7 +872,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w
*(LPBYTE*)lplpaudioptr2 = device->buffer; *(LPBYTE*)lplpaudioptr2 = device->buffer;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = writebytes-(device->buflen-writecursor); *audiobytes2 = writebytes-(device->buflen-writecursor);
TRACE("->%d.%d\n",*audiobytes1,audiobytes2?*audiobytes2:0); TRACE("->%ld.%ld\n",*audiobytes1,audiobytes2?*audiobytes2:0);
} }
return DS_OK; return DS_OK;
} }
...@@ -880,7 +880,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w ...@@ -880,7 +880,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(IDirectSoundBuffer8 *iface, DWORD w
static HRESULT WINAPI PrimaryBufferImpl_SetCurrentPosition(IDirectSoundBuffer8 *iface, DWORD newpos) static HRESULT WINAPI PrimaryBufferImpl_SetCurrentPosition(IDirectSoundBuffer8 *iface, DWORD newpos)
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
TRACE("(%p,%d)\n",This,newpos); TRACE("(%p,%ld)\n",This,newpos);
/* You cannot set the position of the primary buffer */ /* You cannot set the position of the primary buffer */
WARN("invalid call\n"); WARN("invalid call\n");
...@@ -895,7 +895,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG ...@@ -895,7 +895,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG
HRESULT hr; HRESULT hr;
int i; int i;
TRACE("(%p,%d)\n", iface, pan); TRACE("(%p,%ld)\n", iface, pan);
if (!(This->dsbd.dwFlags & DSBCAPS_CTRLPAN)) { if (!(This->dsbd.dwFlags & DSBCAPS_CTRLPAN)) {
WARN("control unavailable\n"); WARN("control unavailable\n");
...@@ -903,7 +903,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG ...@@ -903,7 +903,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG
} }
if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) { if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) {
WARN("invalid parameter: pan = %d\n", pan); WARN("invalid parameter: pan = %ld\n", pan);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -915,7 +915,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG ...@@ -915,7 +915,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG
hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol); hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol);
if (FAILED(hr)){ if (FAILED(hr)){
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
WARN("GetChannelVolume failed: %08x\n", hr); WARN("GetChannelVolume failed: %08lx\n", hr);
return hr; return hr;
} }
} else } else
...@@ -935,7 +935,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG ...@@ -935,7 +935,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(IDirectSoundBuffer8 *iface, LONG
hr = IAudioStreamVolume_SetChannelVolume(device->volume, i, fvol); hr = IAudioStreamVolume_SetChannelVolume(device->volume, i, fvol);
if (FAILED(hr)){ if (FAILED(hr)){
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
WARN("SetChannelVolume failed: %08x\n", hr); WARN("SetChannelVolume failed: %08lx\n", hr);
return hr; return hr;
} }
} }
...@@ -975,7 +975,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetPan(IDirectSoundBuffer8 *iface, LONG ...@@ -975,7 +975,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetPan(IDirectSoundBuffer8 *iface, LONG
hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol); hr = IAudioStreamVolume_GetChannelVolume(device->volume, i, &fvol);
if (FAILED(hr)){ if (FAILED(hr)){
LeaveCriticalSection(&device->mixlock); LeaveCriticalSection(&device->mixlock);
WARN("GetChannelVolume failed: %08x\n", hr); WARN("GetChannelVolume failed: %08lx\n", hr);
return hr; return hr;
} }
} else } else
...@@ -997,7 +997,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Unlock(IDirectSoundBuffer8 *iface, void ...@@ -997,7 +997,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Unlock(IDirectSoundBuffer8 *iface, void
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
DirectSoundDevice *device = This->device; DirectSoundDevice *device = This->device;
TRACE("(%p,%p,%d,%p,%d)\n", iface, p1, x1, p2, x2); TRACE("(%p,%p,%ld,%p,%ld)\n", iface, p1, x1, p2, x2);
if (device->priolevel != DSSCL_WRITEPRIMARY) { if (device->priolevel != DSSCL_WRITEPRIMARY) {
WARN("failed priority check!\n"); WARN("failed priority check!\n");
...@@ -1035,7 +1035,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFrequency(IDirectSoundBuffer8 *iface, ...@@ -1035,7 +1035,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFrequency(IDirectSoundBuffer8 *iface,
} }
*freq = device->pwfx->nSamplesPerSec; *freq = device->pwfx->nSamplesPerSec;
TRACE("-> %d\n", *freq); TRACE("-> %ld\n", *freq);
return DS_OK; return DS_OK;
} }
...@@ -1060,7 +1060,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(IDirectSoundBuffer8 *iface, DSBC ...@@ -1060,7 +1060,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(IDirectSoundBuffer8 *iface, DSBC
} }
if (caps->dwSize < sizeof(*caps)) { if (caps->dwSize < sizeof(*caps)) {
WARN("invalid parameter: caps->dwSize = %d\n", caps->dwSize); WARN("invalid parameter: caps->dwSize = %ld\n", caps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -1203,8 +1203,8 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl * ...@@ -1203,8 +1203,8 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
device->ds3dl_need_recalc = TRUE; device->ds3dl_need_recalc = TRUE;
TRACE("Created primary buffer at %p\n", dsb); TRACE("Created primary buffer at %p\n", dsb);
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d," TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld,"
"bytespersec=%d,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n",
device->pwfx->wFormatTag, device->pwfx->nChannels, device->pwfx->wFormatTag, device->pwfx->nChannels,
device->pwfx->nSamplesPerSec, device->pwfx->nAvgBytesPerSec, device->pwfx->nSamplesPerSec, device->pwfx->nAvgBytesPerSec,
device->pwfx->nBlockAlign, device->pwfx->wBitsPerSample, device->pwfx->nBlockAlign, device->pwfx->wBitsPerSample,
......
...@@ -80,7 +80,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface) ...@@ -80,7 +80,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface)
{ {
IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -88,7 +88,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface) ...@@ -88,7 +88,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
{ {
IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if (!ref) { if (!ref) {
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
...@@ -124,7 +124,7 @@ static HRESULT DSPROPERTY_WaveDeviceMappingW( ...@@ -124,7 +124,7 @@ static HRESULT DSPROPERTY_WaveDeviceMappingW(
PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd = pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd = pPropData;
struct search_data search; struct search_data search;
TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
if (!ppd) { if (!ppd) {
...@@ -164,7 +164,7 @@ static HRESULT DSPROPERTY_WaveDeviceMappingA( ...@@ -164,7 +164,7 @@ static HRESULT DSPROPERTY_WaveDeviceMappingA(
DWORD len; DWORD len;
HRESULT hr; HRESULT hr;
TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
if (!ppd || !ppd->DeviceName) { if (!ppd || !ppd->DeviceName) {
...@@ -201,7 +201,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -201,7 +201,7 @@ static HRESULT DSPROPERTY_DescriptionW(
PROPVARIANT pv; PROPVARIANT pv;
HRESULT hr; HRESULT hr;
TRACE("pPropData=%p,cbPropData=%d,pcbReturned=%p)\n", TRACE("pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId)); TRACE("DeviceId=%s\n",debugstr_guid(&ppd->DeviceId));
...@@ -233,7 +233,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -233,7 +233,7 @@ static HRESULT DSPROPERTY_DescriptionW(
hr = IMMDevice_OpenPropertyStore(mmdevice, STGM_READ, &ps); hr = IMMDevice_OpenPropertyStore(mmdevice, STGM_READ, &ps);
if(FAILED(hr)){ if(FAILED(hr)){
IMMDevice_Release(mmdevice); IMMDevice_Release(mmdevice);
WARN("OpenPropertyStore failed: %08x\n", hr); WARN("OpenPropertyStore failed: %08lx\n", hr);
return hr; return hr;
} }
...@@ -242,7 +242,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -242,7 +242,7 @@ static HRESULT DSPROPERTY_DescriptionW(
if(FAILED(hr)){ if(FAILED(hr)){
IPropertyStore_Release(ps); IPropertyStore_Release(ps);
IMMDevice_Release(mmdevice); IMMDevice_Release(mmdevice);
WARN("GetValue(FriendlyName) failed: %08x\n", hr); WARN("GetValue(FriendlyName) failed: %08lx\n", hr);
return hr; return hr;
} }
...@@ -257,7 +257,7 @@ static HRESULT DSPROPERTY_DescriptionW( ...@@ -257,7 +257,7 @@ static HRESULT DSPROPERTY_DescriptionW(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = sizeof(*ppd); *pcbReturned = sizeof(*ppd);
TRACE("*pcbReturned=%d\n", *pcbReturned); TRACE("*pcbReturned=%ld\n", *pcbReturned);
} }
return S_OK; return S_OK;
...@@ -306,7 +306,7 @@ static HRESULT DSPROPERTY_EnumerateW( ...@@ -306,7 +306,7 @@ static HRESULT DSPROPERTY_EnumerateW(
PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd = pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd = pPropData;
HRESULT hr; HRESULT hr;
TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
if (pcbReturned) if (pcbReturned)
...@@ -501,7 +501,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get( ...@@ -501,7 +501,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
PULONG pcbReturned ) PULONG pcbReturned )
{ {
IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
TRACE("(iface=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n", TRACE("(iface=%p,guidPropSet=%s,dwPropID=%lu,pInstanceData=%p,cbInstanceData=%lu,pPropData=%p,cbPropData=%lu,pcbReturned=%p)\n",
This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned); This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) { if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
...@@ -523,7 +523,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get( ...@@ -523,7 +523,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: case DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W:
return DSPROPERTY_EnumerateW(pPropData,cbPropData,pcbReturned); return DSPROPERTY_EnumerateW(pPropData,cbPropData,pcbReturned);
default: default:
FIXME("unsupported ID: %d\n",dwPropID); FIXME("unsupported ID: %ld\n",dwPropID);
break; break;
} }
} else { } else {
...@@ -532,7 +532,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get( ...@@ -532,7 +532,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = 0; *pcbReturned = 0;
FIXME("*pcbReturned=%d\n", *pcbReturned); FIXME("*pcbReturned=%ld\n", *pcbReturned);
} }
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
...@@ -549,7 +549,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Set( ...@@ -549,7 +549,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Set(
{ {
IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
FIXME("(%p,%s,%d,%p,%d,%p,%d), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData); FIXME("(%p,%s,%ld,%p,%ld,%p,%ld), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
...@@ -560,7 +560,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport( ...@@ -560,7 +560,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport(
PULONG pTypeSupport ) PULONG pTypeSupport )
{ {
IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface);
TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport); TRACE("(%p,%s,%ld,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) { if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
switch (dwPropID) { switch (dwPropID) {
...@@ -589,7 +589,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport( ...@@ -589,7 +589,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport(
*pTypeSupport = KSPROPERTY_SUPPORT_GET; *pTypeSupport = KSPROPERTY_SUPPORT_GET;
return S_OK; return S_OK;
default: default:
FIXME("unsupported ID: %d\n",dwPropID); FIXME("unsupported ID: %ld\n",dwPropID);
break; break;
} }
} else { } else {
......
...@@ -216,7 +216,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) ...@@ -216,7 +216,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
/* attenuation proportional to the distance squared, converted to millibels as in lVolume*/ /* attenuation proportional to the distance squared, converted to millibels as in lVolume*/
lVolume -= log10(flDistance/dsb->ds3db_ds3db.flMinDistance * flDistance/dsb->ds3db_ds3db.flMinDistance)*1000; lVolume -= log10(flDistance/dsb->ds3db_ds3db.flMinDistance * flDistance/dsb->ds3db_ds3db.flMinDistance)*1000;
TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting volume %d to %f\n", flDistance, dsb->ds3db_ds3db.flMinDistance, dsb->ds3db_lVolume, lVolume); TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting volume %ld to %f\n", flDistance, dsb->ds3db_ds3db.flMinDistance, dsb->ds3db_lVolume, lVolume);
/* conning */ /* conning */
/* sometimes it happens that vConeOrientation vector = (0,0,0); in this case angle is "nan" and it's useless*/ /* sometimes it happens that vConeOrientation vector = (0,0,0); in this case angle is "nan" and it's useless*/
...@@ -252,7 +252,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) ...@@ -252,7 +252,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
/* this probably isn't the right thing, but it's ok for the time being */ /* this probably isn't the right thing, but it's ok for the time being */
lVolume += ((flAngle - dwInsideConeAngle)/(dwOutsideConeAngle - dwInsideConeAngle)) * dsb->ds3db_ds3db.lConeOutsideVolume; lVolume += ((flAngle - dwInsideConeAngle)/(dwOutsideConeAngle - dwInsideConeAngle)) * dsb->ds3db_ds3db.lConeOutsideVolume;
} }
TRACE("conning: Angle = %f deg; InsideConeAngle(/2) = %d deg; OutsideConeAngle(/2) = %d deg; ConeOutsideVolume = %d => adjusting volume to %f\n", TRACE("conning: Angle = %f deg; InsideConeAngle(/2) = %ld deg; OutsideConeAngle(/2) = %ld deg; ConeOutsideVolume = %ld => adjusting volume to %f\n",
flAngle, dsb->ds3db_ds3db.dwInsideConeAngle/2, dsb->ds3db_ds3db.dwOutsideConeAngle/2, dsb->ds3db_ds3db.lConeOutsideVolume, lVolume); flAngle, dsb->ds3db_ds3db.dwInsideConeAngle/2, dsb->ds3db_ds3db.dwOutsideConeAngle/2, dsb->ds3db_ds3db.lConeOutsideVolume, lVolume);
} }
dsb->volpan.lVolume = lVolume; dsb->volpan.lVolume = lVolume;
...@@ -286,7 +286,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) ...@@ -286,7 +286,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
if (flAngle < -M_PI) if (flAngle < -M_PI)
flAngle += 2*M_PI; flAngle += 2*M_PI;
} }
TRACE("panning: Angle = %f rad, lPan = %d\n", flAngle, dsb->volpan.lPan); TRACE("panning: Angle = %f rad, lPan = %ld\n", flAngle, dsb->volpan.lPan);
/* FIXME: Doppler Effect disabled since i have no idea which frequency to change and how to do it */ /* FIXME: Doppler Effect disabled since i have no idea which frequency to change and how to do it */
if(0) if(0)
...@@ -312,7 +312,7 @@ if(0) ...@@ -312,7 +312,7 @@ if(0)
/* formula taken from Gianicoli D.: Physics, 4th edition: */ /* formula taken from Gianicoli D.: Physics, 4th edition: */
/* FIXME: replace dsb->freq with appropriate frequency ! */ /* FIXME: replace dsb->freq with appropriate frequency ! */
flFreq = dsb->freq * ((DEFAULT_VELOCITY + flListenerVel)/(DEFAULT_VELOCITY + flBufferVel)); flFreq = dsb->freq * ((DEFAULT_VELOCITY + flListenerVel)/(DEFAULT_VELOCITY + flBufferVel));
TRACE("doppler: Buffer velocity (component) = %f, Listener velocity (component) = %f => Doppler shift: %d Hz -> %f Hz\n", TRACE("doppler: Buffer velocity (component) = %f, Listener velocity (component) = %f => Doppler shift: %ld Hz -> %f Hz\n",
flBufferVel, flListenerVel, dsb->freq, flFreq); flBufferVel, flListenerVel, dsb->freq, flFreq);
/* FIXME: replace following line with correct frequency setting ! */ /* FIXME: replace following line with correct frequency setting ! */
dsb->freq = flFreq; dsb->freq = flFreq;
...@@ -395,7 +395,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_AddRef(IDirectSound3DBuffer *iface) ...@@ -395,7 +395,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_AddRef(IDirectSound3DBuffer *iface)
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
ULONG ref = InterlockedIncrement(&This->ref3D); ULONG ref = InterlockedIncrement(&This->ref3D);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -408,7 +408,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_Release(IDirectSound3DBuffer *iface ...@@ -408,7 +408,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_Release(IDirectSound3DBuffer *iface
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
ULONG ref = InterlockedDecrement(&This->ref3D); ULONG ref = InterlockedDecrement(&This->ref3D);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if (!ref && !InterlockedDecrement(&This->numIfaces)) if (!ref && !InterlockedDecrement(&This->numIfaces))
secondarybuffer_destroy(This); secondarybuffer_destroy(This);
...@@ -430,7 +430,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetAllParameters(IDirectSound3DBu ...@@ -430,7 +430,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetAllParameters(IDirectSound3DBu
} }
if (lpDs3dBuffer->dwSize < sizeof(*lpDs3dBuffer)) { if (lpDs3dBuffer->dwSize < sizeof(*lpDs3dBuffer)) {
WARN("invalid parameter: lpDs3dBuffer->dwSize = %d\n",lpDs3dBuffer->dwSize); WARN("invalid parameter: lpDs3dBuffer->dwSize = %ld\n",lpDs3dBuffer->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -444,7 +444,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetConeAngles(IDirectSound3DBuffe ...@@ -444,7 +444,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetConeAngles(IDirectSound3DBuffe
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("returning: Inside Cone Angle = %d degrees; Outside Cone Angle = %d degrees\n", TRACE("returning: Inside Cone Angle = %ld degrees; Outside Cone Angle = %ld degrees\n",
This->ds3db_ds3db.dwInsideConeAngle, This->ds3db_ds3db.dwOutsideConeAngle); This->ds3db_ds3db.dwInsideConeAngle, This->ds3db_ds3db.dwOutsideConeAngle);
*lpdwInsideConeAngle = This->ds3db_ds3db.dwInsideConeAngle; *lpdwInsideConeAngle = This->ds3db_ds3db.dwInsideConeAngle;
*lpdwOutsideConeAngle = This->ds3db_ds3db.dwOutsideConeAngle; *lpdwOutsideConeAngle = This->ds3db_ds3db.dwOutsideConeAngle;
...@@ -469,7 +469,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetConeOutsideVolume(IDirectSound ...@@ -469,7 +469,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetConeOutsideVolume(IDirectSound
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("returning: Cone Outside Volume = %d\n", This->ds3db_ds3db.lConeOutsideVolume); TRACE("returning: Cone Outside Volume = %ld\n", This->ds3db_ds3db.lConeOutsideVolume);
*lplConeOutsideVolume = This->ds3db_ds3db.lConeOutsideVolume; *lplConeOutsideVolume = This->ds3db_ds3db.lConeOutsideVolume;
return DS_OK; return DS_OK;
} }
...@@ -499,7 +499,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetMode(IDirectSound3DBuffer *ifa ...@@ -499,7 +499,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetMode(IDirectSound3DBuffer *ifa
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("returning: Mode = %d\n", This->ds3db_ds3db.dwMode); TRACE("returning: Mode = %ld\n", This->ds3db_ds3db.dwMode);
*lpdwMode = This->ds3db_ds3db.dwMode; *lpdwMode = This->ds3db_ds3db.dwMode;
return DS_OK; return DS_OK;
} }
...@@ -532,7 +532,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetAllParameters(IDirectSound3DBu ...@@ -532,7 +532,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetAllParameters(IDirectSound3DBu
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
DWORD status = DSERR_INVALIDPARAM; DWORD status = DSERR_INVALIDPARAM;
TRACE("(%p,%p,%x)\n",iface,lpcDs3dBuffer,dwApply); TRACE("(%p,%p,%lx)\n",iface,lpcDs3dBuffer,dwApply);
if (lpcDs3dBuffer == NULL) { if (lpcDs3dBuffer == NULL) {
WARN("invalid parameter: lpcDs3dBuffer == NULL\n"); WARN("invalid parameter: lpcDs3dBuffer == NULL\n");
...@@ -540,11 +540,11 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetAllParameters(IDirectSound3DBu ...@@ -540,11 +540,11 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetAllParameters(IDirectSound3DBu
} }
if (lpcDs3dBuffer->dwSize != sizeof(DS3DBUFFER)) { if (lpcDs3dBuffer->dwSize != sizeof(DS3DBUFFER)) {
WARN("invalid parameter: lpcDs3dBuffer->dwSize = %d\n", lpcDs3dBuffer->dwSize); WARN("invalid parameter: lpcDs3dBuffer->dwSize = %ld\n", lpcDs3dBuffer->dwSize);
return status; return status;
} }
TRACE("setting: all parameters; dwApply = %d\n", dwApply); TRACE("setting: all parameters; dwApply = %ld\n", dwApply);
This->ds3db_ds3db = *lpcDs3dBuffer; This->ds3db_ds3db = *lpcDs3dBuffer;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
...@@ -562,7 +562,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeAngles(IDirectSound3DBuffe ...@@ -562,7 +562,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeAngles(IDirectSound3DBuffe
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: Inside Cone Angle = %d; Outside Cone Angle = %d; dwApply = %d\n", TRACE("setting: Inside Cone Angle = %ld; Outside Cone Angle = %ld; dwApply = %ld\n",
dwInsideConeAngle, dwOutsideConeAngle, dwApply); dwInsideConeAngle, dwOutsideConeAngle, dwApply);
This->ds3db_ds3db.dwInsideConeAngle = dwInsideConeAngle; This->ds3db_ds3db.dwInsideConeAngle = dwInsideConeAngle;
This->ds3db_ds3db.dwOutsideConeAngle = dwOutsideConeAngle; This->ds3db_ds3db.dwOutsideConeAngle = dwOutsideConeAngle;
...@@ -577,7 +577,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeOrientation(IDirectSound3D ...@@ -577,7 +577,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeOrientation(IDirectSound3D
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: Cone Orientation vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply); TRACE("setting: Cone Orientation vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply);
This->ds3db_ds3db.vConeOrientation.x = x; This->ds3db_ds3db.vConeOrientation.x = x;
This->ds3db_ds3db.vConeOrientation.y = y; This->ds3db_ds3db.vConeOrientation.y = y;
This->ds3db_ds3db.vConeOrientation.z = z; This->ds3db_ds3db.vConeOrientation.z = z;
...@@ -595,7 +595,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeOutsideVolume(IDirectSound ...@@ -595,7 +595,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeOutsideVolume(IDirectSound
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: ConeOutsideVolume = %d; dwApply = %d\n", lConeOutsideVolume, dwApply); TRACE("setting: ConeOutsideVolume = %ld; dwApply = %ld\n", lConeOutsideVolume, dwApply);
This->ds3db_ds3db.lConeOutsideVolume = lConeOutsideVolume; This->ds3db_ds3db.lConeOutsideVolume = lConeOutsideVolume;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -611,7 +611,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMaxDistance(IDirectSound3DBuff ...@@ -611,7 +611,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMaxDistance(IDirectSound3DBuff
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: MaxDistance = %f; dwApply = %d\n", fMaxDistance, dwApply); TRACE("setting: MaxDistance = %f; dwApply = %ld\n", fMaxDistance, dwApply);
This->ds3db_ds3db.flMaxDistance = fMaxDistance; This->ds3db_ds3db.flMaxDistance = fMaxDistance;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -627,7 +627,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMinDistance(IDirectSound3DBuff ...@@ -627,7 +627,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMinDistance(IDirectSound3DBuff
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: MinDistance = %f; dwApply = %d\n", fMinDistance, dwApply); TRACE("setting: MinDistance = %f; dwApply = %ld\n", fMinDistance, dwApply);
This->ds3db_ds3db.flMinDistance = fMinDistance; This->ds3db_ds3db.flMinDistance = fMinDistance;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -643,7 +643,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMode(IDirectSound3DBuffer *ifa ...@@ -643,7 +643,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMode(IDirectSound3DBuffer *ifa
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: Mode = %d; dwApply = %d\n", dwMode, dwApply); TRACE("setting: Mode = %ld; dwApply = %ld\n", dwMode, dwApply);
This->ds3db_ds3db.dwMode = dwMode; This->ds3db_ds3db.dwMode = dwMode;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -659,7 +659,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetPosition(IDirectSound3DBuffer ...@@ -659,7 +659,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetPosition(IDirectSound3DBuffer
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: Position vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply); TRACE("setting: Position vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply);
This->ds3db_ds3db.vPosition.x = x; This->ds3db_ds3db.vPosition.x = x;
This->ds3db_ds3db.vPosition.y = y; This->ds3db_ds3db.vPosition.y = y;
This->ds3db_ds3db.vPosition.z = z; This->ds3db_ds3db.vPosition.z = z;
...@@ -677,7 +677,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetVelocity(IDirectSound3DBuffer ...@@ -677,7 +677,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetVelocity(IDirectSound3DBuffer
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface);
TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply); TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply);
This->ds3db_ds3db.vVelocity.x = x; This->ds3db_ds3db.vVelocity.x = x;
This->ds3db_ds3db.vVelocity.y = y; This->ds3db_ds3db.vVelocity.y = y;
This->ds3db_ds3db.vVelocity.z = z; This->ds3db_ds3db.vVelocity.z = z;
...@@ -743,7 +743,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_AddRef(IDirectSound3DListener *if ...@@ -743,7 +743,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_AddRef(IDirectSound3DListener *if
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
ULONG ref = InterlockedIncrement(&This->ref3D); ULONG ref = InterlockedIncrement(&This->ref3D);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
if(ref == 1) if(ref == 1)
InterlockedIncrement(&This->numIfaces); InterlockedIncrement(&This->numIfaces);
...@@ -760,7 +760,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_Release(IDirectSound3DListener *i ...@@ -760,7 +760,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_Release(IDirectSound3DListener *i
if(!ref) if(!ref)
capped_refcount_dec(&This->numIfaces); capped_refcount_dec(&This->numIfaces);
TRACE("(%p) ref %d\n", This, ref); TRACE("(%p) ref %ld\n", This, ref);
return ref; return ref;
} }
...@@ -779,7 +779,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_GetAllParameter(IDirectSound3DL ...@@ -779,7 +779,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_GetAllParameter(IDirectSound3DL
} }
if (lpDS3DL->dwSize < sizeof(*lpDS3DL)) { if (lpDS3DL->dwSize < sizeof(*lpDS3DL)) {
WARN("invalid parameter: lpDS3DL->dwSize = %d\n",lpDS3DL->dwSize); WARN("invalid parameter: lpDS3DL->dwSize = %ld\n",lpDS3DL->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
...@@ -856,7 +856,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetAllParameters(IDirectSound3D ...@@ -856,7 +856,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetAllParameters(IDirectSound3D
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: all parameters; dwApply = %d\n", dwApply); TRACE("setting: all parameters; dwApply = %ld\n", dwApply);
This->device->ds3dl = *lpcDS3DL; This->device->ds3dl = *lpcDS3DL;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -872,7 +872,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetDistanceFactor(IDirectSound3 ...@@ -872,7 +872,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetDistanceFactor(IDirectSound3
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: Distance Factor = %f; dwApply = %d\n", fDistanceFactor, dwApply); TRACE("setting: Distance Factor = %f; dwApply = %ld\n", fDistanceFactor, dwApply);
This->device->ds3dl.flDistanceFactor = fDistanceFactor; This->device->ds3dl.flDistanceFactor = fDistanceFactor;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -888,7 +888,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetDopplerFactor(IDirectSound3D ...@@ -888,7 +888,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetDopplerFactor(IDirectSound3D
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: Doppler Factor = %f; dwApply = %d\n", fDopplerFactor, dwApply); TRACE("setting: Doppler Factor = %f; dwApply = %ld\n", fDopplerFactor, dwApply);
This->device->ds3dl.flDopplerFactor = fDopplerFactor; This->device->ds3dl.flDopplerFactor = fDopplerFactor;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -905,7 +905,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetOrientation(IDirectSound3DLi ...@@ -905,7 +905,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetOrientation(IDirectSound3DLi
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: Front vector = (%f,%f,%f); Top vector = (%f,%f,%f); dwApply = %d\n", TRACE("setting: Front vector = (%f,%f,%f); Top vector = (%f,%f,%f); dwApply = %ld\n",
xFront, yFront, zFront, xTop, yTop, zTop, dwApply); xFront, yFront, zFront, xTop, yTop, zTop, dwApply);
This->device->ds3dl.vOrientFront.x = xFront; This->device->ds3dl.vOrientFront.x = xFront;
This->device->ds3dl.vOrientFront.y = yFront; This->device->ds3dl.vOrientFront.y = yFront;
...@@ -927,7 +927,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetPosition(IDirectSound3DListe ...@@ -927,7 +927,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetPosition(IDirectSound3DListe
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: Position vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply); TRACE("setting: Position vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply);
This->device->ds3dl.vPosition.x = x; This->device->ds3dl.vPosition.x = x;
This->device->ds3dl.vPosition.y = y; This->device->ds3dl.vPosition.y = y;
This->device->ds3dl.vPosition.z = z; This->device->ds3dl.vPosition.z = z;
...@@ -945,7 +945,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetRolloffFactor(IDirectSound3D ...@@ -945,7 +945,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetRolloffFactor(IDirectSound3D
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: Rolloff Factor = %f; dwApply = %d\n", fRolloffFactor, dwApply); TRACE("setting: Rolloff Factor = %f; dwApply = %ld\n", fRolloffFactor, dwApply);
This->device->ds3dl.flRolloffFactor = fRolloffFactor; This->device->ds3dl.flRolloffFactor = fRolloffFactor;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
...@@ -961,7 +961,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetVelocity(IDirectSound3DListe ...@@ -961,7 +961,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetVelocity(IDirectSound3DListe
{ {
IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface);
TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply); TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply);
This->device->ds3dl.vVelocity.x = x; This->device->ds3dl.vVelocity.x = x;
This->device->ds3dl.vVelocity.y = y; This->device->ds3dl.vVelocity.y = y;
This->device->ds3dl.vVelocity.z = z; This->device->ds3dl.vVelocity.z = z;
......
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