Michael Stefaniuc : dsound: Arguments 3,4, 5 of a CALLBACK are of type DWORD_PTR.
Alexandre Julliard
julliard at winehq.org
Thu Feb 12 11:14:44 CST 2009
Module: wine
Branch: master
Commit: e1d59b94fb8a017450c16950427f03427dfba59a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e1d59b94fb8a017450c16950427f03427dfba59a
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Wed Feb 11 23:17:12 2009 +0100
dsound: Arguments 3,4,5 of a CALLBACK are of type DWORD_PTR.
(LPWAVEHDR)->dwUser is also a DWORD_PTR.
---
dlls/dsound/capture.c | 14 +++++---------
dlls/dsound/primary.c | 2 +-
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
index 6b0cd5b..2a8252f 100644
--- a/dlls/dsound/capture.c
+++ b/dlls/dsound/capture.c
@@ -410,16 +410,12 @@ static void capture_CheckNotify(IDirectSoundCaptureBufferImpl *This, DWORD from,
}
static void CALLBACK
-DSOUND_capture_callback(
- HWAVEIN hwi,
- UINT msg,
- DWORD dwUser,
- DWORD dw1,
- DWORD dw2 )
+DSOUND_capture_callback(HWAVEIN hwi, UINT msg, DWORD_PTR dwUser, DWORD_PTR dw1,
+ DWORD_PTR dw2)
{
DirectSoundCaptureDevice * This = (DirectSoundCaptureDevice*)dwUser;
IDirectSoundCaptureBufferImpl * Moi = This->capture_buffer;
- TRACE("(%p,%08x(%s),%08x,%08x,%08x) entering at %d\n",hwi,msg,
+ TRACE("(%p,%08x(%s),%08lx,%08lx,%08lx) entering at %d\n",hwi,msg,
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());
@@ -1157,7 +1153,7 @@ IDirectSoundCaptureBufferImpl_Start(
else
device->pwave[c].dwBufferLength = blocksize;
device->pwave[c].dwBytesRecorded = 0;
- device->pwave[c].dwUser = (DWORD)device;
+ device->pwave[c].dwUser = (DWORD_PTR)device;
device->pwave[c].dwFlags = 0;
device->pwave[c].dwLoops = 0;
hres = mmErr(waveInPrepareHeader(device->hwi, &(device->pwave[c]),sizeof(WAVEHDR)));
@@ -1460,7 +1456,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
DWORD flags = CALLBACK_FUNCTION;
err = mmErr(waveInOpen(&(device->hwi),
device->drvdesc.dnDevNode, device->pwfx,
- (DWORD_PTR)DSOUND_capture_callback, (DWORD)device, flags));
+ (DWORD_PTR)DSOUND_capture_callback, (DWORD_PTR)device, flags));
if (err != DS_OK) {
WARN("waveInOpen failed\n");
This->device->capture_buffer = 0;
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index 288466a..a57a5af 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -253,7 +253,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
for (c=0; c<device->helfrags; c++) {
device->pwave[c].lpData = (char*)device->buffer + c*device->fraglen;
device->pwave[c].dwBufferLength = device->fraglen;
- device->pwave[c].dwUser = (DWORD)device;
+ device->pwave[c].dwUser = (DWORD_PTR)device;
device->pwave[c].dwFlags = 0;
device->pwave[c].dwLoops = 0;
err = mmErr(waveOutPrepareHeader(device->hwo,&device->pwave[c],sizeof(WAVEHDR)));
More information about the wine-cvs
mailing list