Commit 2cf28070 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dsound: Remove unneeded casts.

parent a5195512
......@@ -376,7 +376,7 @@ DirectSoundCaptureEnumerateW(
wDesc, sizeof(wDesc)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
wName, sizeof(wName)/sizeof(WCHAR) );
if (lpDSEnumCallback((LPGUID)&DSOUND_capture_guids[wid], wDesc, wName, lpContext) == FALSE)
if (lpDSEnumCallback(&DSOUND_capture_guids[wid], wDesc, wName, lpContext) == FALSE)
return DS_OK;
}
}
......@@ -418,7 +418,7 @@ DSOUND_capture_callback(
DWORD dw2 )
{
DirectSoundCaptureDevice * This = (DirectSoundCaptureDevice*)dwUser;
IDirectSoundCaptureBufferImpl * Moi = (IDirectSoundCaptureBufferImpl*) This->capture_buffer;
IDirectSoundCaptureBufferImpl * Moi = This->capture_buffer;
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_DATA ? "MM_WIM_DATA" : "UNKNOWN",dwUser,dw1,dw2,GetTickCount());
......@@ -1388,7 +1388,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
HRESULT err = DS_OK;
LPBYTE newbuf;
DWORD buflen;
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)*ppobj;
IDirectSoundCaptureBufferImpl *This = *ppobj;
This->ref = 1;
This->device = device;
......
......@@ -1560,7 +1560,7 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
if (device->hwbuf)
device->dsbd.dwFlags |= DSBCAPS_LOCHARDWARE;
else device->dsbd.dwFlags |= DSBCAPS_LOCSOFTWARE;
hres = PrimaryBufferImpl_Create(device, (PrimaryBufferImpl**)&(device->primary), &(device->dsbd));
hres = PrimaryBufferImpl_Create(device, &(device->primary), &(device->dsbd));
if (device->primary) {
IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary));
*ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary);
......@@ -1628,12 +1628,12 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
return DSERR_INVALIDPARAM;
}
hres = IDirectSoundBufferImpl_Create(device, (IDirectSoundBufferImpl**)&dsb, dsbd);
hres = IDirectSoundBufferImpl_Create(device, &dsb, dsbd);
if (dsb) {
hres = SecondaryBufferImpl_Create(dsb, (SecondaryBufferImpl**)ppdsb);
if (*ppdsb) {
dsb->secondary = (SecondaryBufferImpl*)*ppdsb;
IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER)*ppdsb);
IDirectSoundBuffer_AddRef(*ppdsb);
} else
WARN("SecondaryBufferImpl_Create failed\n");
} else
......
......@@ -445,11 +445,11 @@ static LPBYTE DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, DWORD writepos,
/* 8-bit WAV is unsigned, but we need to operate */
/* on signed data for this to work properly */
for (i = 0; i < len; i+=2) {
*(bpc++) = (((INT)(*(mem++) - 128) * vLeft) >> 16) + 128;
*(bpc++) = (((INT)(*(mem++) - 128) * vRight) >> 16) + 128;
*(bpc++) = (((*(mem++) - 128) * vLeft) >> 16) + 128;
*(bpc++) = (((*(mem++) - 128) * vRight) >> 16) + 128;
}
if (len % 2 == 1 && nChannels == 1)
*(bpc++) = (((INT)(*(mem++) - 128) * vLeft) >> 16) + 128;
*(bpc++) = (((*(mem++) - 128) * vLeft) >> 16) + 128;
break;
case 16:
/* 16-bit WAV is signed -- much better */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment