dsound: Win64 printf format warning fixes.

This commit is contained in:
Michael Stefaniuc 2006-11-12 14:40:35 +01:00 committed by Alexandre Julliard
parent 0f08667c8a
commit 26bd2ec9c3
10 changed files with 274 additions and 275 deletions

View file

@ -6,7 +6,6 @@ MODULE = dsound.dll
IMPORTLIB = libdsound.$(IMPLIBEXT) IMPORTLIB = libdsound.$(IMPLIBEXT)
IMPORTS = winmm ole32 user32 advapi32 kernel32 ntdll IMPORTS = winmm ole32 user32 advapi32 kernel32 ntdll
EXTRALIBS = -ldxguid -luuid EXTRALIBS = -ldxguid -luuid
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \ C_SRCS = \
buffer.c \ buffer.c \

View file

@ -72,7 +72,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(LPDIRECTSOUNDNOTIFY iface)
{ {
IDirectSoundNotifyImpl *This = (IDirectSoundNotifyImpl *)iface; IDirectSoundNotifyImpl *This = (IDirectSoundNotifyImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -80,7 +80,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(LPDIRECTSOUNDNOTIFY iface)
{ {
IDirectSoundNotifyImpl *This = (IDirectSoundNotifyImpl *)iface; IDirectSoundNotifyImpl *This = (IDirectSoundNotifyImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER)This->dsb); IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER)This->dsb);
@ -95,7 +95,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(
LPDIRECTSOUNDNOTIFY iface,DWORD howmuch,LPCDSBPOSITIONNOTIFY notify LPDIRECTSOUNDNOTIFY iface,DWORD howmuch,LPCDSBPOSITIONNOTIFY notify
) { ) {
IDirectSoundNotifyImpl *This = (IDirectSoundNotifyImpl *)iface; IDirectSoundNotifyImpl *This = (IDirectSoundNotifyImpl *)iface;
TRACE("(%p,0x%08lx,%p)\n",This,howmuch,notify); TRACE("(%p,0x%08x,%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");
@ -105,7 +105,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(
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 %ld to %p\n", TRACE("notify at %d to %p\n",
notify[i].dwOffset,notify[i].hEventNotify); notify[i].dwOffset,notify[i].hEventNotify);
} }
@ -204,15 +204,15 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(
LONG oldVol; LONG oldVol;
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%ld)\n",This,vol); TRACE("(%p,%d)\n",This,vol);
if (!(This->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) { if (!(This->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) {
WARN("control unavailable: This->dsbd.dwFlags = 0x%08lx\n", This->dsbd.dwFlags); WARN("control unavailable: This->dsbd.dwFlags = 0x%08x\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 = %ld\n", vol); WARN("invalid parameter: vol = %d\n", vol);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -271,7 +271,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
DWORD oldFreq; DWORD oldFreq;
TRACE("(%p,%ld)\n",This,freq); TRACE("(%p,%d)\n",This,freq);
if (!(This->dsbd.dwFlags & DSBCAPS_CTRLFREQUENCY)) { if (!(This->dsbd.dwFlags & DSBCAPS_CTRLFREQUENCY)) {
WARN("control unavailable\n"); WARN("control unavailable\n");
@ -282,7 +282,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(
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 = %ld\n", freq); WARN("invalid parameter: freq = %d\n", freq);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -310,7 +310,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Play(
) { ) {
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
TRACE("(%p,%08lx,%08lx,%08lx)\n",This,reserved1,reserved2,flags); TRACE("(%p,%08x,%08x,%08x)\n",This,reserved1,reserved2,flags);
/* **** */ /* **** */
EnterCriticalSection(&(This->lock)); EnterCriticalSection(&(This->lock));
@ -368,7 +368,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_AddRef(LPDIRECTSOUNDBUFFER8 iface)
{ {
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -376,7 +376,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface)
{ {
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
DirectSoundDevice_RemoveBuffer(This->device, This); DirectSoundDevice_RemoveBuffer(This->device, This);
@ -415,7 +415,7 @@ DWORD DSOUND_CalcPlayPosition(IDirectSoundBufferImpl *This, DWORD pplay, DWORD p
DWORD bplay = This->buf_mixpos; DWORD bplay = This->buf_mixpos;
DWORD pmix = This->primary_mixpos; DWORD pmix = This->primary_mixpos;
DirectSoundDevice * device = This->device; DirectSoundDevice * device = This->device;
TRACE("(%p, pplay=%lu, pwrite=%lu)\n", This, pplay, pwrite); TRACE("(%p, pplay=%u, pwrite=%u)\n", This, pplay, pwrite);
/* the actual primary play position (pplay) is always behind last mixed (pmix), /* the actual primary play position (pplay) is always behind last mixed (pmix),
* unless the computer is too slow or something */ * unless the computer is too slow or something */
@ -426,17 +426,17 @@ DWORD DSOUND_CalcPlayPosition(IDirectSoundBufferImpl *This, DWORD pplay, DWORD p
if (pwrite < pplay) pwrite += device->buflen; /* wraparound */ if (pwrite < pplay) pwrite += device->buflen; /* wraparound */
pwrite -= pplay; pwrite -= pplay;
if (pmix > (ds_snd_queue_max * device->fraglen + pwrite + device->writelead)) { if (pmix > (ds_snd_queue_max * device->fraglen + pwrite + device->writelead)) {
WARN("detected an underrun: primary queue was %ld\n",pmix); WARN("detected an underrun: primary queue was %d\n",pmix);
pmix = 0; pmix = 0;
} }
/* divide the offset by its sample size */ /* divide the offset by its sample size */
pmix /= device->pwfx->nBlockAlign; pmix /= device->pwfx->nBlockAlign;
TRACE("primary back-samples=%ld\n",pmix); TRACE("primary back-samples=%d\n",pmix);
/* adjust for our frequency */ /* adjust for our frequency */
pmix = (pmix * This->freqAdjust) >> DSOUND_FREQSHIFT; pmix = (pmix * This->freqAdjust) >> DSOUND_FREQSHIFT;
/* multiply by our own sample size */ /* multiply by our own sample size */
pmix *= This->pwfx->nBlockAlign; pmix *= This->pwfx->nBlockAlign;
TRACE("this back-offset=%ld\n", pmix); TRACE("this back-offset=%d\n", pmix);
/* subtract from our last mixed position */ /* subtract from our last mixed position */
while (bplay < pmix) bplay += This->buflen; /* wraparound */ while (bplay < pmix) bplay += This->buflen; /* wraparound */
bplay -= pmix; bplay -= pmix;
@ -502,7 +502,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(
} }
if (playpos) if (playpos)
This->last_playpos = *playpos; This->last_playpos = *playpos;
TRACE("playpos = %ld, writepos = %ld (%p, time=%ld)\n", playpos?*playpos:0, writepos?*writepos:0, This, GetTickCount()); TRACE("playpos = %d, writepos = %d (%p, time=%d)\n", playpos?*playpos:0, writepos?*writepos:0, This, GetTickCount());
return DS_OK; return DS_OK;
} }
@ -510,7 +510,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(
LPDIRECTSOUNDBUFFER8 iface,LPDWORD status LPDIRECTSOUNDBUFFER8 iface,LPDWORD status
) { ) {
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
TRACE("(%p,%p), thread is %04lx\n",This,status,GetCurrentThreadId()); TRACE("(%p,%p), thread is %04x\n",This,status,GetCurrentThreadId());
if (status == NULL) { if (status == NULL) {
WARN("invalid parameter: status = NULL\n"); WARN("invalid parameter: status = NULL\n");
@ -524,7 +524,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(
*status |= DSBSTATUS_LOOPING; *status |= DSBSTATUS_LOOPING;
} }
TRACE("status=%lx\n", *status); TRACE("status=%x\n", *status);
return DS_OK; return DS_OK;
} }
@ -537,7 +537,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFormat(
{ {
DWORD size; DWORD size;
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
TRACE("(%p,%p,%ld,%p)\n",This,lpwf,wfsize,wfwritten); TRACE("(%p,%p,%d,%p)\n",This,lpwf,wfsize,wfwritten);
size = sizeof(WAVEFORMATEX) + This->pwfx->cbSize; size = sizeof(WAVEFORMATEX) + This->pwfx->cbSize;
@ -570,7 +570,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
TRACE("(%p,%ld,%ld,%p,%p,%p,%p,0x%08lx) at %ld\n", TRACE("(%p,%d,%d,%p,%p,%p,%p,0x%08x) at %d\n",
This, This,
writecursor, writecursor,
writebytes, writebytes,
@ -597,13 +597,13 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(
writebytes = This->buflen; writebytes = This->buflen;
if (writecursor >= This->buflen) { if (writecursor >= This->buflen) {
WARN("Invalid parameter, writecursor: %lu >= buflen: %lu\n", WARN("Invalid parameter, writecursor: %u >= buflen: %u\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: %lu > buflen: %lu\n", WARN("Invalid parameter, writebytes: %u > buflen: %u\n",
writebytes, This->buflen); writebytes, This->buflen);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -641,7 +641,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(
*(LPBYTE*)lplpaudioptr2 = NULL; *(LPBYTE*)lplpaudioptr2 = NULL;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = 0; *audiobytes2 = 0;
TRACE("->%ld.0\n",writebytes); TRACE("->%d.0\n",writebytes);
} else { } else {
*(LPBYTE*)lplpaudioptr1 = This->buffer->memory+writecursor; *(LPBYTE*)lplpaudioptr1 = This->buffer->memory+writecursor;
*audiobytes1 = This->buflen-writecursor; *audiobytes1 = This->buflen-writecursor;
@ -649,7 +649,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock(
*(LPBYTE*)lplpaudioptr2 = This->buffer->memory; *(LPBYTE*)lplpaudioptr2 = This->buffer->memory;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = writebytes-(This->buflen-writecursor); *audiobytes2 = writebytes-(This->buflen-writecursor);
TRACE("->%ld.%ld\n",*audiobytes1,audiobytes2?*audiobytes2:0); TRACE("->%d.%d\n",*audiobytes1,audiobytes2?*audiobytes2:0);
} }
if (This->state == STATE_PLAYING) { if (This->state == STATE_PLAYING) {
/* if the segment between playpos and buf_mixpos is touched, /* if the segment between playpos and buf_mixpos is touched,
@ -682,7 +682,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetCurrentPosition(
) { ) {
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,newpos); TRACE("(%p,%d)\n",This,newpos);
/* **** */ /* **** */
EnterCriticalSection(&(This->lock)); EnterCriticalSection(&(This->lock));
@ -707,10 +707,10 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetPan(
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,pan); TRACE("(%p,%d)\n",This,pan);
if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) { if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) {
WARN("invalid parameter: pan = %ld\n", pan); WARN("invalid parameter: pan = %d\n", pan);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -770,7 +770,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(
DWORD probably_valid_to; DWORD probably_valid_to;
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%p,%ld,%p,%ld)\n", This,p1,x1,p2,x2); TRACE("(%p,%p,%d,%p,%d)\n", This,p1,x1,p2,x2);
/* **** */ /* **** */
EnterCriticalSection(&(This->lock)); EnterCriticalSection(&(This->lock));
@ -796,7 +796,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock(
LeaveCriticalSection(&(This->lock)); LeaveCriticalSection(&(This->lock));
/* **** */ /* **** */
TRACE("probably_valid_to=%ld\n", This->probably_valid_to); TRACE("probably_valid_to=%d\n", This->probably_valid_to);
return hres; return hres;
} }
@ -820,7 +820,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFrequency(
} }
*freq = This->freq; *freq = This->freq;
TRACE("-> %ld\n", *freq); TRACE("-> %d\n", *freq);
return DS_OK; return DS_OK;
} }
@ -831,7 +831,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFX(
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
DWORD u; DWORD u;
FIXME("(%p,%lu,%p,%p): stub\n",This,dwEffectsCount,pDSFXDesc,pdwResultCodes); FIXME("(%p,%u,%p,%p): stub\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;
@ -846,7 +846,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_AcquireResources(
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
DWORD u; DWORD u;
FIXME("(%p,%08lu,%lu,%p): stub\n",This,dwFlags,dwEffectsCount,pdwResultCodes); FIXME("(%p,%08u,%u,%p): stub\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;
@ -860,7 +860,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetObjectInPath(
) { ) {
IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface; IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
FIXME("(%p,%s,%lu,%s,%p): stub\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject); FIXME("(%p,%s,%u,%s,%p): stub\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject);
WARN("control unavailable\n"); WARN("control unavailable\n");
return DSERR_CONTROLUNAVAIL; return DSERR_CONTROLUNAVAIL;
@ -888,7 +888,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCaps(
} }
if (caps->dwSize < sizeof(*caps)) { if (caps->dwSize < sizeof(*caps)) {
WARN("invalid parameter: caps->dwSize = %ld\n",caps->dwSize); WARN("invalid parameter: caps->dwSize = %d\n",caps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -1023,7 +1023,7 @@ HRESULT IDirectSoundBufferImpl_Create(
TRACE("(%p,%p,%p)\n",device,pdsb,dsbd); TRACE("(%p,%p,%p)\n",device,pdsb,dsbd);
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) { if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
WARN("invalid parameter: dsbd->dwBufferBytes = %ld\n", dsbd->dwBufferBytes); WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes);
*pdsb = NULL; *pdsb = NULL;
return DSERR_INVALIDPARAM; /* FIXME: which error? */ return DSERR_INVALIDPARAM; /* FIXME: which error? */
} }
@ -1084,7 +1084,7 @@ HRESULT IDirectSoundBufferImpl_Create(
else capf |= DSCAPS_SECONDARY8BIT; else capf |= DSCAPS_SECONDARY8BIT;
use_hw = (device->drvcaps.dwFlags & capf) == capf; use_hw = (device->drvcaps.dwFlags & capf) == capf;
TRACE("use_hw = 0x%08x, capf = 0x%08lx, device->drvcaps.dwFlags = 0x%08lx\n", use_hw, capf, device->drvcaps.dwFlags); TRACE("use_hw = 0x%08x, capf = 0x%08x, device->drvcaps.dwFlags = 0x%08x\n", use_hw, capf, device->drvcaps.dwFlags);
/* FIXME: check hardware sample rate mixing capabilities */ /* FIXME: check hardware sample rate mixing capabilities */
/* FIXME: check app hints for software/hardware buffer (STATIC, LOCHARDWARE, etc) */ /* FIXME: check app hints for software/hardware buffer (STATIC, LOCHARDWARE, etc) */
@ -1353,7 +1353,7 @@ static ULONG WINAPI SecondaryBufferImpl_AddRef(LPDIRECTSOUNDBUFFER8 iface)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -1363,7 +1363,7 @@ static ULONG WINAPI SecondaryBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface)
ULONG ref; ULONG ref;
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
ref = InterlockedDecrement(&(This->ref)); ref = InterlockedDecrement(&(This->ref));
TRACE("ref was %ld\n", ref + 1); TRACE("ref was %d\n", ref + 1);
if (!ref) { if (!ref) {
This->dsb->secondary = NULL; This->dsb->secondary = NULL;
@ -1396,7 +1396,7 @@ static HRESULT WINAPI SecondaryBufferImpl_GetFormat(
LPDIRECTSOUNDBUFFER8 iface,LPWAVEFORMATEX lpwf,DWORD wfsize,LPDWORD wfwritten) LPDIRECTSOUNDBUFFER8 iface,LPWAVEFORMATEX lpwf,DWORD wfsize,LPDWORD wfwritten)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%p,%ld,%p)\n",This,lpwf,wfsize,wfwritten); TRACE("(%p,%p,%d,%p)\n",This,lpwf,wfsize,wfwritten);
return IDirectSoundBufferImpl_GetFormat((LPDIRECTSOUNDBUFFER8)This->dsb,lpwf,wfsize,wfwritten); return IDirectSoundBufferImpl_GetFormat((LPDIRECTSOUNDBUFFER8)This->dsb,lpwf,wfsize,wfwritten);
} }
@ -1457,7 +1457,7 @@ static HRESULT WINAPI SecondaryBufferImpl_Lock(
DWORD dwFlags) DWORD dwFlags)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%ld,%ld,%p,%p,%p,%p,0x%08lx)\n", TRACE("(%p,%d,%d,%p,%p,%p,%p,0x%08x)\n",
This,writecursor,writebytes,lplpaudioptr1,audiobytes1,lplpaudioptr2,audiobytes2,dwFlags); This,writecursor,writebytes,lplpaudioptr1,audiobytes1,lplpaudioptr2,audiobytes2,dwFlags);
return IDirectSoundBufferImpl_Lock((LPDIRECTSOUNDBUFFER8)This->dsb, return IDirectSoundBufferImpl_Lock((LPDIRECTSOUNDBUFFER8)This->dsb,
@ -1468,7 +1468,7 @@ static HRESULT WINAPI SecondaryBufferImpl_Play(
LPDIRECTSOUNDBUFFER8 iface,DWORD reserved1,DWORD reserved2,DWORD flags) LPDIRECTSOUNDBUFFER8 iface,DWORD reserved1,DWORD reserved2,DWORD flags)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%08lx,%08lx,%08lx)\n",This,reserved1,reserved2,flags); TRACE("(%p,%08x,%08x,%08x)\n",This,reserved1,reserved2,flags);
return IDirectSoundBufferImpl_Play((LPDIRECTSOUNDBUFFER8)This->dsb,reserved1,reserved2,flags); return IDirectSoundBufferImpl_Play((LPDIRECTSOUNDBUFFER8)This->dsb,reserved1,reserved2,flags);
} }
@ -1477,7 +1477,7 @@ static HRESULT WINAPI SecondaryBufferImpl_SetCurrentPosition(
LPDIRECTSOUNDBUFFER8 iface,DWORD newpos) LPDIRECTSOUNDBUFFER8 iface,DWORD newpos)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,newpos); TRACE("(%p,%d)\n",This,newpos);
return IDirectSoundBufferImpl_SetCurrentPosition((LPDIRECTSOUNDBUFFER8)This->dsb,newpos); return IDirectSoundBufferImpl_SetCurrentPosition((LPDIRECTSOUNDBUFFER8)This->dsb,newpos);
} }
@ -1495,7 +1495,7 @@ static HRESULT WINAPI SecondaryBufferImpl_SetVolume(
LPDIRECTSOUNDBUFFER8 iface,LONG vol) LPDIRECTSOUNDBUFFER8 iface,LONG vol)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,vol); TRACE("(%p,%d)\n",This,vol);
return IDirectSoundBufferImpl_SetVolume((LPDIRECTSOUNDBUFFER8)This->dsb,vol); return IDirectSoundBufferImpl_SetVolume((LPDIRECTSOUNDBUFFER8)This->dsb,vol);
} }
@ -1504,7 +1504,7 @@ static HRESULT WINAPI SecondaryBufferImpl_SetPan(
LPDIRECTSOUNDBUFFER8 iface,LONG pan) LPDIRECTSOUNDBUFFER8 iface,LONG pan)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,pan); TRACE("(%p,%d)\n",This,pan);
return IDirectSoundBufferImpl_SetPan((LPDIRECTSOUNDBUFFER8)This->dsb,pan); return IDirectSoundBufferImpl_SetPan((LPDIRECTSOUNDBUFFER8)This->dsb,pan);
} }
@ -1513,7 +1513,7 @@ static HRESULT WINAPI SecondaryBufferImpl_SetFrequency(
LPDIRECTSOUNDBUFFER8 iface,DWORD freq) LPDIRECTSOUNDBUFFER8 iface,DWORD freq)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,freq); TRACE("(%p,%d)\n",This,freq);
return IDirectSoundBufferImpl_SetFrequency((LPDIRECTSOUNDBUFFER8)This->dsb,freq); return IDirectSoundBufferImpl_SetFrequency((LPDIRECTSOUNDBUFFER8)This->dsb,freq);
} }
@ -1534,7 +1534,7 @@ static HRESULT WINAPI SecondaryBufferImpl_Unlock(
DWORD dwAudioBytes2) DWORD dwAudioBytes2)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%p,%ld,%p,%ld)\n", TRACE("(%p,%p,%d,%p,%d)\n",
This, lpvAudioPtr1, dwAudioBytes1, lpvAudioPtr2, dwAudioBytes2); This, lpvAudioPtr1, dwAudioBytes1, lpvAudioPtr2, dwAudioBytes2);
return IDirectSoundBufferImpl_Unlock((LPDIRECTSOUNDBUFFER8)This->dsb, return IDirectSoundBufferImpl_Unlock((LPDIRECTSOUNDBUFFER8)This->dsb,
@ -1554,7 +1554,7 @@ static HRESULT WINAPI SecondaryBufferImpl_SetFX(
LPDIRECTSOUNDBUFFER8 iface,DWORD dwEffectsCount,LPDSEFFECTDESC pDSFXDesc,LPDWORD pdwResultCodes) LPDIRECTSOUNDBUFFER8 iface,DWORD dwEffectsCount,LPDSEFFECTDESC pDSFXDesc,LPDWORD pdwResultCodes)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%lu,%p,%p)\n",This,dwEffectsCount,pDSFXDesc,pdwResultCodes); TRACE("(%p,%u,%p,%p)\n",This,dwEffectsCount,pDSFXDesc,pdwResultCodes);
return IDirectSoundBufferImpl_SetFX((LPDIRECTSOUNDBUFFER8)This->dsb,dwEffectsCount,pDSFXDesc,pdwResultCodes); return IDirectSoundBufferImpl_SetFX((LPDIRECTSOUNDBUFFER8)This->dsb,dwEffectsCount,pDSFXDesc,pdwResultCodes);
} }
@ -1563,7 +1563,7 @@ static HRESULT WINAPI SecondaryBufferImpl_AcquireResources(
LPDIRECTSOUNDBUFFER8 iface,DWORD dwFlags,DWORD dwEffectsCount,LPDWORD pdwResultCodes) LPDIRECTSOUNDBUFFER8 iface,DWORD dwFlags,DWORD dwEffectsCount,LPDWORD pdwResultCodes)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%08lu,%lu,%p)\n",This,dwFlags,dwEffectsCount,pdwResultCodes); TRACE("(%p,%08u,%u,%p)\n",This,dwFlags,dwEffectsCount,pdwResultCodes);
return IDirectSoundBufferImpl_AcquireResources((LPDIRECTSOUNDBUFFER8)This->dsb,dwFlags,dwEffectsCount,pdwResultCodes); return IDirectSoundBufferImpl_AcquireResources((LPDIRECTSOUNDBUFFER8)This->dsb,dwFlags,dwEffectsCount,pdwResultCodes);
} }
@ -1572,7 +1572,7 @@ static HRESULT WINAPI SecondaryBufferImpl_GetObjectInPath(
LPDIRECTSOUNDBUFFER8 iface,REFGUID rguidObject,DWORD dwIndex,REFGUID rguidInterface,LPVOID* ppObject) LPDIRECTSOUNDBUFFER8 iface,REFGUID rguidObject,DWORD dwIndex,REFGUID rguidInterface,LPVOID* ppObject)
{ {
SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface; SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
TRACE("(%p,%s,%lu,%s,%p)\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject); TRACE("(%p,%s,%u,%s,%p)\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject);
return IDirectSoundBufferImpl_GetObjectInPath((LPDIRECTSOUNDBUFFER8)This->dsb,rguidObject,dwIndex,rguidInterface,ppObject); return IDirectSoundBufferImpl_GetObjectInPath((LPDIRECTSOUNDBUFFER8)This->dsb,rguidObject,dwIndex,rguidInterface,ppObject);
} }

