winmm: Remove unneeded casts.
This commit is contained in:
parent
35e0bb8225
commit
19c5811256
|
@ -323,7 +323,7 @@ static WINMM_MapType MMDRV_MidiOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, DW
|
|||
mh32->dwFlags = mh16->dwFlags;
|
||||
/* FIXME: nothing on mh32->lpNext */
|
||||
/* could link the mh32->lpNext at this level for memory house keeping */
|
||||
mh32->dwOffset = (*lpParam2 >= sizeof(MIDIHDR)) ? ((LPMIDIHDR)mh16)->dwOffset : 0;
|
||||
mh32->dwOffset = (*lpParam2 >= sizeof(MIDIHDR)) ? mh16->dwOffset : 0;
|
||||
mh16->lpNext = mh32; /* for reuse in unprepare and write */
|
||||
/* store size of passed MIDIHDR?? structure to know if dwOffset is available or not */
|
||||
mh16->reserved = *lpParam2;
|
||||
|
@ -340,7 +340,7 @@ static WINMM_MapType MMDRV_MidiOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, DW
|
|||
case MODM_LONGDATA:
|
||||
{
|
||||
LPMIDIHDR mh16 = MapSL(*lpParam1);
|
||||
LPMIDIHDR mh32 = (LPMIDIHDR)mh16->lpNext;
|
||||
LPMIDIHDR mh32 = mh16->lpNext;
|
||||
|
||||
*lpParam1 = (DWORD)mh32;
|
||||
*lpParam2 = sizeof(MIDIHDR);
|
||||
|
@ -486,7 +486,7 @@ static WINMM_MapType MMDRV_MidiOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
|
|||
/* could link the mh32->lpNext at this level for memory house keeping */
|
||||
mh16->dwOffset = (*lpParam2 >= sizeof(MIDIHDR)) ? mh32->dwOffset : 0;
|
||||
|
||||
mh32->lpNext = (LPMIDIHDR)mh16; /* for reuse in unprepare and write */
|
||||
mh32->lpNext = mh16; /* for reuse in unprepare and write */
|
||||
mh32->reserved = *lpParam2;
|
||||
|
||||
TRACE("mh16=%08lx mh16->lpData=%p mh32->buflen=%u mh32->lpData=%p\n",
|
||||
|
@ -503,7 +503,7 @@ static WINMM_MapType MMDRV_MidiOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
|
|||
case MODM_LONGDATA:
|
||||
{
|
||||
LPMIDIHDR mh32 = (LPMIDIHDR)(*lpParam1);
|
||||
LPMIDIHDR mh16 = (LPMIDIHDR)mh32->lpNext;
|
||||
LPMIDIHDR mh16 = mh32->lpNext;
|
||||
LPSTR ptr = (LPSTR)mh16 - sizeof(LPMIDIHDR);
|
||||
|
||||
assert(*(LPMIDIHDR*)ptr == mh32);
|
||||
|
@ -618,7 +618,7 @@ static WINMM_MapType MMDRV_MidiOut_UnMap32WTo16(UINT wMsg, LPDWORD lpdwUser, DW
|
|||
LPSTR ptr = (LPSTR)mh16 - sizeof(LPMIDIHDR);
|
||||
LPMIDIHDR mh32 = *(LPMIDIHDR*)ptr;
|
||||
|
||||
assert(mh32->lpNext == (LPMIDIHDR)mh16);
|
||||
assert(mh32->lpNext == mh16);
|
||||
UnMapLS( *lpParam1 );
|
||||
mh32->dwBytesRecorded = mh16->dwBytesRecorded;
|
||||
mh32->dwUser = mh16->dwUser;
|
||||
|
@ -784,7 +784,7 @@ static WINMM_MapType MMDRV_WaveIn_Map16To32W (UINT wMsg, LPDWORD lpdwUser, DWO
|
|||
case WIDM_UNPREPARE:
|
||||
{
|
||||
LPWAVEHDR wh16 = MapSL(*lpParam1);
|
||||
LPWAVEHDR wh32 = (LPWAVEHDR)wh16->lpNext;
|
||||
LPWAVEHDR wh32 = wh16->lpNext;
|
||||
|
||||
*lpParam1 = (DWORD)wh32;
|
||||
*lpParam2 = sizeof(WAVEHDR);
|
||||
|
@ -914,8 +914,8 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DWO
|
|||
xxx extra bytes to WAVEFORMATEX
|
||||
*/
|
||||
if (wod32->lpFormat->wFormatTag != WAVE_FORMAT_PCM) {
|
||||
TRACE("Allocating %u extra bytes (%d)\n", ((LPWAVEFORMATEX)wod32->lpFormat)->cbSize, wod32->lpFormat->wFormatTag);
|
||||
sz += ((LPWAVEFORMATEX)wod32->lpFormat)->cbSize;
|
||||
TRACE("Allocating %u extra bytes (%d)\n", wod32->lpFormat->cbSize, wod32->lpFormat->wFormatTag);
|
||||
sz += wod32->lpFormat->cbSize;
|
||||
}
|
||||
|
||||
ptr = HeapAlloc( GetProcessHeap(), 0,
|
||||
|
@ -1283,7 +1283,7 @@ static WINMM_MapType MMDRV_WaveOut_Map16To32W (UINT wMsg, LPDWORD lpdwUser, DW
|
|||
case WODM_WRITE:
|
||||
{
|
||||
LPWAVEHDR wh16 = MapSL(*lpParam1);
|
||||
LPWAVEHDR wh32 = (LPWAVEHDR)wh16->lpNext;
|
||||
LPWAVEHDR wh32 = wh16->lpNext;
|
||||
|
||||
*lpParam1 = (DWORD)wh32;
|
||||
*lpParam2 = sizeof(WAVEHDR);
|
||||
|
@ -1473,8 +1473,8 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
|
|||
xxx extra bytes to WAVEFORMATEX
|
||||
*/
|
||||
if (wod32->lpFormat->wFormatTag != WAVE_FORMAT_PCM) {
|
||||
TRACE("Allocating %u extra bytes (%d)\n", ((LPWAVEFORMATEX)wod32->lpFormat)->cbSize, wod32->lpFormat->wFormatTag);
|
||||
sz += ((LPWAVEFORMATEX)wod32->lpFormat)->cbSize;
|
||||
TRACE("Allocating %u extra bytes (%d)\n", wod32->lpFormat->cbSize, wod32->lpFormat->wFormatTag);
|
||||
sz += wod32->lpFormat->cbSize;
|
||||
}
|
||||
|
||||
ptr = HeapAlloc( GetProcessHeap(), 0,
|
||||
|
@ -3348,7 +3348,7 @@ static WINMM_MapType MCI_UnMapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlag
|
|||
mip32w->lpstrReturn, mip32w->dwRetSize / sizeof(WCHAR));
|
||||
UnMapLS( lParam );
|
||||
UnMapLS( mip16->lpstrReturn );
|
||||
HeapFree( GetProcessHeap(), 0, (void*)MapSL(mip16->lpstrReturn) );
|
||||
HeapFree( GetProcessHeap(), 0, MapSL(mip16->lpstrReturn) );
|
||||
HeapFree( GetProcessHeap(), 0, (char*)mip16 - sizeof(LPMCI_OPEN_PARMSW) );
|
||||
}
|
||||
return WINMM_MAP_OK;
|
||||
|
|
|
@ -1508,7 +1508,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
|
|||
/* this is not quite what MS doc says... */
|
||||
midiOutReset(lpMidiStrm->hDevice);
|
||||
/* empty list of already submitted buffers */
|
||||
for (lpMidiHdr = lpMidiStrm->lpMidiHdr; lpMidiHdr; lpMidiHdr = (LPMIDIHDR)lpMidiHdr->lpNext) {
|
||||
for (lpMidiHdr = lpMidiStrm->lpMidiHdr; lpMidiHdr; lpMidiHdr = lpMidiHdr->lpNext) {
|
||||
lpMidiHdr->dwFlags |= MHDR_DONE;
|
||||
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
|
||||
|
||||
|
@ -1592,7 +1592,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
|
|||
break;
|
||||
}
|
||||
|
||||
for (lpmh = &lpMidiStrm->lpMidiHdr; *lpmh; lpmh = (LPMIDIHDR*)&((*lpmh)->lpNext));
|
||||
for (lpmh = &lpMidiStrm->lpMidiHdr; *lpmh; lpmh = &(*lpmh)->lpNext);
|
||||
*lpmh = lpMidiHdr;
|
||||
lpMidiHdr = (LPMIDIHDR)msg->lParam;
|
||||
lpMidiHdr->lpNext = 0;
|
||||
|
@ -1720,7 +1720,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
|
|||
lpMidiHdr->dwFlags |= MHDR_DONE;
|
||||
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
|
||||
|
||||
lpMidiStrm->lpMidiHdr = (LPMIDIHDR)lpMidiHdr->lpNext;
|
||||
lpMidiStrm->lpMidiHdr = lpMidiHdr->lpNext;
|
||||
DriverCallback(lpwm->mod.dwCallback, lpMidiStrm->wFlags,
|
||||
(HDRVR)lpMidiStrm->hDevice, MM_MOM_DONE,
|
||||
lpwm->mod.dwInstance, (DWORD)lpMidiHdr, 0L);
|
||||
|
|
Loading…
Reference in New Issue