Commit 5155e801 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

mmsystem: Use SEGPTR when the .spec says so.

parent 64c84ef5
......@@ -424,10 +424,10 @@ MMRESULT16 WINAPI mmioSetInfo16(HMMIO16 hmmio, const MMIOINFO16* lpmmioinfo, UIN
/**************************************************************************
* mmioSetBuffer [MMSYSTEM.1217]
*/
MMRESULT16 WINAPI mmioSetBuffer16(HMMIO16 hmmio, LPSTR pchBuffer,
MMRESULT16 WINAPI mmioSetBuffer16(HMMIO16 hmmio, SEGPTR pchBuffer,
LONG cchBuffer, UINT16 uFlags)
{
MMRESULT ret = mmioSetBuffer(HMMIO_32(hmmio), MapSL((DWORD)pchBuffer),
MMRESULT ret = mmioSetBuffer(HMMIO_32(hmmio), MapSL(pchBuffer),
cchBuffer, uFlags);
if (ret == MMSYSERR_NOERROR)
......@@ -439,10 +439,10 @@ MMRESULT16 WINAPI mmioSetBuffer16(HMMIO16 hmmio, LPSTR pchBuffer,
FIXME("really ?\n");
return MMSYSERR_INVALHANDLE;
}
MMIO_SetSegmentedBuffer(thunk, (DWORD)pchBuffer, TRUE);
MMIO_SetSegmentedBuffer(thunk, pchBuffer, TRUE);
}
else
UnMapLS((DWORD)pchBuffer);
UnMapLS(pchBuffer);
return ret;
}
......
......@@ -814,12 +814,12 @@ UINT16 WINAPI midiOutShortMsg16(HMIDIOUT16 hMidiOut, DWORD dwMsg)
* midiOutLongMsg [MMSYSTEM.209]
*/
UINT16 WINAPI midiOutLongMsg16(HMIDIOUT16 hMidiOut, /* [in] */
LPMIDIHDR16 lpsegMidiOutHdr, /* [???] NOTE: SEGPTR */
SEGPTR lpsegMidiOutHdr, /* [???] */
UINT16 uSize) /* [in] */
{
TRACE("(%04X, %p, %d)\n", hMidiOut, lpsegMidiOutHdr, uSize);
TRACE("(%04X, %08x, %d)\n", hMidiOut, lpsegMidiOutHdr, uSize);
return MMSYSTDRV_Message(HMIDIOUT_32(hMidiOut), MODM_LONGDATA, (DWORD_PTR)lpsegMidiOutHdr, uSize);
return MMSYSTDRV_Message(HMIDIOUT_32(hMidiOut), MODM_LONGDATA, lpsegMidiOutHdr, uSize);
}
/**************************************************************************
......@@ -895,10 +895,10 @@ DWORD WINAPI midiOutMessage16(HMIDIOUT16 hMidiOut, UINT16 uMessage,
case MODM_GETVOLUME:
return midiOutGetVolume16(hMidiOut, MapSL(dwParam1));
/* lpMidiOutHdr is still a segmented pointer for these functions */
case MODM_LONGDATA:
return midiOutLongMsg16(hMidiOut, MapSL(dwParam1), dwParam2);
return midiOutLongMsg16(hMidiOut, dwParam1, dwParam2);
case MODM_PREPARE:
/* lpMidiOutHdr is still a segmented pointer for this function */
return midiOutPrepareHeader16(hMidiOut, dwParam1, dwParam2);
case MODM_UNPREPARE:
return midiOutUnprepareHeader16(hMidiOut, dwParam1, dwParam2);
......@@ -1010,12 +1010,12 @@ UINT16 WINAPI midiInUnprepareHeader16(HMIDIIN16 hMidiIn, /* [in] */
* midiInAddBuffer [MMSYSTEM.308]
*/
UINT16 WINAPI midiInAddBuffer16(HMIDIIN16 hMidiIn, /* [in] */
MIDIHDR16* lpsegMidiInHdr, /* [???] NOTE: SEGPTR */
SEGPTR lpsegMidiInHdr, /* [???] */
UINT16 uSize) /* [in] */
{
TRACE("(%04X, %p, %d)\n", hMidiIn, lpsegMidiInHdr, uSize);
TRACE("(%04X, %08x, %d)\n", hMidiIn, lpsegMidiInHdr, uSize);
return MMSYSTDRV_Message(HMIDIIN_32(hMidiIn), MIDM_ADDBUFFER, (DWORD_PTR)lpsegMidiInHdr, uSize);
return MMSYSTDRV_Message(HMIDIIN_32(hMidiIn), MIDM_ADDBUFFER, lpsegMidiInHdr, uSize);
}
/**************************************************************************
......@@ -1077,7 +1077,7 @@ DWORD WINAPI midiInMessage16(HMIDIIN16 hMidiIn, UINT16 uMessage,
case MIDM_UNPREPARE:
return midiInUnprepareHeader16(hMidiIn, dwParam1, dwParam2);
case MIDM_ADDBUFFER:
return midiInAddBuffer16(hMidiIn, MapSL(dwParam1), dwParam2);
return midiInAddBuffer16(hMidiIn, dwParam1, dwParam2);
}
return MMSYSTDRV_Message(HMIDIIN_32(hMidiIn), uMessage, dwParam1, dwParam2);
}
......@@ -1330,12 +1330,12 @@ UINT16 WINAPI waveOutUnprepareHeader16(HWAVEOUT16 hWaveOut, /* [in] */
* waveOutWrite [MMSYSTEM.408]
*/
UINT16 WINAPI waveOutWrite16(HWAVEOUT16 hWaveOut, /* [in] */
LPWAVEHDR lpsegWaveOutHdr, /* [???] NOTE: SEGPTR */
SEGPTR lpsegWaveOutHdr, /* [???] */
UINT16 uSize) /* [in] */
{
TRACE("(%04X, %p, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize);
TRACE("(%04X, %08x, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize);
return MMSYSTDRV_Message(HWAVEOUT_32(hWaveOut), WODM_WRITE, (DWORD_PTR)lpsegWaveOutHdr, uSize);
return MMSYSTDRV_Message(HWAVEOUT_32(hWaveOut), WODM_WRITE, lpsegWaveOutHdr, uSize);
}
/**************************************************************************
......@@ -1616,14 +1616,14 @@ UINT16 WINAPI waveInUnprepareHeader16(HWAVEIN16 hWaveIn, /* [in] */
* waveInAddBuffer [MMSYSTEM.508]
*/
UINT16 WINAPI waveInAddBuffer16(HWAVEIN16 hWaveIn, /* [in] */
WAVEHDR* lpsegWaveInHdr, /* [???] NOTE: SEGPTR */
SEGPTR lpsegWaveInHdr, /* [???] */
UINT16 uSize) /* [in] */
{
TRACE("(%04X, %p, %u);\n", hWaveIn, lpsegWaveInHdr, uSize);
TRACE("(%04X, %08x, %u);\n", hWaveIn, lpsegWaveInHdr, uSize);
if (lpsegWaveInHdr == NULL) return MMSYSERR_INVALPARAM;
if (lpsegWaveInHdr == 0) return MMSYSERR_INVALPARAM;
return MMSYSTDRV_Message(HWAVEIN_32(hWaveIn), WIDM_ADDBUFFER, (DWORD_PTR)lpsegWaveInHdr, uSize);
return MMSYSTDRV_Message(HWAVEIN_32(hWaveIn), WIDM_ADDBUFFER, lpsegWaveInHdr, uSize);
}
/**************************************************************************
......
......@@ -120,7 +120,7 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16*,UINT16,const WAVEFORMATEX *,DWORD,DWO
UINT16 WINAPI waveOutClose16(HWAVEOUT16);
UINT16 WINAPI waveOutPrepareHeader16(HWAVEOUT16,SEGPTR,UINT16);
UINT16 WINAPI waveOutUnprepareHeader16(HWAVEOUT16,SEGPTR,UINT16);
UINT16 WINAPI waveOutWrite16(HWAVEOUT16,WAVEHDR*,UINT16);
UINT16 WINAPI waveOutWrite16(HWAVEOUT16,SEGPTR,UINT16);
UINT16 WINAPI waveOutPause16(HWAVEOUT16);
UINT16 WINAPI waveOutRestart16(HWAVEOUT16);
UINT16 WINAPI waveOutReset16(HWAVEOUT16);
......@@ -139,7 +139,7 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16*,UINT16,const WAVEFORMATEX *,DWORD,DWORD
UINT16 WINAPI waveInClose16(HWAVEIN16);
UINT16 WINAPI waveInPrepareHeader16(HWAVEIN16,SEGPTR,UINT16);
UINT16 WINAPI waveInUnprepareHeader16(HWAVEIN16,SEGPTR,UINT16);
UINT16 WINAPI waveInAddBuffer16(HWAVEIN16,WAVEHDR*,UINT16);
UINT16 WINAPI waveInAddBuffer16(HWAVEIN16,SEGPTR,UINT16);
UINT16 WINAPI waveInStart16(HWAVEIN16);
UINT16 WINAPI waveInStop16(HWAVEIN16);
UINT16 WINAPI waveInReset16(HWAVEIN16);
......@@ -199,7 +199,7 @@ UINT16 WINAPI midiOutClose16(HMIDIOUT16);
UINT16 WINAPI midiOutPrepareHeader16(HMIDIOUT16,SEGPTR,UINT16);
UINT16 WINAPI midiOutUnprepareHeader16(HMIDIOUT16,SEGPTR,UINT16);
UINT16 WINAPI midiOutShortMsg16(HMIDIOUT16,DWORD);
UINT16 WINAPI midiOutLongMsg16(HMIDIOUT16,MIDIHDR16*,UINT16);
UINT16 WINAPI midiOutLongMsg16(HMIDIOUT16,SEGPTR,UINT16);
UINT16 WINAPI midiOutReset16(HMIDIOUT16);
UINT16 WINAPI midiOutCachePatches16(HMIDIOUT16,UINT16,WORD*,UINT16);
UINT16 WINAPI midiOutCacheDrumPatches16(HMIDIOUT16,UINT16,WORD*,UINT16);
......@@ -212,7 +212,7 @@ UINT16 WINAPI midiInOpen16(HMIDIIN16*,UINT16,DWORD,DWORD,DWORD);
UINT16 WINAPI midiInClose16(HMIDIIN16);
UINT16 WINAPI midiInPrepareHeader16(HMIDIIN16,SEGPTR,UINT16);
UINT16 WINAPI midiInUnprepareHeader16(HMIDIIN16,SEGPTR,UINT16);
UINT16 WINAPI midiInAddBuffer16(HMIDIIN16,MIDIHDR16*,UINT16);
UINT16 WINAPI midiInAddBuffer16(HMIDIIN16,SEGPTR,UINT16);
UINT16 WINAPI midiInStart16(HMIDIIN16);
UINT16 WINAPI midiInStop16(HMIDIIN16);
UINT16 WINAPI midiInReset16(HMIDIIN16);
......@@ -440,7 +440,7 @@ LONG WINAPI mmioWrite16(HMMIO16,HPCSTR,LONG);
LONG WINAPI mmioSeek16(HMMIO16,LONG,INT16);
MMRESULT16 WINAPI mmioGetInfo16(HMMIO16,MMIOINFO16*,UINT16);
MMRESULT16 WINAPI mmioSetInfo16(HMMIO16,const MMIOINFO16*,UINT16);
UINT16 WINAPI mmioSetBuffer16(HMMIO16,LPSTR,LONG,UINT16);
UINT16 WINAPI mmioSetBuffer16(HMMIO16,SEGPTR,LONG,UINT16);
UINT16 WINAPI mmioFlush16(HMMIO16,UINT16);
UINT16 WINAPI mmioAdvance16(HMMIO16,MMIOINFO16*,UINT16);
LRESULT WINAPI mmioSendMessage16(HMMIO16,UINT16,LPARAM,LPARAM);
......
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