View file

@ -394,7 +394,7 @@ DSOUND_capture_callback(
DWORD dw2 ) DWORD dw2 )
{ {
DirectSoundCaptureDevice * This = (DirectSoundCaptureDevice*)dwUser; DirectSoundCaptureDevice * This = (DirectSoundCaptureDevice*)dwUser;
TRACE("(%p,%08x(%s),%08lx,%08lx,%08lx) entering at %ld\n",hwi,msg, TRACE("(%p,%08x(%s),%08x,%08x,%08x) entering at %d\n",hwi,msg,
msg == MM_WIM_OPEN ? "MM_WIM_OPEN" : msg == MM_WIM_CLOSE ? "MM_WIM_CLOSE" : msg == MM_WIM_OPEN ? "MM_WIM_OPEN" : msg == MM_WIM_CLOSE ? "MM_WIM_CLOSE" :
msg == MM_WIM_DATA ? "MM_WIM_DATA" : "UNKNOWN",dwUser,dw1,dw2,GetTickCount()); msg == MM_WIM_DATA ? "MM_WIM_DATA" : "UNKNOWN",dwUser,dw1,dw2,GetTickCount());
@ -470,7 +470,7 @@ IDirectSoundCaptureImpl_AddRef( LPDIRECTSOUNDCAPTURE iface )
{ {
IDirectSoundCaptureImpl *This = (IDirectSoundCaptureImpl *)iface; IDirectSoundCaptureImpl *This = (IDirectSoundCaptureImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -479,7 +479,7 @@ IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface )
{ {
IDirectSoundCaptureImpl *This = (IDirectSoundCaptureImpl *)iface; IDirectSoundCaptureImpl *This = (IDirectSoundCaptureImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
if (This->device) if (This->device)
@ -550,7 +550,7 @@ HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(
} }
if (lpDSCCaps->dwSize < sizeof(*lpDSCCaps)) { if (lpDSCCaps->dwSize < sizeof(*lpDSCCaps)) {
WARN("invalid parameter: lpDSCCaps->dwSize = %ld\n", lpDSCCaps->dwSize); WARN("invalid parameter: lpDSCCaps->dwSize = %d\n", lpDSCCaps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -558,7 +558,7 @@ HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(
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%08lx,format=0x%08lx,channels=%ld)\n",lpDSCCaps->dwFlags, TRACE("(flags=0x%08x,format=0x%08x,channels=%d)\n",lpDSCCaps->dwFlags,
lpDSCCaps->dwFormats, lpDSCCaps->dwChannels); lpDSCCaps->dwFormats, lpDSCCaps->dwChannels);
return DS_OK; return DS_OK;
@ -638,7 +638,7 @@ static ULONG WINAPI IDirectSoundCaptureNotifyImpl_AddRef(LPDIRECTSOUNDNOTIFY ifa
{ {
IDirectSoundCaptureNotifyImpl *This = (IDirectSoundCaptureNotifyImpl *)iface; IDirectSoundCaptureNotifyImpl *This = (IDirectSoundCaptureNotifyImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -646,7 +646,7 @@ static ULONG WINAPI IDirectSoundCaptureNotifyImpl_Release(LPDIRECTSOUNDNOTIFY if
{ {
IDirectSoundCaptureNotifyImpl *This = (IDirectSoundCaptureNotifyImpl *)iface; IDirectSoundCaptureNotifyImpl *This = (IDirectSoundCaptureNotifyImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
if (This->dscb->hwnotify) if (This->dscb->hwnotify)
@ -665,7 +665,7 @@ static HRESULT WINAPI IDirectSoundCaptureNotifyImpl_SetNotificationPositions(
LPCDSBPOSITIONNOTIFY notify) LPCDSBPOSITIONNOTIFY notify)
{ {
IDirectSoundCaptureNotifyImpl *This = (IDirectSoundCaptureNotifyImpl *)iface; IDirectSoundCaptureNotifyImpl *This = (IDirectSoundCaptureNotifyImpl *)iface;
TRACE("(%p,0x%08lx,%p)\n",This,howmuch,notify); TRACE("(%p,0x%08x,%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");
@ -675,7 +675,7 @@ static HRESULT WINAPI IDirectSoundCaptureNotifyImpl_SetNotificationPositions(
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 %ld to %p\n", TRACE("notify at %d to %p\n",
notify[i].dwOffset,notify[i].hEventNotify); notify[i].dwOffset,notify[i].hEventNotify);
} }
@ -801,7 +801,7 @@ IDirectSoundCaptureBufferImpl_AddRef( LPDIRECTSOUNDCAPTUREBUFFER8 iface )
{ {
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -810,7 +810,7 @@ IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER8 iface )
{ {
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
TRACE("deleting object\n"); TRACE("deleting object\n");
@ -857,7 +857,7 @@ IDirectSoundCaptureBufferImpl_GetCaps(
} }
if (lpDSCBCaps->dwSize < sizeof(DSCBCAPS)) { if (lpDSCBCaps->dwSize < sizeof(DSCBCAPS)) {
WARN("invalid parameter: lpDSCBCaps->dwSize = %ld\n", lpDSCBCaps->dwSize); WARN("invalid parameter: lpDSCBCaps->dwSize = %d\n", lpDSCBCaps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -901,7 +901,7 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
MMTIME mtime; MMTIME mtime;
mtime.wType = TIME_BYTES; mtime.wType = TIME_BYTES;
waveInGetPosition(This->device->hwi, &mtime, sizeof(mtime)); waveInGetPosition(This->device->hwi, &mtime, sizeof(mtime));
TRACE("mtime.u.cb=%ld,This->device->buflen=%ld\n", mtime.u.cb, TRACE("mtime.u.cb=%d,This->device->buflen=%d\n", mtime.u.cb,
This->device->buflen); This->device->buflen);
mtime.u.cb = mtime.u.cb % This->device->buflen; mtime.u.cb = mtime.u.cb % This->device->buflen;
*lpdwCapturePosition = mtime.u.cb; *lpdwCapturePosition = mtime.u.cb;
@ -917,14 +917,14 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
} }
TRACE("new This->device->state=%s\n",captureStateString[This->device->state]); TRACE("new This->device->state=%s\n",captureStateString[This->device->state]);
LeaveCriticalSection(&(This->device->lock)); LeaveCriticalSection(&(This->device->lock));
if (lpdwCapturePosition) TRACE("*lpdwCapturePosition=%ld\n",*lpdwCapturePosition); if (lpdwCapturePosition) TRACE("*lpdwCapturePosition=%d\n",*lpdwCapturePosition);
if (lpdwReadPosition) TRACE("*lpdwReadPosition=%ld\n",*lpdwReadPosition); if (lpdwReadPosition) TRACE("*lpdwReadPosition=%d\n",*lpdwReadPosition);
} else { } else {
WARN("no driver\n"); WARN("no driver\n");
hres = DSERR_NODRIVER; hres = DSERR_NODRIVER;
} }
TRACE("returning %08lx\n", hres); TRACE("returning %08x\n", hres);
return hres; return hres;
} }
@ -937,7 +937,7 @@ IDirectSoundCaptureBufferImpl_GetFormat(
{ {
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE( "(%p,%p,0x%08lx,%p)\n", This, lpwfxFormat, dwSizeAllocated, TRACE( "(%p,%p,0x%08x,%p)\n", This, lpwfxFormat, dwSizeAllocated,
lpdwSizeWritten ); lpdwSizeWritten );
if (This->device == NULL) { if (This->device == NULL) {
@ -961,7 +961,7 @@ IDirectSoundCaptureBufferImpl_GetFormat(
} }
} }
TRACE("returning %08lx\n", hres); TRACE("returning %08x\n", hres);
return hres; return hres;
} }
@ -971,7 +971,7 @@ IDirectSoundCaptureBufferImpl_GetStatus(
LPDWORD lpdwStatus ) LPDWORD lpdwStatus )
{ {
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p, %p), thread is %04lx\n", This, lpdwStatus, GetCurrentThreadId() ); TRACE( "(%p, %p), thread is %04x\n", This, lpdwStatus, GetCurrentThreadId() );
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
@ -986,7 +986,7 @@ IDirectSoundCaptureBufferImpl_GetStatus(
*lpdwStatus = 0; *lpdwStatus = 0;
EnterCriticalSection(&(This->device->lock)); EnterCriticalSection(&(This->device->lock));
TRACE("old This->device->state=%s, old lpdwStatus=%08lx\n", TRACE("old This->device->state=%s, old lpdwStatus=%08x\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)) {
@ -994,11 +994,11 @@ IDirectSoundCaptureBufferImpl_GetStatus(
if (This->flags & DSCBSTART_LOOPING) if (This->flags & DSCBSTART_LOOPING)
*lpdwStatus |= DSCBSTATUS_LOOPING; *lpdwStatus |= DSCBSTATUS_LOOPING;
} }
TRACE("new This->device->state=%s, new lpdwStatus=%08lx\n", TRACE("new This->device->state=%s, new lpdwStatus=%08x\n",
captureStateString[This->device->state],*lpdwStatus); captureStateString[This->device->state],*lpdwStatus);
LeaveCriticalSection(&(This->device->lock)); LeaveCriticalSection(&(This->device->lock));
TRACE("status=%lx\n", *lpdwStatus); TRACE("status=%x\n", *lpdwStatus);
TRACE("returning DS_OK\n"); TRACE("returning DS_OK\n");
return DS_OK; return DS_OK;
} }
@ -1029,7 +1029,7 @@ IDirectSoundCaptureBufferImpl_Lock(
{ {
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p,%08lu,%08lu,%p,%p,%p,%p,0x%08lx) at %ld\n", This, dwReadCusor, TRACE( "(%p,%08u,%08u,%p,%p,%p,%p,0x%08x) at %d\n", This, dwReadCusor,
dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2, dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2,
lpdwAudioBytes2, dwFlags, GetTickCount() ); lpdwAudioBytes2, dwFlags, GetTickCount() );
@ -1079,7 +1079,7 @@ IDirectSoundCaptureBufferImpl_Lock(
LeaveCriticalSection(&(This->device->lock)); LeaveCriticalSection(&(This->device->lock));
TRACE("returning %08lx\n", hres); TRACE("returning %08x\n", hres);
return hres; return hres;
} }
@ -1090,7 +1090,7 @@ IDirectSoundCaptureBufferImpl_Start(
{ {
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p,0x%08lx)\n", This, dwFlags ); TRACE( "(%p,0x%08x)\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");
@ -1233,7 +1233,7 @@ IDirectSoundCaptureBufferImpl_Start(
hres = DSERR_NODRIVER; hres = DSERR_NODRIVER;
} }
TRACE("returning %08lx\n", hres); TRACE("returning %08x\n", hres);
return hres; return hres;
} }
@ -1273,7 +1273,7 @@ IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER8 iface )
hres = DSERR_NODRIVER; hres = DSERR_NODRIVER;
} }
TRACE("returning %08lx\n", hres); TRACE("returning %08x\n", hres);
return hres; return hres;
} }
@ -1287,7 +1287,7 @@ IDirectSoundCaptureBufferImpl_Unlock(
{ {
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p,%p,%08lu,%p,%08lu)\n", This, lpvAudioPtr1, dwAudioBytes1, TRACE( "(%p,%p,%08u,%p,%08u)\n", This, lpvAudioPtr1, dwAudioBytes1,
lpvAudioPtr2, dwAudioBytes2 ); lpvAudioPtr2, dwAudioBytes2 );
if (lpvAudioPtr1 == NULL) { if (lpvAudioPtr1 == NULL) {
@ -1308,7 +1308,7 @@ IDirectSoundCaptureBufferImpl_Unlock(
hres = DSERR_INVALIDCALL; hres = DSERR_INVALIDCALL;
} }
TRACE("returning %08lx\n", hres); TRACE("returning %08x\n", hres);
return hres; return hres;
} }
@ -1322,7 +1322,7 @@ IDirectSoundCaptureBufferImpl_GetObjectInPath(
{ {
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
FIXME( "(%p,%s,%lu,%s,%p): stub\n", This, debugstr_guid(rguidObject), FIXME( "(%p,%s,%u,%s,%p): stub\n", This, debugstr_guid(rguidObject),
dwIndex, debugstr_guid(rguidInterface), ppObject ); dwIndex, debugstr_guid(rguidInterface), ppObject );
return DS_OK; return DS_OK;
@ -1336,7 +1336,7 @@ IDirectSoundCaptureBufferImpl_GetFXStatus(
{ {
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
FIXME( "(%p,%lu,%p): stub\n", This, dwFXCount, pdwFXStatus ); FIXME( "(%p,%u,%p): stub\n", This, dwFXCount, pdwFXStatus );
return DS_OK; return DS_OK;
} }
@ -1401,8 +1401,8 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
wfex = lpcDSCBufferDesc->lpwfxFormat; wfex = lpcDSCBufferDesc->lpwfxFormat;
if (wfex) { if (wfex) {
TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld," TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"
"bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%d,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);
@ -1462,7 +1462,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
if (This->device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY) { if (This->device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY) {
/* allocate buffer from system memory */ /* allocate buffer from system memory */
buflen = lpcDSCBufferDesc->dwBufferBytes; buflen = lpcDSCBufferDesc->dwBufferBytes;
TRACE("desired buflen=%ld, old buffer=%p\n", buflen, device->buffer); TRACE("desired buflen=%d, 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
@ -1509,7 +1509,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
} }
buflen = lpcDSCBufferDesc->dwBufferBytes; buflen = lpcDSCBufferDesc->dwBufferBytes;
TRACE("desired buflen=%ld, old buffer=%p\n", buflen, device->buffer); TRACE("desired buflen=%d, 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
@ -1587,7 +1587,7 @@ HRESULT DirectSoundCaptureDevice_Initialize(
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&(device->driver),0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&(device->driver),0));
if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) { if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) {
WARN("waveInMessage failed; err=%lx\n",err); WARN("waveInMessage failed; err=%x\n",err);
return err; return err;
} }
err = DS_OK; err = DS_OK;
@ -1676,7 +1676,7 @@ ULONG DirectSoundCaptureDevice_AddRef(
DirectSoundCaptureDevice * device) DirectSoundCaptureDevice * device)
{ {
ULONG ref = InterlockedIncrement(&(device->ref)); ULONG ref = InterlockedIncrement(&(device->ref));
TRACE("(%p) ref was %ld\n", device, ref - 1); TRACE("(%p) ref was %d\n", device, ref - 1);
return ref; return ref;
} }
@ -1684,7 +1684,7 @@ ULONG DirectSoundCaptureDevice_Release(
DirectSoundCaptureDevice * device) DirectSoundCaptureDevice * device)
{ {
ULONG ref = InterlockedDecrement(&(device->ref)); ULONG ref = InterlockedDecrement(&(device->ref));
TRACE("(%p) ref was %ld\n", device, ref + 1); TRACE("(%p) ref was %d\n", device, ref + 1);
if (!ref) { if (!ref) {
TRACE("deleting object\n"); TRACE("deleting object\n");

View file

@ -119,7 +119,7 @@ const char * dumpCooperativeLevel(DWORD level)
LE(DSSCL_WRITEPRIMARY); LE(DSSCL_WRITEPRIMARY);
} }
#undef LE #undef LE
sprintf(unknown, "Unknown(%08lx)", level); sprintf(unknown, "Unknown(%08x)", level);
return unknown; return unknown;
} }
@ -285,7 +285,7 @@ static ULONG IDirectSoundImpl_AddRef(
{ {
IDirectSoundImpl *This = (IDirectSoundImpl *)iface; IDirectSoundImpl *This = (IDirectSoundImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -294,7 +294,7 @@ static ULONG IDirectSoundImpl_Release(
{ {
IDirectSoundImpl *This = (IDirectSoundImpl *)iface; IDirectSoundImpl *This = (IDirectSoundImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
if (This->device) if (This->device)
@ -345,7 +345,7 @@ static ULONG WINAPI IDirectSound_IUnknown_AddRef(
{ {
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface; IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -354,7 +354,7 @@ static ULONG WINAPI IDirectSound_IUnknown_Release(
{ {
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface; IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundImpl_Release(This->pds); IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -423,7 +423,7 @@ static ULONG WINAPI IDirectSound_IDirectSound_AddRef(
{ {
IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface; IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -432,7 +432,7 @@ static ULONG WINAPI IDirectSound_IDirectSound_Release(
{ {
IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface; IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundImpl_Release(This->pds); IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -503,7 +503,7 @@ static HRESULT WINAPI IDirectSound_IDirectSound_SetSpeakerConfig(
DWORD config) DWORD config)
{ {
IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface; IDirectSound_IDirectSound *This = (IDirectSound_IDirectSound *)iface;
TRACE("(%p,0x%08lx)\n",This,config); TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config); return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config);
} }
@ -584,7 +584,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_AddRef(
{ {
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface; IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -593,7 +593,7 @@ static ULONG WINAPI IDirectSound8_IUnknown_Release(
{ {
IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface; IDirectSound_IUnknown *This = (IDirectSound_IUnknown *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundImpl_Release(This->pds); IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -662,7 +662,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound_AddRef(
{ {
IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface; IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -671,7 +671,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound_Release(
{ {
IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface; IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundImpl_Release(This->pds); IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -742,7 +742,7 @@ static HRESULT WINAPI IDirectSound8_IDirectSound_SetSpeakerConfig(
DWORD config) DWORD config)
{ {
IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface; IDirectSound8_IDirectSound *This = (IDirectSound8_IDirectSound *)iface;
TRACE("(%p,0x%08lx)\n",This,config); TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config); return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config);
} }
@ -823,7 +823,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound8_AddRef(
{ {
IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface; IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -832,7 +832,7 @@ static ULONG WINAPI IDirectSound8_IDirectSound8_Release(
{ {
IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface; IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundImpl_Release(This->pds); IDirectSoundImpl_Release(This->pds);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -903,7 +903,7 @@ static HRESULT WINAPI IDirectSound8_IDirectSound8_SetSpeakerConfig(
DWORD config) DWORD config)
{ {
IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface; IDirectSound8_IDirectSound8 *This = (IDirectSound8_IDirectSound8 *)iface;
TRACE("(%p,0x%08lx)\n",This,config); TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config); return DirectSoundDevice_SetSpeakerConfig(((IDirectSoundImpl *)This->pds)->device,config);
} }
@ -1236,7 +1236,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 was %ld\n", device, ref - 1); TRACE("(%p) ref was %d\n", device, ref - 1);
return ref; return ref;
} }
@ -1244,7 +1244,7 @@ ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
{ {
HRESULT hr; HRESULT hr;
ULONG ref = InterlockedDecrement(&(device->ref)); ULONG ref = InterlockedDecrement(&(device->ref));
TRACE("(%p) ref was %lu\n", device, ref + 1); TRACE("(%p) ref was %u\n", device, ref + 1);
if (!ref) { if (!ref) {
int i; int i;
timeKillEvent(device->timerID); timeKillEvent(device->timerID);
@ -1314,13 +1314,13 @@ HRESULT DirectSoundDevice_GetCaps(
/* check if there is enough room */ /* check if there is enough room */
if (lpDSCaps->dwSize < sizeof(*lpDSCaps)) { if (lpDSCaps->dwSize < sizeof(*lpDSCaps)) {
WARN("invalid parameter: lpDSCaps->dwSize = %ld\n", lpDSCaps->dwSize); WARN("invalid parameter: lpDSCaps->dwSize = %d\n", lpDSCaps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
lpDSCaps->dwFlags = device->drvcaps.dwFlags; lpDSCaps->dwFlags = device->drvcaps.dwFlags;
if (TRACE_ON(dsound)) { if (TRACE_ON(dsound)) {
TRACE("(flags=0x%08lx:\n",lpDSCaps->dwFlags); TRACE("(flags=0x%08x:\n",lpDSCaps->dwFlags);
_dump_DSCAPS(lpDSCaps->dwFlags); _dump_DSCAPS(lpDSCaps->dwFlags);
DPRINTF(")\n"); DPRINTF(")\n");
} }
@ -1561,11 +1561,11 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
} }
if (TRACE_ON(dsound)) { if (TRACE_ON(dsound)) {
TRACE("(structsize=%ld)\n",dsbd->dwSize); TRACE("(structsize=%d)\n",dsbd->dwSize);
TRACE("(flags=0x%08lx:\n",dsbd->dwFlags); TRACE("(flags=0x%08x:\n",dsbd->dwFlags);
_dump_DSBCAPS(dsbd->dwFlags); _dump_DSBCAPS(dsbd->dwFlags);
DPRINTF(")\n"); DPRINTF(")\n");
TRACE("(bufferbytes=%ld)\n",dsbd->dwBufferBytes); TRACE("(bufferbytes=%d)\n",dsbd->dwBufferBytes);
TRACE("(lpwfxFormat=%p)\n",dsbd->lpwfxFormat); TRACE("(lpwfxFormat=%p)\n",dsbd->lpwfxFormat);
} }
@ -1598,8 +1598,8 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld," TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"
"bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%d,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,
@ -1741,7 +1741,7 @@ HRESULT DirectSoundDevice_SetSpeakerConfig(
DirectSoundDevice * device, DirectSoundDevice * device,
DWORD config) DWORD config)
{ {
TRACE("(%p,0x%08lx)\n",device,config); TRACE("(%p,0x%08x)\n",device,config);
if (device == NULL) { if (device == NULL) {
WARN("not initialized\n"); WARN("not initialized\n");

View file

@ -449,7 +449,7 @@ static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface)
{ {
IClassFactoryImpl *This = (IClassFactoryImpl *)iface; IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -457,7 +457,7 @@ static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
{ {
IClassFactoryImpl *This = (IClassFactoryImpl *)iface; IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
/* static class, won't be freed */ /* static class, won't be freed */
return ref; return ref;
} }
@ -583,7 +583,7 @@ HRESULT WINAPI DllCanUnloadNow(void)
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
int i; int i;
TRACE("(%p %ld %p)\n", hInstDLL, fdwReason, lpvReserved); TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpvReserved);
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:

View file

@ -57,7 +57,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IUnknown_AddRef(
{ {
IDirectSoundFullDuplex_IUnknown *This = (IDirectSoundFullDuplex_IUnknown *)iface; IDirectSoundFullDuplex_IUnknown *This = (IDirectSoundFullDuplex_IUnknown *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -66,7 +66,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IUnknown_Release(
{ {
IDirectSoundFullDuplex_IUnknown *This = (IDirectSoundFullDuplex_IUnknown *)iface; IDirectSoundFullDuplex_IUnknown *This = (IDirectSoundFullDuplex_IUnknown *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSound_Release(This->pdsfd->pUnknown); IDirectSound_Release(This->pdsfd->pUnknown);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -133,7 +133,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound_AddRef(
{ {
IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface; IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -142,7 +142,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound_Release(
{ {
IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface; IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSound_Release(This->pdsfd->pDS); IDirectSound_Release(This->pdsfd->pDS);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -213,7 +213,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound_SetSpeakerConfig(
DWORD config) DWORD config)
{ {
IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface; IDirectSoundFullDuplex_IDirectSound *This = (IDirectSoundFullDuplex_IDirectSound *)iface;
TRACE("(%p,0x%08lx)\n",This,config); TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(This->pdsfd->renderer_device,config); return DirectSoundDevice_SetSpeakerConfig(This->pdsfd->renderer_device,config);
} }
@ -298,7 +298,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound8_AddRef(
{ {
IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface; IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -307,7 +307,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSound8_Release(
{ {
IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface; IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSound_Release(This->pdsfd->pDS8); IDirectSound_Release(This->pdsfd->pDS8);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -378,7 +378,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_SetSpeakerConfig(
DWORD config) DWORD config)
{ {
IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface; IDirectSoundFullDuplex_IDirectSound8 *This = (IDirectSoundFullDuplex_IDirectSound8 *)iface;
TRACE("(%p,0x%08lx)\n",This,config); TRACE("(%p,0x%08x)\n",This,config);
return DirectSoundDevice_SetSpeakerConfig(This->pdsfd->renderer_device,config); return DirectSoundDevice_SetSpeakerConfig(This->pdsfd->renderer_device,config);
} }
@ -463,7 +463,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_AddRef(
{ {
IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -472,7 +472,7 @@ static ULONG WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_Release(
{ {
IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface; IDirectSoundFullDuplex_IDirectSoundCapture *This = (IDirectSoundFullDuplex_IDirectSoundCapture *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
IDirectSoundCapture_Release(This->pdsfd->pDSC); IDirectSoundCapture_Release(This->pdsfd->pDSC);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -567,7 +567,7 @@ IDirectSoundFullDuplexImpl_AddRef( LPDIRECTSOUNDFULLDUPLEX iface )
{ {
IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface; IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -649,7 +649,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface )
{ {
IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface; IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
if (!ref) { if (!ref) {
if (This->capture_device) if (This->capture_device)
@ -678,7 +678,7 @@ IDirectSoundFullDuplexImpl_Initialize(
IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface; IDirectSoundFullDuplexImpl *This = (IDirectSoundFullDuplexImpl *)iface;
IDirectSoundBufferImpl * dsb; IDirectSoundBufferImpl * dsb;
TRACE("(%p,%s,%s,%p,%p,%lx,%lx,%p,%p)\n", This, TRACE("(%p,%s,%s,%p,%p,%x,%x,%p,%p)\n", This,
debugstr_guid(pCaptureGuid), debugstr_guid(pRendererGuid), debugstr_guid(pCaptureGuid), debugstr_guid(pRendererGuid),
lpDscBufferDesc, lpDsBufferDesc, (DWORD)hWnd, dwLevel, lpDscBufferDesc, lpDsBufferDesc, (DWORD)hWnd, dwLevel,
lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8); lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8);
@ -837,7 +837,7 @@ DirectSoundFullDuplexCreate(
{ {
HRESULT hres; HRESULT hres;
IDirectSoundFullDuplexImpl *This = NULL; IDirectSoundFullDuplexImpl *This = NULL;
TRACE("(%s,%s,%p,%p,%p,%lx,%p,%p,%p,%p)\n", TRACE("(%s,%s,%p,%p,%p,%x,%p,%p,%p,%p)\n",
debugstr_guid(pcGuidCaptureDevice), debugstr_guid(pcGuidRenderDevice), debugstr_guid(pcGuidCaptureDevice), debugstr_guid(pcGuidRenderDevice),
pcDSCBufferDesc, pcDSBufferDesc, hWnd, dwLevel, ppDSFD, ppDSCBuffer8, pcDSCBufferDesc, pcDSBufferDesc, hWnd, dwLevel, ppDSFD, ppDSCBuffer8,
ppDSBuffer8, pUnkOuter); ppDSBuffer8, pUnkOuter);

View file

@ -43,7 +43,7 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan)
double temp; double temp;
TRACE("(%p)\n",volpan); TRACE("(%p)\n",volpan);
TRACE("Vol=%ld Pan=%ld\n", volpan->lVolume, volpan->lPan); TRACE("Vol=%d Pan=%d\n", volpan->lVolume, volpan->lPan);
/* the AmpFactors are expressed in 16.16 fixed point */ /* the AmpFactors are expressed in 16.16 fixed point */
volpan->dwVolAmpFactor = (ULONG) (pow(2.0, volpan->lVolume / 600.0) * 0xffff); volpan->dwVolAmpFactor = (ULONG) (pow(2.0, volpan->lVolume / 600.0) * 0xffff);
/* FIXME: dwPan{Left|Right}AmpFactor */ /* FIXME: dwPan{Left|Right}AmpFactor */
@ -54,7 +54,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->dwTotalRightAmpFactor = (ULONG) (pow(2.0, temp / 600.0) * 0xffff); volpan->dwTotalRightAmpFactor = (ULONG) (pow(2.0, temp / 600.0) * 0xffff);
TRACE("left = %lx, right = %lx\n", volpan->dwTotalLeftAmpFactor, volpan->dwTotalRightAmpFactor); TRACE("left = %x, right = %x\n", volpan->dwTotalLeftAmpFactor, volpan->dwTotalRightAmpFactor);
} }
void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan) void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
@ -62,7 +62,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
double left,right; double left,right;
TRACE("(%p)\n",volpan); TRACE("(%p)\n",volpan);
TRACE("left=%lx, right=%lx\n",volpan->dwTotalLeftAmpFactor,volpan->dwTotalRightAmpFactor); TRACE("left=%x, right=%x\n",volpan->dwTotalLeftAmpFactor,volpan->dwTotalRightAmpFactor);
if (volpan->dwTotalLeftAmpFactor==0) if (volpan->dwTotalLeftAmpFactor==0)
left=-10000; left=-10000;
else else
@ -87,7 +87,7 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
if (volpan->lPan < -10000) if (volpan->lPan < -10000)
volpan->lPan=-10000; volpan->lPan=-10000;
TRACE("Vol=%ld Pan=%ld\n", volpan->lVolume, volpan->lPan); TRACE("Vol=%d Pan=%d\n", volpan->lVolume, volpan->lPan);
} }
void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb) void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb)
@ -108,12 +108,12 @@ void DSOUND_CheckEvent(IDirectSoundBufferImpl *dsb, int len)
if (dsb->nrofnotifies == 0) if (dsb->nrofnotifies == 0)
return; return;
TRACE("(%p) buflen = %ld, playpos = %ld, len = %d\n", TRACE("(%p) buflen = %d, playpos = %d, len = %d\n",
dsb, dsb->buflen, dsb->playpos, len); dsb, dsb->buflen, dsb->playpos, len);
for (i = 0; i < dsb->nrofnotifies ; i++) { for (i = 0; i < dsb->nrofnotifies ; i++) {
event = dsb->notifies + i; event = dsb->notifies + i;
offset = event->dwOffset; offset = event->dwOffset;
TRACE("checking %d, position %ld, event = %p\n", TRACE("checking %d, position %d, event = %p\n",
i, offset, event->hEventNotify); i, offset, event->hEventNotify);
/* DSBPN_OFFSETSTOP has to be the last element. So this is */ /* DSBPN_OFFSETSTOP has to be the last element. So this is */
/* OK. [Inside DirectX, p274] */ /* OK. [Inside DirectX, p274] */
@ -220,7 +220,7 @@ static INT DSOUND_MixerNorm(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
ibp = dsb->buffer->memory + dsb->buf_mixpos; ibp = dsb->buffer->memory + dsb->buf_mixpos;
obp = buf; obp = buf;
TRACE("(%p, %p, %p), buf_mixpos=%ld\n", dsb, ibp, obp, dsb->buf_mixpos); TRACE("(%p, %p, %p), buf_mixpos=%d\n", dsb, ibp, obp, dsb->buf_mixpos);
/* Check for the best case */ /* Check for the best case */
if ((dsb->freq == dsb->device->pwfx->nSamplesPerSec) && if ((dsb->freq == dsb->device->pwfx->nSamplesPerSec) &&
(dsb->pwfx->wBitsPerSample == dsb->device->pwfx->wBitsPerSample) && (dsb->pwfx->wBitsPerSample == dsb->device->pwfx->wBitsPerSample) &&
@ -238,7 +238,7 @@ static INT DSOUND_MixerNorm(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
/* Check for same sample rate */ /* Check for same sample rate */
if (dsb->freq == dsb->device->pwfx->nSamplesPerSec) { if (dsb->freq == dsb->device->pwfx->nSamplesPerSec) {
TRACE("(%p) Same sample rate %ld = primary %ld\n", dsb, TRACE("(%p) Same sample rate %d = primary %d\n", dsb,
dsb->freq, dsb->device->pwfx->nSamplesPerSec); dsb->freq, dsb->device->pwfx->nSamplesPerSec);
ilen = 0; ilen = 0;
for (i = 0; i < len; i += oAdvance) { for (i = 0; i < len; i += oAdvance) {
@ -287,7 +287,7 @@ static void DSOUND_MixerVol(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
INT16 *bps = (INT16 *) buf; INT16 *bps = (INT16 *) buf;
TRACE("(%p,%p,%d)\n",dsb,buf,len); TRACE("(%p,%p,%d)\n",dsb,buf,len);
TRACE("left = %lx, right = %lx\n", dsb->cvolpan.dwTotalLeftAmpFactor, TRACE("left = %x, right = %x\n", dsb->cvolpan.dwTotalLeftAmpFactor,
dsb->cvolpan.dwTotalRightAmpFactor); dsb->cvolpan.dwTotalRightAmpFactor);
if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->cvolpan.lPan == 0)) && if ((!(dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || (dsb->cvolpan.lPan == 0)) &&
@ -358,7 +358,7 @@ static void DSOUND_MixerVol(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
static LPBYTE DSOUND_tmpbuffer(DirectSoundDevice *device, DWORD len) static LPBYTE DSOUND_tmpbuffer(DirectSoundDevice *device, DWORD len)
{ {
TRACE("(%p,%ld)\n", device, len); TRACE("(%p,%d)\n", device, len);
if (len > device->tmp_buffer_len) { if (len > device->tmp_buffer_len) {
if (device->tmp_buffer) if (device->tmp_buffer)
@ -377,7 +377,7 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, DWORD writepos, DWO
INT i, len, ilen, field, todo; INT i, len, ilen, field, todo;
BYTE *buf, *ibuf; BYTE *buf, *ibuf;
TRACE("(%p,%ld,%ld)\n",dsb,writepos,fraglen); TRACE("(%p,%d,%d)\n",dsb,writepos,fraglen);
len = fraglen; len = fraglen;
if (!(dsb->playflags & DSBPLAY_LOOPING)) { if (!(dsb->playflags & DSBPLAY_LOOPING)) {
@ -402,7 +402,7 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, DWORD writepos, DWO
if ((buf = ibuf = DSOUND_tmpbuffer(dsb->device, len)) == NULL) if ((buf = ibuf = DSOUND_tmpbuffer(dsb->device, len)) == NULL)
return 0; return 0;
TRACE("MixInBuffer (%p) len = %d, dest = %ld\n", dsb, len, writepos); TRACE("MixInBuffer (%p) len = %d, dest = %d\n", dsb, len, writepos);
ilen = DSOUND_MixerNorm(dsb, ibuf, len); ilen = DSOUND_MixerNorm(dsb, ibuf, len);
if ((dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || if ((dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) ||
@ -492,7 +492,7 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, DWORD writepos, DWO
if (dsb->leadin && (dsb->startpos <= dsb->buf_mixpos)) if (dsb->leadin && (dsb->startpos <= dsb->buf_mixpos))
dsb->leadin = FALSE; /* HACK: see above */ dsb->leadin = FALSE; /* HACK: see above */
} else if (dsb->buf_mixpos > dsb->buflen) { } else if (dsb->buf_mixpos > dsb->buflen) {
ERR("Mixpos (%lu) past buflen (%lu), capping...\n", dsb->buf_mixpos, dsb->buflen); ERR("Mixpos (%u) past buflen (%u), capping...\n", dsb->buf_mixpos, dsb->buflen);
dsb->buf_mixpos = dsb->buflen; dsb->buf_mixpos = dsb->buflen;
} }
} }
@ -506,18 +506,18 @@ static void DSOUND_PhaseCancel(IDirectSoundBufferImpl *dsb, DWORD writepos, DWOR
UINT i, todo; UINT i, todo;
BYTE *buf, *ibuf; BYTE *buf, *ibuf;
TRACE("(%p,%ld,%ld)\n",dsb,writepos,len); TRACE("(%p,%d,%d)\n",dsb,writepos,len);
if (len % dsb->device->pwfx->nBlockAlign) { if (len % dsb->device->pwfx->nBlockAlign) {
INT nBlockAlign = dsb->device->pwfx->nBlockAlign; INT nBlockAlign = dsb->device->pwfx->nBlockAlign;
ERR("length not a multiple of block size, len = %ld, block size = %d\n", len, nBlockAlign); ERR("length not a multiple of block size, len = %d, block size = %d\n", len, nBlockAlign);
len = (len / nBlockAlign) * nBlockAlign; /* data alignment */ len = (len / nBlockAlign) * nBlockAlign; /* data alignment */
} }
if ((buf = ibuf = DSOUND_tmpbuffer(dsb->device, len)) == NULL) if ((buf = ibuf = DSOUND_tmpbuffer(dsb->device, len)) == NULL)
return; return;
TRACE("PhaseCancel (%p) len = %ld, dest = %ld\n", dsb, len, writepos); TRACE("PhaseCancel (%p) len = %d, dest = %d\n", dsb, len, writepos);
ilen = DSOUND_MixerNorm(dsb, ibuf, len); ilen = DSOUND_MixerNorm(dsb, ibuf, len);
if ((dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) || if ((dsb->dsbd.dwFlags & DSBCAPS_CTRLPAN) ||
@ -602,7 +602,7 @@ static void DSOUND_MixCancel(IDirectSoundBufferImpl *dsb, DWORD writepos, BOOL c
((dsb->primary_mixpos < writepos) ? dsb->device->buflen : 0) + ((dsb->primary_mixpos < writepos) ? dsb->device->buflen : 0) +
dsb->primary_mixpos - writepos; dsb->primary_mixpos - writepos;
TRACE("(%p, %ld), buf_mixpos=%ld\n", dsb, writepos, dsb->buf_mixpos); TRACE("(%p, %d), buf_mixpos=%d\n", dsb, writepos, dsb->buf_mixpos);
/* backtrack the mix position */ /* backtrack the mix position */
size = primary_done / oAdvance; size = primary_done / oAdvance;
@ -634,7 +634,7 @@ static void DSOUND_MixCancel(IDirectSoundBufferImpl *dsb, DWORD writepos, BOOL c
dsb->buf_mixpos = npos; dsb->buf_mixpos = npos;
dsb->primary_mixpos = writepos; dsb->primary_mixpos = writepos;
TRACE("new buf_mixpos=%ld, primary_mixpos=%ld (len=%ld)\n", TRACE("new buf_mixpos=%d, primary_mixpos=%d (len=%d)\n",
dsb->buf_mixpos, dsb->primary_mixpos, len); dsb->buf_mixpos, dsb->primary_mixpos, len);
if (cancel) DSOUND_PhaseCancel(dsb, writepos, len); if (cancel) DSOUND_PhaseCancel(dsb, writepos, len);
@ -652,7 +652,7 @@ void DSOUND_MixCancelAt(IDirectSoundBufferImpl *dsb, DWORD buf_writepos)
dsb->buf_mixpos - buf_writepos; dsb->buf_mixpos - buf_writepos;
#endif #endif
WARN("(%p, %ld), buf_mixpos=%ld\n", dsb, buf_writepos, dsb->buf_mixpos); WARN("(%p, %d), buf_mixpos=%d\n", dsb, buf_writepos, dsb->buf_mixpos);
/* since this is not implemented yet, just cancel *ALL* prebuffering for now /* since this is not implemented yet, just cancel *ALL* prebuffering for now
* (which is faster anyway when there's only a single secondary buffer) */ * (which is faster anyway when there's only a single secondary buffer) */
dsb->device->need_remix = TRUE; dsb->device->need_remix = TRUE;
@ -688,12 +688,12 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD playpos, DWORD wri
DWORD buf_left = dsb->buflen - buf_writepos; DWORD buf_left = dsb->buflen - buf_writepos;
int still_behind; int still_behind;
TRACE("(%p,%ld,%ld,%ld)\n",dsb,playpos,writepos,mixlen); TRACE("(%p,%d,%d,%d)\n",dsb,playpos,writepos,mixlen);
TRACE("buf_writepos=%ld, primary_writepos=%ld\n", buf_writepos, writepos); TRACE("buf_writepos=%d, primary_writepos=%d\n", buf_writepos, writepos);
TRACE("buf_done=%ld, primary_done=%ld\n", buf_done, primary_done); TRACE("buf_done=%d, primary_done=%d\n", buf_done, primary_done);
TRACE("buf_mixpos=%ld, primary_mixpos=%ld, mixlen=%ld\n", dsb->buf_mixpos, dsb->primary_mixpos, TRACE("buf_mixpos=%d, primary_mixpos=%d, mixlen=%d\n", dsb->buf_mixpos, dsb->primary_mixpos,
mixlen); mixlen);
TRACE("looping=%ld, startpos=%ld, leadin=%ld\n", dsb->playflags, dsb->startpos, dsb->leadin); TRACE("looping=%d, startpos=%d, leadin=%d\n", dsb->playflags, dsb->startpos, dsb->leadin);
/* check for notification positions */ /* check for notification positions */
if (dsb->dsbd.dwFlags & DSBCAPS_CTRLPOSITIONNOTIFY && if (dsb->dsbd.dwFlags & DSBCAPS_CTRLPOSITIONNOTIFY &&
@ -711,7 +711,7 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD playpos, DWORD wri
(dsb->buf_mixpos < dsb->buflen)) { (dsb->buf_mixpos < dsb->buflen)) {
/* yes, have to recover */ /* yes, have to recover */
ERR("underrun on sound buffer %p\n", dsb); ERR("underrun on sound buffer %p\n", dsb);
TRACE("recovering from underrun: primary_mixpos=%ld\n", writepos); TRACE("recovering from underrun: primary_mixpos=%d\n", writepos);
} }
dsb->primary_mixpos = writepos; dsb->primary_mixpos = writepos;
primary_done = 0; primary_done = 0;
@ -735,7 +735,7 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD playpos, DWORD wri
(dsb->probably_valid_to == dsb->startpos) && (dsb->probably_valid_to == dsb->startpos) &&
dsb->leadin) dsb->leadin)
probably_valid_left = dsb->buflen; probably_valid_left = dsb->buflen;
TRACE("streaming buffer probably_valid_to=%ld, probably_valid_left=%ld\n", TRACE("streaming buffer probably_valid_to=%d, probably_valid_left=%d\n",
dsb->probably_valid_to, probably_valid_left); dsb->probably_valid_to, probably_valid_left);
/* check whether the app's time is already up */ /* check whether the app's time is already up */
if (probably_valid_left < dsb->writelead) { if (probably_valid_left < dsb->writelead) {
@ -753,7 +753,7 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD playpos, DWORD wri
dsb->device->pwfx->nBlockAlign; dsb->device->pwfx->nBlockAlign;
/* check whether to clip mix_len */ /* check whether to clip mix_len */
if (probably_valid_left < mixlen) { if (probably_valid_left < mixlen) {
TRACE("clipping to probably_valid_left=%ld\n", probably_valid_left); TRACE("clipping to probably_valid_left=%d\n", probably_valid_left);
mixlen = probably_valid_left; mixlen = probably_valid_left;
} }
} }
@ -762,11 +762,11 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD playpos, DWORD wri
if (mixlen < primary_done) { if (mixlen < primary_done) {
/* huh? and still CalcPlayPosition didn't /* huh? and still CalcPlayPosition didn't
* detect an underrun? */ * detect an underrun? */
FIXME("problem with underrun detection (mixlen=%ld < primary_done=%ld)\n", mixlen, primary_done); FIXME("problem with underrun detection (mixlen=%d < primary_done=%d)\n", mixlen, primary_done);
return 0; return 0;
} }
len = mixlen - primary_done; len = mixlen - primary_done;
TRACE("remaining mixlen=%ld\n", len); TRACE("remaining mixlen=%d\n", len);
if (len < dsb->device->fraglen) { if (len < dsb->device->fraglen) {
/* smaller than a fragment, wait until it gets larger /* smaller than a fragment, wait until it gets larger
@ -792,8 +792,8 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD playpos, DWORD wri
if ((dsb->state == STATE_STOPPED) || !slen) break; if ((dsb->state == STATE_STOPPED) || !slen) break;
} }
TRACE("new primary_mixpos=%ld, primary_advbase=%ld\n", dsb->primary_mixpos, dsb->device->mixpos); TRACE("new primary_mixpos=%d, primary_advbase=%d\n", dsb->primary_mixpos, dsb->device->mixpos);
TRACE("mixed data len=%ld, still_behind=%d\n", mixlen-len, still_behind); TRACE("mixed data len=%d, still_behind=%d\n", mixlen-len, still_behind);
post_mix: post_mix:
/* check if buffer should be considered complete */ /* check if buffer should be considered complete */
@ -817,7 +817,7 @@ post_mix:
dsb->device->mixpos; dsb->device->mixpos;
if (slen > mixlen) { if (slen > mixlen) {
/* the primary_done and still_behind checks above should have worked */ /* the primary_done and still_behind checks above should have worked */
FIXME("problem with advancement calculation (advlen=%ld > mixlen=%ld)\n", slen, mixlen); FIXME("problem with advancement calculation (advlen=%d > mixlen=%d)\n", slen, mixlen);
slen = 0; slen = 0;
} }
return slen; return slen;
@ -828,12 +828,12 @@ static DWORD DSOUND_MixToPrimary(DirectSoundDevice *device, DWORD playpos, DWORD
INT i, len, maxlen = 0; INT i, len, maxlen = 0;
IDirectSoundBufferImpl *dsb; IDirectSoundBufferImpl *dsb;
TRACE("(%ld,%ld,%ld,%d)\n", playpos, writepos, mixlen, recover); TRACE("(%d,%d,%d,%d)\n", playpos, writepos, mixlen, recover);
for (i = 0; i < device->nrofbuffers; i++) { for (i = 0; i < device->nrofbuffers; i++) {
dsb = device->buffers[i]; dsb = device->buffers[i];
if (dsb->buflen && dsb->state && !dsb->hwbuf) { if (dsb->buflen && dsb->state && !dsb->hwbuf) {
TRACE("Checking %p, mixlen=%ld\n", dsb, mixlen); TRACE("Checking %p, mixlen=%d\n", dsb, mixlen);
EnterCriticalSection(&(dsb->lock)); EnterCriticalSection(&(dsb->lock));
if (dsb->state == STATE_STOPPING) { if (dsb->state == STATE_STOPPING) {
DSOUND_MixCancel(dsb, writepos, TRUE); DSOUND_MixCancel(dsb, writepos, TRUE);
@ -868,7 +868,7 @@ static void DSOUND_MixReset(DirectSoundDevice *device, DWORD writepos)
IDirectSoundBufferImpl *dsb; IDirectSoundBufferImpl *dsb;
int nfiller; int nfiller;
TRACE("(%p,%ld)\n", device, writepos); TRACE("(%p,%d)\n", device, writepos);
/* the sound of silence */ /* the sound of silence */
nfiller = device->pwfx->wBitsPerSample == 8 ? 128 : 0; nfiller = device->pwfx->wBitsPerSample == 8 ? 128 : 0;
@ -908,7 +908,7 @@ static void DSOUND_MixReset(DirectSoundDevice *device, DWORD writepos)
static void DSOUND_CheckReset(DirectSoundDevice *device, DWORD writepos) static void DSOUND_CheckReset(DirectSoundDevice *device, DWORD writepos)
{ {
TRACE("(%p,%ld)\n",device,writepos); TRACE("(%p,%d)\n",device,writepos);
if (device->need_remix) { if (device->need_remix) {
DSOUND_MixReset(device, writepos); DSOUND_MixReset(device, writepos);
device->need_remix = FALSE; device->need_remix = FALSE;
@ -928,9 +928,9 @@ static void DSOUND_CheckReset(DirectSoundDevice *device, DWORD writepos)
void DSOUND_WaveQueue(DirectSoundDevice *device, DWORD mixq) void DSOUND_WaveQueue(DirectSoundDevice *device, DWORD mixq)
{ {
TRACE("(%p,%ld)\n", device, mixq); TRACE("(%p,%d)\n", device, mixq);
if (mixq + device->pwqueue > ds_hel_queue) mixq = ds_hel_queue - device->pwqueue; if (mixq + device->pwqueue > ds_hel_queue) mixq = ds_hel_queue - device->pwqueue;
TRACE("queueing %ld buffers, starting at %d\n", mixq, device->pwwrite); TRACE("queueing %d buffers, starting at %d\n", mixq, device->pwwrite);
for (; mixq; mixq--) { for (; mixq; mixq--) {
waveOutWrite(device->hwo, device->pwave[device->pwwrite], sizeof(WAVEHDR)); waveOutWrite(device->hwo, device->pwave[device->pwwrite], sizeof(WAVEHDR));
device->pwwrite++; device->pwwrite++;
@ -980,7 +980,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
writepos %= device->buflen; writepos %= device->buflen;
} }
} }
TRACE("primary playpos=%ld, writepos=%ld, clrpos=%ld, mixpos=%ld, buflen=%ld\n", TRACE("primary playpos=%d, writepos=%d, clrpos=%d, mixpos=%d, buflen=%d\n",
playpos,writepos,device->playpos,device->mixpos,device->buflen); playpos,writepos,device->playpos,device->mixpos,device->buflen);
assert(device->playpos < device->buflen); assert(device->playpos < device->buflen);
/* wipe out just-played sound data */ /* wipe out just-played sound data */
@ -1020,7 +1020,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
/* the playback position must have passed our last /* the playback position must have passed our last
* mixed position, i.e. it's an underrun, or we have * mixed position, i.e. it's an underrun, or we have
* nothing more to play */ * nothing more to play */
TRACE("reached end of mixed data (inq=%ld, maxq=%ld)\n", inq, maxq); TRACE("reached end of mixed data (inq=%d, maxq=%d)\n", inq, maxq);
inq = 0; inq = 0;
/* stop the playback now, to allow buffers to refill */ /* stop the playback now, to allow buffers to refill */
if (device->state == STATE_PLAYING) { if (device->state == STATE_PLAYING) {
@ -1031,7 +1031,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
} }
else { else {
/* how can we have an underrun if we aren't playing? */ /* how can we have an underrun if we aren't playing? */
WARN("unexpected primary state (%ld)\n", device->state); WARN("unexpected primary state (%d)\n", device->state);
} }
#ifdef SYNC_CALLBACK #ifdef SYNC_CALLBACK
/* DSOUND_callback may need this lock */ /* DSOUND_callback may need this lock */
@ -1114,7 +1114,7 @@ void CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD_PTR dwUser,
DWORD start_time = GetTickCount(); DWORD start_time = GetTickCount();
DWORD end_time; DWORD end_time;
TRACE("(%d,%d,0x%lx,0x%lx,0x%lx)\n",timerID,msg,dwUser,dw1,dw2); TRACE("(%d,%d,0x%lx,0x%lx,0x%lx)\n",timerID,msg,dwUser,dw1,dw2);
TRACE("entering at %ld\n", start_time); TRACE("entering at %d\n", start_time);
if (DSOUND_renderer[device->drvdesc.dnDevNode] != device) { if (DSOUND_renderer[device->drvdesc.dnDevNode] != device) {
ERR("dsound died without killing us?\n"); ERR("dsound died without killing us?\n");
@ -1131,14 +1131,14 @@ void CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD_PTR dwUser,
RtlReleaseResource(&(device->buffer_list_lock)); RtlReleaseResource(&(device->buffer_list_lock));
end_time = GetTickCount(); end_time = GetTickCount();
TRACE("completed processing at %ld, duration = %ld\n", end_time, end_time - start_time); TRACE("completed processing at %d, duration = %d\n", end_time, end_time - start_time);
} }
void CALLBACK DSOUND_callback(HWAVEOUT hwo, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2) void CALLBACK DSOUND_callback(HWAVEOUT hwo, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{ {
DirectSoundDevice * device = (DirectSoundDevice*)dwUser; DirectSoundDevice * device = (DirectSoundDevice*)dwUser;
TRACE("(%p,%x,%lx,%lx,%lx)\n",hwo,msg,dwUser,dw1,dw2); TRACE("(%p,%x,%x,%x,%x)\n",hwo,msg,dwUser,dw1,dw2);
TRACE("entering at %ld, msg=%08x(%s)\n", GetTickCount(), msg, TRACE("entering at %d, msg=%08x(%s)\n", GetTickCount(), msg,
msg==MM_WOM_DONE ? "MM_WOM_DONE" : msg==MM_WOM_CLOSE ? "MM_WOM_CLOSE" : msg==MM_WOM_DONE ? "MM_WOM_DONE" : msg==MM_WOM_CLOSE ? "MM_WOM_CLOSE" :
msg==MM_WOM_OPEN ? "MM_WOM_OPEN" : "UNKNOWN"); msg==MM_WOM_OPEN ? "MM_WOM_OPEN" : "UNKNOWN");
if (msg == MM_WOM_DONE) { if (msg == MM_WOM_DONE) {
@ -1163,7 +1163,7 @@ void CALLBACK DSOUND_callback(HWAVEOUT hwo, UINT msg, DWORD dwUser, DWORD dw1, D
mixq = inq / fraglen; mixq = inq / fraglen;
if ((inq - (mixq * fraglen)) > 0) mixq++; if ((inq - (mixq * fraglen)) > 0) mixq++;
/* complete the playing buffer */ /* complete the playing buffer */
TRACE("done playing primary pos=%ld\n", playpos); TRACE("done playing primary pos=%d\n", playpos);
pwplay++; pwplay++;
if (pwplay >= DS_HEL_FRAGS) pwplay = 0; if (pwplay >= DS_HEL_FRAGS) pwplay = 0;
/* write new values */ /* write new values */

View file

@ -51,7 +51,7 @@ static void DSOUND_RecalcPrimary(DirectSoundDevice *device)
/* (FIXME: this may or may not be a good idea) */ /* (FIXME: this may or may not be a good idea) */
while (device->buflen % fraglen) fraglen -= nBlockAlign; while (device->buflen % fraglen) fraglen -= nBlockAlign;
device->fraglen = fraglen; device->fraglen = fraglen;
TRACE("fraglen=%ld\n", device->fraglen); TRACE("fraglen=%d\n", device->fraglen);
} }
/* calculate the 10ms write lead */ /* calculate the 10ms write lead */
device->writelead = (device->pwfx->nSamplesPerSec / 100) * nBlockAlign; device->writelead = (device->pwfx->nSamplesPerSec / 100) * nBlockAlign;
@ -74,7 +74,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
/* use fragments of 10ms (1/100s) each (which should get us within /* use fragments of 10ms (1/100s) each (which should get us within
* the documented write cursor lead of 10-15ms) */ * the documented write cursor lead of 10-15ms) */
buflen = ((device->pwfx->nSamplesPerSec / 100) * device->pwfx->nBlockAlign) * DS_HEL_FRAGS; buflen = ((device->pwfx->nSamplesPerSec / 100) * device->pwfx->nBlockAlign) * DS_HEL_FRAGS;
TRACE("desired buflen=%ld, old buffer=%p\n", buflen, device->buffer); TRACE("desired buflen=%d, old buffer=%p\n", buflen, device->buffer);
/* reallocate emulated primary buffer */ /* reallocate emulated primary buffer */
if (device->buffer) if (device->buffer)
@ -116,7 +116,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
device->playpos = 0; device->playpos = 0;
device->mixpos = 0; device->mixpos = 0;
FillMemory(device->buffer, device->buflen, (device->pwfx->wBitsPerSample == 8) ? 128 : 0); FillMemory(device->buffer, device->buflen, (device->pwfx->wBitsPerSample == 8) ? 128 : 0);
TRACE("fraglen=%ld\n", device->fraglen); TRACE("fraglen=%d\n", device->fraglen);
DSOUND_WaveQueue(device, (DWORD)-1); DSOUND_WaveQueue(device, (DWORD)-1);
} }
if ((err == DS_OK) && (merr != DS_OK)) if ((err == DS_OK) && (merr != DS_OK))
@ -314,7 +314,7 @@ HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LP
*writepos -= device->buflen; *writepos -= device->buflen;
} }
} }
TRACE("playpos = %ld, writepos = %ld (%p, time=%ld)\n", playpos?*playpos:0, writepos?*writepos:0, device, GetTickCount()); TRACE("playpos = %d, writepos = %d (%p, time=%d)\n", playpos?*playpos:0, writepos?*writepos:0, device, GetTickCount());
return DS_OK; return DS_OK;
} }
@ -335,8 +335,8 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex)
WARN("invalid parameter: wfex==NULL!\n"); WARN("invalid parameter: wfex==NULL!\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld," TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"
"bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%d,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);
@ -443,7 +443,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(
DWORD ampfactors; DWORD ampfactors;
DSVOLUMEPAN volpan; DSVOLUMEPAN volpan;
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%ld)\n", iface, vol); TRACE("(%p,%d)\n", iface, vol);
if (!(device->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) { if (!(device->dsbd.dwFlags & DSBCAPS_CTRLVOLUME)) {
WARN("control unavailable\n"); WARN("control unavailable\n");
@ -451,7 +451,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(
} }
if ((vol > DSBVOLUME_MAX) || (vol < DSBVOLUME_MIN)) { if ((vol > DSBVOLUME_MAX) || (vol < DSBVOLUME_MIN)) {
WARN("invalid parameter: vol = %ld\n", vol); WARN("invalid parameter: vol = %d\n", vol);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -511,7 +511,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetFrequency(
LPDIRECTSOUNDBUFFER8 iface,DWORD freq LPDIRECTSOUNDBUFFER8 iface,DWORD freq
) { ) {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,freq); TRACE("(%p,%d)\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");
@ -522,10 +522,10 @@ static HRESULT WINAPI PrimaryBufferImpl_Play(
LPDIRECTSOUNDBUFFER8 iface,DWORD reserved1,DWORD reserved2,DWORD flags LPDIRECTSOUNDBUFFER8 iface,DWORD reserved1,DWORD reserved2,DWORD flags
) { ) {
DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device; DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device;
TRACE("(%p,%08lx,%08lx,%08lx)\n", iface, reserved1, reserved2, flags); TRACE("(%p,%08x,%08x,%08x)\n", iface, reserved1, reserved2, flags);
if (!(flags & DSBPLAY_LOOPING)) { if (!(flags & DSBPLAY_LOOPING)) {
WARN("invalid parameter: flags = %08lx\n", flags); WARN("invalid parameter: flags = %08x\n", flags);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -566,7 +566,7 @@ static ULONG WINAPI PrimaryBufferImpl_AddRef(LPDIRECTSOUNDBUFFER8 iface)
{ {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -574,7 +574,7 @@ static ULONG WINAPI PrimaryBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface)
{ {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
DWORD ref = InterlockedDecrement(&(This->ref)); DWORD ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
This->device->primary = NULL; This->device->primary = NULL;
@ -602,7 +602,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCurrentPosition(
*writepos += device->writelead; *writepos += device->writelead;
while (*writepos >= device->buflen) *writepos -= device->buflen; while (*writepos >= device->buflen) *writepos -= device->buflen;
} }
TRACE("playpos = %ld, writepos = %ld (%p, time=%ld)\n", playpos?*playpos:0, writepos?*writepos:0, device, GetTickCount()); TRACE("playpos = %d, writepos = %d (%p, time=%d)\n", playpos?*playpos:0, writepos?*writepos:0, device, GetTickCount());
return DS_OK; return DS_OK;
} }
@ -622,7 +622,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetStatus(
(device->state == STATE_PLAYING)) (device->state == STATE_PLAYING))
*status |= DSBSTATUS_PLAYING | DSBSTATUS_LOOPING; *status |= DSBSTATUS_PLAYING | DSBSTATUS_LOOPING;
TRACE("status=%lx\n", *status); TRACE("status=%x\n", *status);
return DS_OK; return DS_OK;
} }
@ -635,7 +635,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFormat(
{ {
DWORD size; DWORD size;
DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device; DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device;
TRACE("(%p,%p,%ld,%p)\n", iface, lpwf, wfsize, wfwritten); TRACE("(%p,%p,%d,%p)\n", iface, lpwf, wfsize, wfwritten);
size = sizeof(WAVEFORMATEX) + device->pwfx->cbSize; size = sizeof(WAVEFORMATEX) + device->pwfx->cbSize;
@ -667,7 +667,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(
) { ) {
HRESULT hres; HRESULT hres;
DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device; DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device;
TRACE("(%p,%ld,%ld,%p,%p,%p,%p,0x%08lx) at %ld\n", TRACE("(%p,%d,%d,%p,%p,%p,%p,0x%08x) at %d\n",
iface, iface,
writecursor, writecursor,
writebytes, writebytes,
@ -699,13 +699,13 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(
writebytes = device->buflen; writebytes = device->buflen;
if (writecursor >= device->buflen) { if (writecursor >= device->buflen) {
WARN("Invalid parameter, writecursor: %lu >= buflen: %lu\n", WARN("Invalid parameter, writecursor: %u >= buflen: %u\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: %lu > buflen: %lu\n", WARN("Invalid parameter, writebytes: %u > buflen: %u\n",
writebytes, device->buflen); writebytes, device->buflen);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -728,7 +728,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(
*(LPBYTE*)lplpaudioptr2 = NULL; *(LPBYTE*)lplpaudioptr2 = NULL;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = 0; *audiobytes2 = 0;
TRACE("->%ld.0\n",writebytes); TRACE("->%d.0\n",writebytes);
} else { } else {
*(LPBYTE*)lplpaudioptr1 = device->buffer+writecursor; *(LPBYTE*)lplpaudioptr1 = device->buffer+writecursor;
*audiobytes1 = device->buflen-writecursor; *audiobytes1 = device->buflen-writecursor;
@ -736,7 +736,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock(
*(LPBYTE*)lplpaudioptr2 = device->buffer; *(LPBYTE*)lplpaudioptr2 = device->buffer;
if (audiobytes2) if (audiobytes2)
*audiobytes2 = writebytes-(device->buflen-writecursor); *audiobytes2 = writebytes-(device->buflen-writecursor);
TRACE("->%ld.%ld\n",*audiobytes1,audiobytes2?*audiobytes2:0); TRACE("->%d.%d\n",*audiobytes1,audiobytes2?*audiobytes2:0);
} }
} }
return DS_OK; return DS_OK;
@ -746,7 +746,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetCurrentPosition(
LPDIRECTSOUNDBUFFER8 iface,DWORD newpos LPDIRECTSOUNDBUFFER8 iface,DWORD newpos
) { ) {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
TRACE("(%p,%ld)\n",This,newpos); TRACE("(%p,%d)\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");
@ -760,7 +760,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
DWORD ampfactors; DWORD ampfactors;
DSVOLUMEPAN volpan; DSVOLUMEPAN volpan;
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE("(%p,%ld)\n", iface, pan); TRACE("(%p,%d)\n", iface, pan);
if (!(device->dsbd.dwFlags & DSBCAPS_CTRLPAN)) { if (!(device->dsbd.dwFlags & DSBCAPS_CTRLPAN)) {
WARN("control unavailable\n"); WARN("control unavailable\n");
@ -768,7 +768,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
} }
if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) { if ((pan > DSBPAN_RIGHT) || (pan < DSBPAN_LEFT)) {
WARN("invalid parameter: pan = %ld\n", pan); WARN("invalid parameter: pan = %d\n", pan);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -828,7 +828,7 @@ static HRESULT WINAPI PrimaryBufferImpl_Unlock(
LPDIRECTSOUNDBUFFER8 iface,LPVOID p1,DWORD x1,LPVOID p2,DWORD x2 LPDIRECTSOUNDBUFFER8 iface,LPVOID p1,DWORD x1,LPVOID p2,DWORD x2
) { ) {
DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device; DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device;
TRACE("(%p,%p,%ld,%p,%ld)\n", iface, p1, x1, p2, x2); TRACE("(%p,%p,%d,%p,%d)\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");
@ -873,7 +873,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFrequency(
} }
*freq = device->pwfx->nSamplesPerSec; *freq = device->pwfx->nSamplesPerSec;
TRACE("-> %ld\n", *freq); TRACE("-> %d\n", *freq);
return DS_OK; return DS_OK;
} }
@ -883,7 +883,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetFX(
) { ) {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
DWORD u; DWORD u;
FIXME("(%p,%lu,%p,%p): stub\n",This,dwEffectsCount,pDSFXDesc,pdwResultCodes); FIXME("(%p,%u,%p,%p): stub\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;
@ -897,7 +897,7 @@ static HRESULT WINAPI PrimaryBufferImpl_AcquireResources(
) { ) {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
DWORD u; DWORD u;
FIXME("(%p,%08lu,%lu,%p): stub\n",This,dwFlags,dwEffectsCount,pdwResultCodes); FIXME("(%p,%08u,%u,%p): stub\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;
@ -910,7 +910,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetObjectInPath(
LPDIRECTSOUNDBUFFER8 iface,REFGUID rguidObject,DWORD dwIndex,REFGUID rguidInterface,LPVOID* ppObject LPDIRECTSOUNDBUFFER8 iface,REFGUID rguidObject,DWORD dwIndex,REFGUID rguidInterface,LPVOID* ppObject
) { ) {
PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface; PrimaryBufferImpl *This = (PrimaryBufferImpl *)iface;
FIXME("(%p,%s,%lu,%s,%p): stub\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject); FIXME("(%p,%s,%u,%s,%p): stub\n",This,debugstr_guid(rguidObject),dwIndex,debugstr_guid(rguidInterface),ppObject);
WARN("control unavailable\n"); WARN("control unavailable\n");
return DSERR_CONTROLUNAVAIL; return DSERR_CONTROLUNAVAIL;
@ -938,7 +938,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
} }
if (caps->dwSize < sizeof(*caps)) { if (caps->dwSize < sizeof(*caps)) {
WARN("invalid parameter: caps->dwSize = %ld\n", caps->dwSize); WARN("invalid parameter: caps->dwSize = %d\n", caps->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -1076,8 +1076,8 @@ HRESULT PrimaryBufferImpl_Create(
CopyMemory(&device->dsbd, dsbd, sizeof(*dsbd)); CopyMemory(&device->dsbd, dsbd, sizeof(*dsbd));
TRACE("Created primary buffer at %p\n", dsb); TRACE("Created primary buffer at %p\n", dsb);
TRACE("(formattag=0x%04x,chans=%d,samplerate=%ld," TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"
"bytespersec=%ld,blockalign=%d,bitspersamp=%d,cbSize=%d)\n", "bytespersec=%d,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,

View file

@ -66,7 +66,7 @@ static ULONG WINAPI IKsBufferPropertySetImpl_AddRef(LPKSPROPERTYSET iface)
{ {
IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface; IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -74,7 +74,7 @@ static ULONG WINAPI IKsBufferPropertySetImpl_Release(LPKSPROPERTYSET iface)
{ {
IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface; IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
This->dsb->iks = 0; This->dsb->iks = 0;
@ -97,7 +97,7 @@ static HRESULT WINAPI IKsBufferPropertySetImpl_Get(
{ {
IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface; IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
PIDSDRIVERPROPERTYSET ps; PIDSDRIVERPROPERTYSET ps;
TRACE("(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(iface=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned); This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned);
if (This->dsb->hwbuf) { if (This->dsb->hwbuf) {
@ -134,7 +134,7 @@ static HRESULT WINAPI IKsBufferPropertySetImpl_Set(
{ {
IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface; IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
PIDSDRIVERPROPERTYSET ps; PIDSDRIVERPROPERTYSET ps;
TRACE("(%p,%s,%ld,%p,%ld,%p,%ld)\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData); TRACE("(%p,%s,%d,%p,%d,%p,%d)\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
if (This->dsb->hwbuf) { if (This->dsb->hwbuf) {
IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps); IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps);
@ -166,7 +166,7 @@ static HRESULT WINAPI IKsBufferPropertySetImpl_QuerySupport(
{ {
IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface; IKsBufferPropertySetImpl *This = (IKsBufferPropertySetImpl *)iface;
PIDSDRIVERPROPERTYSET ps; PIDSDRIVERPROPERTYSET ps;
TRACE("(%p,%s,%ld,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport); TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
if (This->dsb->hwbuf) { if (This->dsb->hwbuf) {
IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps); IDsDriver_QueryInterface(This->dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps);
@ -250,7 +250,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface)
{ {
IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface; IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -258,7 +258,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
{ {
IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface; IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -274,7 +274,7 @@ static HRESULT WINAPI DSPROPERTY_WaveDeviceMappingA(
{ {
HRESULT hr = DSERR_INVALIDPARAM; HRESULT hr = DSERR_INVALIDPARAM;
PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA ppd; PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA ppd;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA) pPropData; ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA) pPropData;
@ -337,7 +337,7 @@ static HRESULT WINAPI DSPROPERTY_WaveDeviceMappingW(
{ {
HRESULT hr = DSERR_INVALIDPARAM; HRESULT hr = DSERR_INVALIDPARAM;
PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd; PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA ppd;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA) pPropData; ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA) pPropData;
@ -401,7 +401,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
HRESULT err; HRESULT err;
GUID guid, dev_guid; GUID guid, dev_guid;
PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA ppd; PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA ppd;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA) pPropData; ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA) pPropData;
@ -421,7 +421,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
} else { } else {
TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow); TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow);
} }
FIXME("(pPropData=%p,cbPropData=%ld,pcbReturned=%p) GUID_NULL not implemented!\n", FIXME("(pPropData=%p,cbPropData=%d,pcbReturned=%p) GUID_NULL not implemented!\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
@ -567,7 +567,7 @@ static HRESULT WINAPI DSPROPERTY_Description1(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = cbPropData; *pcbReturned = cbPropData;
TRACE("*pcbReturned=%ld\n", *pcbReturned); TRACE("*pcbReturned=%d\n", *pcbReturned);
} }
return S_OK; return S_OK;
@ -581,7 +581,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA) pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA) pPropData;
HRESULT err; HRESULT err;
GUID dev_guid; GUID dev_guid;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,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));
@ -594,7 +594,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
} else { } else {
TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow); TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow);
} }
FIXME("(pPropData=%p,cbPropData=%ld,pcbReturned=%p) GUID_NULL not implemented!\n", FIXME("(pPropData=%p,cbPropData=%d,pcbReturned=%p) GUID_NULL not implemented!\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
@ -710,7 +710,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
for (wod = 0; wod < wodn; wod++) { for (wod = 0; wod < wodn; wod++) {
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) { if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_renderer_guids[%ld]\n", wod); TRACE("DSOUND_renderer_guids[%d]\n", wod);
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER; ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
@ -759,7 +759,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
for (wid = 0; wid < widn; wid++) { for (wid = 0; wid < widn; wid++) {
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_capture_guids[wid] ) ) { if (IsEqualGUID( &ppd->DeviceId, &DSOUND_capture_guids[wid] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_capture_guids[%ld]\n", wid); TRACE("DSOUND_capture_guids[%d]\n", wid);
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) { if (err == DS_OK) {
@ -807,7 +807,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionA(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = cbPropData; *pcbReturned = cbPropData;
TRACE("*pcbReturned=%ld\n", *pcbReturned); TRACE("*pcbReturned=%d\n", *pcbReturned);
} }
return S_OK; return S_OK;
@ -821,7 +821,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA) pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA) pPropData;
HRESULT err; HRESULT err;
GUID dev_guid; GUID dev_guid;
TRACE("pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("pPropData=%p,cbPropData=%d,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));
@ -834,7 +834,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
} else { } else {
TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow); TRACE("DataFlow=Unknown(%d)\n", ppd->DataFlow);
} }
FIXME("(pPropData=%p,cbPropData=%ld,pcbReturned=%p) GUID_NULL not implemented!\n", FIXME("(pPropData=%p,cbPropData=%d,pcbReturned=%p) GUID_NULL not implemented!\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
@ -855,7 +855,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
for (wod = 0; wod < wodn; wod++) { for (wod = 0; wod < wodn; wod++) {
if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) { if (IsEqualGUID( &dev_guid, &DSOUND_renderer_guids[wod] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_renderer_guids[%ld]\n", wod); TRACE("DSOUND_renderer_guids[%d]\n", wod);
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) { if (err == DS_OK) {
@ -951,7 +951,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
for (wod = 0; wod < wodn; wod++) { for (wod = 0; wod < wodn; wod++) {
if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) { if (IsEqualGUID( &ppd->DeviceId, &DSOUND_renderer_guids[wod] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_renderer_guids[%ld]\n", wod); TRACE("DSOUND_renderer_guids[%d]\n", wod);
ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER; ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;
ppd->WaveDeviceId = wod; ppd->WaveDeviceId = wod;
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
@ -1000,7 +1000,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
for (wid = 0; wid < widn; wid++) { for (wid = 0; wid < widn; wid++) {
if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) { if (IsEqualGUID( &dev_guid, &DSOUND_capture_guids[wid] ) ) {
DSDRIVERDESC desc; DSDRIVERDESC desc;
TRACE("DSOUND_capture_guids[%ld]\n", wid); TRACE("DSOUND_capture_guids[%d]\n", wid);
ppd->WaveDeviceId = wid; ppd->WaveDeviceId = wid;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
if (err == DS_OK) { if (err == DS_OK) {
@ -1048,7 +1048,7 @@ static HRESULT WINAPI DSPROPERTY_DescriptionW(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = cbPropData; *pcbReturned = cbPropData;
TRACE("*pcbReturned=%ld\n", *pcbReturned); TRACE("*pcbReturned=%d\n", *pcbReturned);
} }
return S_OK; return S_OK;
@ -1061,7 +1061,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
{ {
PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA) pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA) pPropData;
HRESULT err; HRESULT err;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
if (ppd) { if (ppd) {
@ -1130,7 +1130,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = 0; *pcbReturned = 0;
FIXME("*pcbReturned=%ld\n", *pcbReturned); FIXME("*pcbReturned=%d\n", *pcbReturned);
} }
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
@ -1143,7 +1143,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
{ {
PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA) pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA) pPropData;
HRESULT err; HRESULT err;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
if (ppd) { if (ppd) {
@ -1240,7 +1240,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = 0; *pcbReturned = 0;
FIXME("*pcbReturned=%ld\n", *pcbReturned); FIXME("*pcbReturned=%d\n", *pcbReturned);
} }
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
@ -1253,7 +1253,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
{ {
PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA) pPropData; PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA ppd = (PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA) pPropData;
HRESULT err; HRESULT err;
TRACE("(pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(pPropData=%p,cbPropData=%d,pcbReturned=%p)\n",
pPropData,cbPropData,pcbReturned); pPropData,cbPropData,pcbReturned);
if (ppd) { if (ppd) {
@ -1359,7 +1359,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = 0; *pcbReturned = 0;
FIXME("*pcbReturned=%ld\n", *pcbReturned); FIXME("*pcbReturned=%d\n", *pcbReturned);
} }
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
@ -1376,7 +1376,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
PULONG pcbReturned ) PULONG pcbReturned )
{ {
IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface; IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
TRACE("(iface=%p,guidPropSet=%s,dwPropID=%ld,pInstanceData=%p,cbInstanceData=%ld,pPropData=%p,cbPropData=%ld,pcbReturned=%p)\n", TRACE("(iface=%p,guidPropSet=%s,dwPropID=%d,pInstanceData=%p,cbInstanceData=%d,pPropData=%p,cbPropData=%d,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) ) {
@ -1398,7 +1398,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: %ld\n",dwPropID); FIXME("unsupported ID: %d\n",dwPropID);
break; break;
} }
} else { } else {
@ -1407,7 +1407,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Get(
if (pcbReturned) { if (pcbReturned) {
*pcbReturned = 0; *pcbReturned = 0;
FIXME("*pcbReturned=%ld\n", *pcbReturned); FIXME("*pcbReturned=%d\n", *pcbReturned);
} }
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
@ -1424,7 +1424,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_Set(
{ {
IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface; IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
FIXME("(%p,%s,%ld,%p,%ld,%p,%ld), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData); FIXME("(%p,%s,%d,%p,%d,%p,%d), stub!\n",This,debugstr_guid(guidPropSet),dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData);
return E_PROP_ID_UNSUPPORTED; return E_PROP_ID_UNSUPPORTED;
} }
@ -1435,7 +1435,7 @@ static HRESULT WINAPI IKsPrivatePropertySetImpl_QuerySupport(
PULONG pTypeSupport ) PULONG pTypeSupport )
{ {
IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface; IKsPrivatePropertySetImpl *This = (IKsPrivatePropertySetImpl *)iface;
TRACE("(%p,%s,%ld,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport); TRACE("(%p,%s,%d,%p)\n",This,debugstr_guid(guidPropSet),dwPropID,pTypeSupport);
if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) { if ( IsEqualGUID( &DSPROPSETID_DirectSoundDevice, guidPropSet) ) {
switch (dwPropID) { switch (dwPropID) {
@ -1464,7 +1464,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: %ld\n",dwPropID); FIXME("unsupported ID: %d\n",dwPropID);
break; break;
} }
} else { } else {

View file

@ -244,7 +244,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
lVolume = log10(flIntensity/DEFAULT_INTENSITY); lVolume = log10(flIntensity/DEFAULT_INTENSITY);
lVolume *= 1000; /* convert back to hundreths of dB */ lVolume *= 1000; /* convert back to hundreths of dB */
lVolume -= 10000; /* we need to do it in ms way */ lVolume -= 10000; /* we need to do it in ms way */
TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting volume %ld to %f\n", flDistance, dsb->ds3db_ds3db.flMinDistance, dsb->ds3db_lVolume, lVolume); TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting volume %d 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*/
@ -271,7 +271,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 += ((dsb->ds3db_ds3db.lConeOutsideVolume)/((dwOutsideConeAngle) - (dwInsideConeAngle))) * flAngle; lVolume += ((dsb->ds3db_ds3db.lConeOutsideVolume)/((dwOutsideConeAngle) - (dwInsideConeAngle))) * flAngle;
} }
TRACE("conning: Angle = %f deg; InsideConeAngle(/2) = %ld deg; OutsideConeAngle(/2) = %ld deg; ConeOutsideVolume = %ld => adjusting volume to %f\n", TRACE("conning: Angle = %f deg; InsideConeAngle(/2) = %d deg; OutsideConeAngle(/2) = %d deg; ConeOutsideVolume = %d => 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;
@ -291,7 +291,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
/* for now, we'll use "linear formula" (which is probably incorrect); if someone has it in book, correct it */ /* for now, we'll use "linear formula" (which is probably incorrect); if someone has it in book, correct it */
dsb->volpan.lPan = 10000*2*flAngle/M_PI - 10000; dsb->volpan.lPan = 10000*2*flAngle/M_PI - 10000;
} }
TRACE("panning: Angle = %f rad, lPan = %ld\n", flAngle, dsb->volpan.lPan); TRACE("panning: Angle = %f rad, lPan = %d\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
@ -367,7 +367,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_AddRef(LPDIRECTSOUND3DBUFFER iface)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -375,7 +375,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_Release(LPDIRECTSOUND3DBUFFER iface
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
This->dsb->ds3db = NULL; This->dsb->ds3db = NULL;
@ -400,7 +400,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetAllParameters(
} }
if (lpDs3dBuffer->dwSize < sizeof(*lpDs3dBuffer)) { if (lpDs3dBuffer->dwSize < sizeof(*lpDs3dBuffer)) {
WARN("invalid parameter: lpDs3dBuffer->dwSize = %ld\n",lpDs3dBuffer->dwSize); WARN("invalid parameter: lpDs3dBuffer->dwSize = %d\n",lpDs3dBuffer->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -415,7 +415,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetConeAngles(
LPDWORD lpdwOutsideConeAngle) LPDWORD lpdwOutsideConeAngle)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("returning: Inside Cone Angle = %ld degrees; Outside Cone Angle = %ld degrees\n", TRACE("returning: Inside Cone Angle = %d degrees; Outside Cone Angle = %d degrees\n",
This->dsb->ds3db_ds3db.dwInsideConeAngle, This->dsb->ds3db_ds3db.dwOutsideConeAngle); This->dsb->ds3db_ds3db.dwInsideConeAngle, This->dsb->ds3db_ds3db.dwOutsideConeAngle);
*lpdwInsideConeAngle = This->dsb->ds3db_ds3db.dwInsideConeAngle; *lpdwInsideConeAngle = This->dsb->ds3db_ds3db.dwInsideConeAngle;
*lpdwOutsideConeAngle = This->dsb->ds3db_ds3db.dwOutsideConeAngle; *lpdwOutsideConeAngle = This->dsb->ds3db_ds3db.dwOutsideConeAngle;
@ -440,7 +440,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetConeOutsideVolume(
LPLONG lplConeOutsideVolume) LPLONG lplConeOutsideVolume)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("returning: Cone Outside Volume = %ld\n", This->dsb->ds3db_ds3db.lConeOutsideVolume); TRACE("returning: Cone Outside Volume = %d\n", This->dsb->ds3db_ds3db.lConeOutsideVolume);
*lplConeOutsideVolume = This->dsb->ds3db_ds3db.lConeOutsideVolume; *lplConeOutsideVolume = This->dsb->ds3db_ds3db.lConeOutsideVolume;
return DS_OK; return DS_OK;
} }
@ -470,7 +470,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_GetMode(
LPDWORD lpdwMode) LPDWORD lpdwMode)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("returning: Mode = %ld\n", This->dsb->ds3db_ds3db.dwMode); TRACE("returning: Mode = %d\n", This->dsb->ds3db_ds3db.dwMode);
*lpdwMode = This->dsb->ds3db_ds3db.dwMode; *lpdwMode = This->dsb->ds3db_ds3db.dwMode;
return DS_OK; return DS_OK;
} }
@ -508,7 +508,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetAllParameters(
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
DWORD status = DSERR_INVALIDPARAM; DWORD status = DSERR_INVALIDPARAM;
TRACE("(%p,%p,%lx)\n",iface,lpcDs3dBuffer,dwApply); TRACE("(%p,%p,%x)\n",iface,lpcDs3dBuffer,dwApply);
if (lpcDs3dBuffer == NULL) { if (lpcDs3dBuffer == NULL) {
WARN("invalid parameter: lpcDs3dBuffer == NULL\n"); WARN("invalid parameter: lpcDs3dBuffer == NULL\n");
@ -516,11 +516,11 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetAllParameters(
} }
if (lpcDs3dBuffer->dwSize != sizeof(DS3DBUFFER)) { if (lpcDs3dBuffer->dwSize != sizeof(DS3DBUFFER)) {
WARN("invalid parameter: lpcDs3dBuffer->dwSize = %ld\n", lpcDs3dBuffer->dwSize); WARN("invalid parameter: lpcDs3dBuffer->dwSize = %d\n", lpcDs3dBuffer->dwSize);
return status; return status;
} }
TRACE("setting: all parameters; dwApply = %ld\n", dwApply); TRACE("setting: all parameters; dwApply = %d\n", dwApply);
This->dsb->ds3db_ds3db = *lpcDs3dBuffer; This->dsb->ds3db_ds3db = *lpcDs3dBuffer;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
@ -540,7 +540,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeAngles(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: Inside Cone Angle = %ld; Outside Cone Angle = %ld; dwApply = %ld\n", TRACE("setting: Inside Cone Angle = %d; Outside Cone Angle = %d; dwApply = %d\n",
dwInsideConeAngle, dwOutsideConeAngle, dwApply); dwInsideConeAngle, dwOutsideConeAngle, dwApply);
This->dsb->ds3db_ds3db.dwInsideConeAngle = dwInsideConeAngle; This->dsb->ds3db_ds3db.dwInsideConeAngle = dwInsideConeAngle;
This->dsb->ds3db_ds3db.dwOutsideConeAngle = dwOutsideConeAngle; This->dsb->ds3db_ds3db.dwOutsideConeAngle = dwOutsideConeAngle;
@ -558,7 +558,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeOrientation(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: Cone Orientation vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply); TRACE("setting: Cone Orientation vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply);
This->dsb->ds3db_ds3db.vConeOrientation.x = x; This->dsb->ds3db_ds3db.vConeOrientation.x = x;
This->dsb->ds3db_ds3db.vConeOrientation.y = y; This->dsb->ds3db_ds3db.vConeOrientation.y = y;
This->dsb->ds3db_ds3db.vConeOrientation.z = z; This->dsb->ds3db_ds3db.vConeOrientation.z = z;
@ -577,7 +577,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetConeOutsideVolume(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: ConeOutsideVolume = %ld; dwApply = %ld\n", lConeOutsideVolume, dwApply); TRACE("setting: ConeOutsideVolume = %d; dwApply = %d\n", lConeOutsideVolume, dwApply);
This->dsb->ds3db_ds3db.lConeOutsideVolume = lConeOutsideVolume; This->dsb->ds3db_ds3db.lConeOutsideVolume = lConeOutsideVolume;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -594,7 +594,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMaxDistance(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: MaxDistance = %f; dwApply = %ld\n", fMaxDistance, dwApply); TRACE("setting: MaxDistance = %f; dwApply = %d\n", fMaxDistance, dwApply);
This->dsb->ds3db_ds3db.flMaxDistance = fMaxDistance; This->dsb->ds3db_ds3db.flMaxDistance = fMaxDistance;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -611,7 +611,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMinDistance(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: MinDistance = %f; dwApply = %ld\n", fMinDistance, dwApply); TRACE("setting: MinDistance = %f; dwApply = %d\n", fMinDistance, dwApply);
This->dsb->ds3db_ds3db.flMinDistance = fMinDistance; This->dsb->ds3db_ds3db.flMinDistance = fMinDistance;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -628,7 +628,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetMode(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: Mode = %ld; dwApply = %ld\n", dwMode, dwApply); TRACE("setting: Mode = %d; dwApply = %d\n", dwMode, dwApply);
This->dsb->ds3db_ds3db.dwMode = dwMode; This->dsb->ds3db_ds3db.dwMode = dwMode;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -645,7 +645,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetPosition(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: Position vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply); TRACE("setting: Position vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply);
This->dsb->ds3db_ds3db.vPosition.x = x; This->dsb->ds3db_ds3db.vPosition.x = x;
This->dsb->ds3db_ds3db.vPosition.y = y; This->dsb->ds3db_ds3db.vPosition.y = y;
This->dsb->ds3db_ds3db.vPosition.z = z; This->dsb->ds3db_ds3db.vPosition.z = z;
@ -664,7 +664,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetVelocity(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface; IDirectSound3DBufferImpl *This = (IDirectSound3DBufferImpl *)iface;
TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply); TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %d\n", x, y, z, dwApply);
This->dsb->ds3db_ds3db.vVelocity.x = x; This->dsb->ds3db_ds3db.vVelocity.x = x;
This->dsb->ds3db_ds3db.vVelocity.y = y; This->dsb->ds3db_ds3db.vVelocity.y = y;
This->dsb->ds3db_ds3db.vVelocity.z = z; This->dsb->ds3db_ds3db.vVelocity.z = z;
@ -802,7 +802,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_AddRef(LPDIRECTSOUND3DLISTENER if
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
ULONG ref = InterlockedIncrement(&(This->ref)); ULONG ref = InterlockedIncrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref - 1); TRACE("(%p) ref was %d\n", This, ref - 1);
return ref; return ref;
} }
@ -810,7 +810,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_Release(LPDIRECTSOUND3DLISTENER i
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
ULONG ref = InterlockedDecrement(&(This->ref)); ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) ref was %ld\n", This, ref + 1); TRACE("(%p) ref was %d\n", This, ref + 1);
if (!ref) { if (!ref) {
This->device->listener = 0; This->device->listener = 0;
@ -834,7 +834,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_GetAllParameter(
} }
if (lpDS3DL->dwSize < sizeof(*lpDS3DL)) { if (lpDS3DL->dwSize < sizeof(*lpDS3DL)) {
WARN("invalid parameter: lpDS3DL->dwSize = %ld\n",lpDS3DL->dwSize); WARN("invalid parameter: lpDS3DL->dwSize = %d\n",lpDS3DL->dwSize);
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
@ -913,7 +913,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetAllParameters(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: all parameters; dwApply = %ld\n", dwApply); TRACE("setting: all parameters; dwApply = %d\n", dwApply);
This->device->ds3dl = *lpcDS3DL; This->device->ds3dl = *lpcDS3DL;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -930,7 +930,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetDistanceFactor(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: Distance Factor = %f; dwApply = %ld\n", fDistanceFactor, dwApply); TRACE("setting: Distance Factor = %f; dwApply = %d\n", fDistanceFactor, dwApply);
This->device->ds3dl.flDistanceFactor = fDistanceFactor; This->device->ds3dl.flDistanceFactor = fDistanceFactor;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -947,7 +947,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetDopplerFactor(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: Doppler Factor = %f; dwApply = %ld\n", fDopplerFactor, dwApply); TRACE("setting: Doppler Factor = %f; dwApply = %d\n", fDopplerFactor, dwApply);
This->device->ds3dl.flDopplerFactor = fDopplerFactor; This->device->ds3dl.flDopplerFactor = fDopplerFactor;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -965,7 +965,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetOrientation(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: Front vector = (%f,%f,%f); Top vector = (%f,%f,%f); dwApply = %ld\n", \ TRACE("setting: Front vector = (%f,%f,%f); Top vector = (%f,%f,%f); dwApply = %d\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;
@ -988,7 +988,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetPosition(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: Position vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply); TRACE("setting: Position vector = (%f,%f,%f); dwApply = %d\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;
@ -1007,7 +1007,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetRolloffFactor(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: Rolloff Factor = %f; dwApply = %ld\n", fRolloffFactor, dwApply); TRACE("setting: Rolloff Factor = %f; dwApply = %d\n", fRolloffFactor, dwApply);
This->device->ds3dl.flRolloffFactor = fRolloffFactor; This->device->ds3dl.flRolloffFactor = fRolloffFactor;
if (dwApply == DS3D_IMMEDIATE) if (dwApply == DS3D_IMMEDIATE)
{ {
@ -1024,7 +1024,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_SetVelocity(
DWORD dwApply) DWORD dwApply)
{ {
IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface; IDirectSound3DListenerImpl *This = (IDirectSound3DListenerImpl *)iface;
TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %ld\n", x, y, z, dwApply); TRACE("setting: Velocity vector = (%f,%f,%f); dwApply = %d\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;