Commit e5b16af6 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

mciseq: Enable compilation with long types.

parent 99e8df6a
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = mciseq.dll MODULE = mciseq.dll
IMPORTS = winmm user32 IMPORTS = winmm user32
......
...@@ -252,7 +252,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -252,7 +252,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
DWORD tmp; DWORD tmp;
if (mmioSeek(wmm->hFile, mmt->dwIndex, SEEK_SET) != mmt->dwIndex) { if (mmioSeek(wmm->hFile, mmt->dwIndex, SEEK_SET) != mmt->dwIndex) {
WARN("Can't seek at %08X\n", mmt->dwIndex); WARN("Can't seek at %08lX\n", mmt->dwIndex);
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
evtLength = MIDI_mciReadVaryLen(wmm, &evtPulse) + 1; /* > 0 */ evtLength = MIDI_mciReadVaryLen(wmm, &evtPulse) + 1; /* > 0 */
...@@ -380,7 +380,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -380,7 +380,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
} }
mmt->dwLength = mmt->dwEventPulse; mmt->dwLength = mmt->dwEventPulse;
TRACE("Track %u has %u bytes and %u pulses\n", mmt->wTrackNr, toberead, mmt->dwLength); TRACE("Track %u has %lu bytes and %lu pulses\n", mmt->wTrackNr, toberead, mmt->dwLength);
/* reset track data */ /* reset track data */
mmt->wStatus = 1; /* ok, playing */ mmt->wStatus = 1; /* ok, playing */
...@@ -388,7 +388,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -388,7 +388,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
mmt->dwEventPulse = 0; mmt->dwEventPulse = 0;
if (mmioSeek(wmm->hFile, 0, SEEK_CUR) != mmt->dwLast) { if (mmioSeek(wmm->hFile, 0, SEEK_CUR) != mmt->dwLast) {
WARN("Ouch, out of sync seek=%u track=%u\n", WARN("Ouch, out of sync seek=%lu track=%lu\n",
mmioSeek(wmm->hFile, 0, SEEK_CUR), mmt->dwLast); mmioSeek(wmm->hFile, 0, SEEK_CUR), mmt->dwLast);
/* position at end of this track, to be ready to read next track */ /* position at end of this track, to be ready to read next track */
mmioSeek(wmm->hFile, mmt->dwLast, SEEK_SET); mmioSeek(wmm->hFile, mmt->dwLast, SEEK_SET);
...@@ -406,10 +406,10 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset) ...@@ -406,10 +406,10 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
FOURCC fourcc; FOURCC fourcc;
WORD nt; WORD nt;
TRACE("(%p, %08X);\n", wmm, dwOffset); TRACE("(%p, %08lX);\n", wmm, dwOffset);
if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) { if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) {
WARN("Can't seek at %08X begin of 'MThd'\n", dwOffset); WARN("Can't seek at %08lX begin of 'MThd'\n", dwOffset);
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
if (mmioRead(wmm->hFile, (HPSTR)&fourcc, sizeof(FOURCC)) != sizeof(FOURCC)) if (mmioRead(wmm->hFile, (HPSTR)&fourcc, sizeof(FOURCC)) != sizeof(FOURCC))
...@@ -429,7 +429,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset) ...@@ -429,7 +429,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
TRACE("toberead=0x%08X, wFormat=0x%04X nTracks=0x%04X nDivision=0x%04X\n", TRACE("toberead=0x%08lX, wFormat=0x%04X nTracks=0x%04X nDivision=0x%04X\n",
toberead, wmm->wFormat, wmm->nTracks, wmm->nDivision); toberead, wmm->wFormat, wmm->nTracks, wmm->nDivision);
/* MS doc says that the MIDI MCI time format must be put by default to the format /* MS doc says that the MIDI MCI time format must be put by default to the format
...@@ -499,7 +499,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset) ...@@ -499,7 +499,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
toberead -= 3 * sizeof(WORD); toberead -= 3 * sizeof(WORD);
if (toberead > 0) { if (toberead > 0) {
TRACE("Size of MThd > 6, skipping %d extra bytes\n", toberead); TRACE("Size of MThd > 6, skipping %ld extra bytes\n", toberead);
mmioSeek(wmm->hFile, toberead, SEEK_CUR); mmioSeek(wmm->hFile, toberead, SEEK_CUR);
} }
...@@ -576,7 +576,7 @@ static DWORD MIDI_ConvertTimeFormatToMS(WINE_MCIMIDI* wmm, DWORD val) ...@@ -576,7 +576,7 @@ static DWORD MIDI_ConvertTimeFormatToMS(WINE_MCIMIDI* wmm, DWORD val)
HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR; HIBYTE(LOWORD(val)) * TIME_MS_IN_ONE_MINUTE + LOBYTE(LOWORD(val)) * TIME_MS_IN_ONE_HOUR;
break; break;
default: default:
WARN("Bad time format %u!\n", wmm->dwMciTimeFormat); WARN("Bad time format %lu!\n", wmm->dwMciTimeFormat);
} }
/* /*
TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val, wmm->dwMciTimeFormat, ret); TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val, wmm->dwMciTimeFormat, ret);
...@@ -624,7 +624,7 @@ static DWORD MIDI_ConvertMSToTimeFormat(WINE_MCIMIDI* wmm, DWORD _val) ...@@ -624,7 +624,7 @@ static DWORD MIDI_ConvertMSToTimeFormat(WINE_MCIMIDI* wmm, DWORD _val)
ret = (f << 24) | (s << 16) | (m << 8) | (h << 0); ret = (f << 24) | (s << 16) | (m << 8) | (h << 0);
break; break;
default: default:
WARN("Bad time format %u!\n", wmm->dwMciTimeFormat); WARN("Bad time format %lu!\n", wmm->dwMciTimeFormat);
} }
/* /*
TRACE("val=%u [tf=%u] => ret=%u=0x%08x\n", _val, wmm->dwMciTimeFormat, ret, ret); TRACE("val=%u [tf=%u] => ret=%u=0x%08x\n", _val, wmm->dwMciTimeFormat, ret, ret);
...@@ -658,7 +658,7 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp ...@@ -658,7 +658,7 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp
{ {
DWORD dwRet = 0; DWORD dwRet = 0;
TRACE("(%d, %08X, %p)\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p)\n", wmm->wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (dwFlags & MCI_OPEN_SHAREABLE) if (dwFlags & MCI_OPEN_SHAREABLE)
...@@ -712,7 +712,7 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp ...@@ -712,7 +712,7 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp
if (mmioDescend(wmm->hFile, &ckMainRIFF, NULL, 0) != 0) { if (mmioDescend(wmm->hFile, &ckMainRIFF, NULL, 0) != 0) {
dwRet = MCIERR_INVALID_FILE; dwRet = MCIERR_INVALID_FILE;
} else { } else {
TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08X\n", TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX\n",
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType, ckMainRIFF.cksize); (LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType, ckMainRIFF.cksize);
if (ckMainRIFF.ckid == FOURCC_RIFF && ckMainRIFF.fccType == mmioFOURCC('R', 'M', 'I', 'D')) { if (ckMainRIFF.ckid == FOURCC_RIFF && ckMainRIFF.fccType == mmioFOURCC('R', 'M', 'I', 'D')) {
...@@ -761,7 +761,7 @@ static DWORD MIDI_mciStop(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS ...@@ -761,7 +761,7 @@ static DWORD MIDI_mciStop(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS
{ {
DWORD dwRet = 0; DWORD dwRet = 0;
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (wmm->dwStatus != MCI_MODE_STOP) { if (wmm->dwStatus != MCI_MODE_STOP) {
HANDLE old = InterlockedExchangePointer(&wmm->hCallback, NULL); HANDLE old = InterlockedExchangePointer(&wmm->hCallback, NULL);
...@@ -793,7 +793,7 @@ static DWORD MIDI_mciStop(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS ...@@ -793,7 +793,7 @@ static DWORD MIDI_mciStop(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS
static DWORD MIDI_mciClose(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) static DWORD MIDI_mciClose(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
{ {
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (wmm->dwStatus != MCI_MODE_STOP) { if (wmm->dwStatus != MCI_MODE_STOP) {
/* mciStop handles MCI_NOTIFY_ABORTED */ /* mciStop handles MCI_NOTIFY_ABORTED */
...@@ -904,7 +904,7 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags) ...@@ -904,7 +904,7 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags)
if (doPlay && !wmm->wStartedPlaying) { if (doPlay && !wmm->wStartedPlaying) {
wmm->dwStartTicks = GetTickCount() - MIDI_ConvertPulseToMS(wmm, wmm->dwPulse); wmm->dwStartTicks = GetTickCount() - MIDI_ConvertPulseToMS(wmm, wmm->dwPulse);
wmm->wStartedPlaying = TRUE; wmm->wStartedPlaying = TRUE;
TRACE("Setting dwStartTicks to %u\n", wmm->dwStartTicks); TRACE("Setting dwStartTicks to %lu\n", wmm->dwStartTicks);
} }
if (hiPulse > wmm->dwPulse) { if (hiPulse > wmm->dwPulse) {
...@@ -913,8 +913,8 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags) ...@@ -913,8 +913,8 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags)
DWORD togo = wmm->dwStartTicks + wmm->dwPositionMS; DWORD togo = wmm->dwStartTicks + wmm->dwPositionMS;
DWORD tc = GetTickCount(); DWORD tc = GetTickCount();
TRACE("Pulses hi=0x%08x <> cur=0x%08x\n", hiPulse, wmm->dwPulse); TRACE("Pulses hi=0x%08lx <> cur=0x%08lx\n", hiPulse, wmm->dwPulse);
TRACE("Wait until %u => %u ms\n", TRACE("Wait until %lu => %lu ms\n",
tc - wmm->dwStartTicks, togo - wmm->dwStartTicks); tc - wmm->dwStartTicks, togo - wmm->dwStartTicks);
if (tc < togo) if (tc < togo)
Sleep(togo - tc); Sleep(togo - tc);
...@@ -1001,7 +1001,7 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags) ...@@ -1001,7 +1001,7 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags)
MIDI_mciReadByte(wmm, &tbt); value = ((DWORD)tbt) << 16; MIDI_mciReadByte(wmm, &tbt); value = ((DWORD)tbt) << 16;
MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 8; MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 8;
MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 0; MIDI_mciReadByte(wmm, &tbt); value |= ((DWORD)tbt) << 0;
TRACE("Setting tempo to %d (BPM=%d)\n", wmm->dwTempo, (value) ? (60000000 / value) : 0); TRACE("Setting tempo to %ld (BPM=%ld)\n", wmm->dwTempo, (value) ? (60000000 / value) : 0);
wmm->dwTempo = value; wmm->dwTempo = value;
} }
break; break;
...@@ -1009,7 +1009,7 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags) ...@@ -1009,7 +1009,7 @@ static DWORD MIDI_player(WINE_MCIMIDI* wmm, DWORD dwFlags)
if (mmt->wTrackNr != 0 && wmm->wFormat == 1) { if (mmt->wTrackNr != 0 && wmm->wFormat == 1) {
WARN("For format #1 MIDI files, SMPTE track start can only be expressed on track #0 (%u)\n", mmt->wTrackNr); WARN("For format #1 MIDI files, SMPTE track start can only be expressed on track #0 (%u)\n", mmt->wTrackNr);
} if (mmt->dwEventPulse != 0) { } if (mmt->dwEventPulse != 0) {
WARN("SMPTE track start can only be expressed at start of track (%u)\n", mmt->dwEventPulse); WARN("SMPTE track start can only be expressed at start of track (%lu)\n", mmt->dwEventPulse);
} else { } else {
BYTE h, m, s, f, ff; BYTE h, m, s, f, ff;
...@@ -1139,7 +1139,7 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP ...@@ -1139,7 +1139,7 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP
DWORD dwRet; DWORD dwRet;
HANDLE oldcb; HANDLE oldcb;
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (wmm->hFile == 0) { if (wmm->hFile == 0) {
WARN("Can't play: no file %s!\n", debugstr_w(wmm->lpstrElementName)); WARN("Can't play: no file %s!\n", debugstr_w(wmm->lpstrElementName));
...@@ -1171,7 +1171,7 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP ...@@ -1171,7 +1171,7 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP
wmm->dwEndMS = dwEndMS; wmm->dwEndMS = dwEndMS;
} }
TRACE("Playing from %u to %u\n", dwStartMS, dwEndMS); TRACE("Playing from %lu to %lu\n", dwStartMS, dwEndMS);
if ((dwFlags & MCI_NOTIFY) && lpParms) { if ((dwFlags & MCI_NOTIFY) && lpParms) {
oldcb = InterlockedExchangePointer(&wmm->hCallback, HWND_32(LOWORD(lpParms->dwCallback))); oldcb = InterlockedExchangePointer(&wmm->hCallback, HWND_32(LOWORD(lpParms->dwCallback)));
...@@ -1194,7 +1194,7 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP ...@@ -1194,7 +1194,7 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP
*/ */
static DWORD MIDI_mciPause(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) static DWORD MIDI_mciPause(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
{ {
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (wmm->dwStatus == MCI_MODE_PLAY) { if (wmm->dwStatus == MCI_MODE_PLAY) {
/* stop all notes */ /* stop all notes */
...@@ -1213,7 +1213,7 @@ static DWORD MIDI_mciPause(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS ...@@ -1213,7 +1213,7 @@ static DWORD MIDI_mciPause(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS
*/ */
static DWORD MIDI_mciResume(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) static DWORD MIDI_mciResume(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
{ {
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (wmm->dwStatus == MCI_MODE_PAUSE) { if (wmm->dwStatus == MCI_MODE_PAUSE) {
wmm->wStartedPlaying = FALSE; wmm->wStartedPlaying = FALSE;
...@@ -1229,7 +1229,7 @@ static DWORD MIDI_mciResume(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARM ...@@ -1229,7 +1229,7 @@ static DWORD MIDI_mciResume(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_GENERIC_PARM
*/ */
static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS lpParms) static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS lpParms)
{ {
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
...@@ -1252,7 +1252,7 @@ static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS l ...@@ -1252,7 +1252,7 @@ static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS l
wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30; wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30;
break; break;
default: default:
WARN("Bad time format %u!\n", lpParms->dwTimeFormat); WARN("Bad time format %lu!\n", lpParms->dwTimeFormat);
return MCIERR_BAD_TIME_FORMAT; return MCIERR_BAD_TIME_FORMAT;
} }
} }
...@@ -1283,7 +1283,7 @@ static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS l ...@@ -1283,7 +1283,7 @@ static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS l
case MCI_SET_AUDIO_ALL: TRACE("MCI_SET_AUDIO_ALL !\n"); break; case MCI_SET_AUDIO_ALL: TRACE("MCI_SET_AUDIO_ALL !\n"); break;
case MCI_SET_AUDIO_LEFT: TRACE("MCI_SET_AUDIO_LEFT !\n"); break; case MCI_SET_AUDIO_LEFT: TRACE("MCI_SET_AUDIO_LEFT !\n"); break;
case MCI_SET_AUDIO_RIGHT: TRACE("MCI_SET_AUDIO_RIGHT !\n"); break; case MCI_SET_AUDIO_RIGHT: TRACE("MCI_SET_AUDIO_RIGHT !\n"); break;
default: WARN("Unknown audio channel %u\n", lpParms->dwAudio); break; default: WARN("Unknown audio channel %lu\n", lpParms->dwAudio); break;
} }
} }
...@@ -1294,7 +1294,7 @@ static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS l ...@@ -1294,7 +1294,7 @@ static DWORD MIDI_mciSet(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEQ_SET_PARMS l
if (dwFlags & MCI_SEQ_SET_OFFSET) if (dwFlags & MCI_SEQ_SET_OFFSET)
TRACE("MCI_SEQ_SET_OFFSET !\n"); TRACE("MCI_SEQ_SET_OFFSET !\n");
if (dwFlags & MCI_SEQ_SET_PORT) { if (dwFlags & MCI_SEQ_SET_PORT) {
TRACE("MCI_SEQ_SET_PORT = %d\n", lpParms->dwPort); TRACE("MCI_SEQ_SET_PORT = %ld\n", lpParms->dwPort);
if ((UINT16)lpParms->dwPort != (UINT16)MIDI_MAPPER && if ((UINT16)lpParms->dwPort != (UINT16)MIDI_MAPPER &&
(UINT16)lpParms->dwPort >= midiOutGetNumDevs()) (UINT16)lpParms->dwPort >= midiOutGetNumDevs())
/* FIXME: input/output port distinction? */ /* FIXME: input/output port distinction? */
...@@ -1316,7 +1316,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS ...@@ -1316,7 +1316,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
{ {
DWORD ret = 0; DWORD ret = 0;
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
...@@ -1325,7 +1325,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS ...@@ -1325,7 +1325,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
case MCI_STATUS_CURRENT_TRACK: case MCI_STATUS_CURRENT_TRACK:
/* FIXME in Format 2 */ /* FIXME in Format 2 */
lpParms->dwReturn = 1; lpParms->dwReturn = 1;
TRACE("MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->dwReturn); TRACE("MCI_STATUS_CURRENT_TRACK => %Iu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_LENGTH: case MCI_STATUS_LENGTH:
if ((dwFlags & MCI_TRACK) && wmm->wFormat == 2) { if ((dwFlags & MCI_TRACK) && wmm->wFormat == 2) {
...@@ -1338,7 +1338,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS ...@@ -1338,7 +1338,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
} }
lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn); lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn);
/* FIXME: ret = MCI_COLONIZED4_RETURN if SMPTE */ /* FIXME: ret = MCI_COLONIZED4_RETURN if SMPTE */
TRACE("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn); TRACE("MCI_STATUS_LENGTH => %Iu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_MODE: case MCI_STATUS_MODE:
TRACE("MCI_STATUS_MODE => %u\n", wmm->dwStatus); TRACE("MCI_STATUS_MODE => %u\n", wmm->dwStatus);
...@@ -1352,14 +1352,14 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS ...@@ -1352,14 +1352,14 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
break; break;
case MCI_STATUS_NUMBER_OF_TRACKS: case MCI_STATUS_NUMBER_OF_TRACKS:
lpParms->dwReturn = (wmm->wFormat == 2) ? wmm->nTracks : 1; lpParms->dwReturn = (wmm->wFormat == 2) ? wmm->nTracks : 1;
TRACE("MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->dwReturn); TRACE("MCI_STATUS_NUMBER_OF_TRACKS => %Iu\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_POSITION: case MCI_STATUS_POSITION:
/* FIXME: check MCI_TRACK == 1 if set */ /* FIXME: check MCI_TRACK == 1 if set */
lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm,
(dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS); (dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS);
/* FIXME: ret = MCI_COLONIZED4_RETURN if SMPTE */ /* FIXME: ret = MCI_COLONIZED4_RETURN if SMPTE */
TRACE("MCI_STATUS_POSITION %s => %lu\n", TRACE("MCI_STATUS_POSITION %s => %Iu\n",
(dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn); (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
break; break;
case MCI_STATUS_READY: case MCI_STATUS_READY:
...@@ -1417,7 +1417,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS ...@@ -1417,7 +1417,7 @@ static DWORD MIDI_mciStatus(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_STATUS_PARMS
lpParms->dwReturn = wmm->dwTempo; lpParms->dwReturn = wmm->dwTempo;
break; break;
default: default:
FIXME("Unknown command %08X !\n", lpParms->dwItem); FIXME("Unknown command %08lX !\n", lpParms->dwItem);
return MCIERR_UNSUPPORTED_FUNCTION; return MCIERR_UNSUPPORTED_FUNCTION;
} }
} else { } else {
...@@ -1436,7 +1436,7 @@ static DWORD MIDI_mciGetDevCaps(WINE_MCIMIDI* wmm, DWORD dwFlags, ...@@ -1436,7 +1436,7 @@ static DWORD MIDI_mciGetDevCaps(WINE_MCIMIDI* wmm, DWORD dwFlags,
{ {
DWORD ret; DWORD ret;
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
...@@ -1488,7 +1488,7 @@ static DWORD MIDI_mciGetDevCaps(WINE_MCIMIDI* wmm, DWORD dwFlags, ...@@ -1488,7 +1488,7 @@ static DWORD MIDI_mciGetDevCaps(WINE_MCIMIDI* wmm, DWORD dwFlags,
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;
default: default:
FIXME("Unknown capability (%08x) !\n", lpParms->dwItem); FIXME("Unknown capability (%08lx) !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
...@@ -1508,12 +1508,12 @@ static DWORD MIDI_mciInfo(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_INFO_PARMSW lp ...@@ -1508,12 +1508,12 @@ static DWORD MIDI_mciInfo(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_INFO_PARMSW lp
LPCWSTR str = 0; LPCWSTR str = 0;
DWORD ret = 0; DWORD ret = 0;
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (lpParms == NULL || lpParms->lpstrReturn == NULL) if (lpParms == NULL || lpParms->lpstrReturn == NULL)
return MCIERR_NULL_PARAMETER_BLOCK; return MCIERR_NULL_PARAMETER_BLOCK;
TRACE("buf=%p, len=%u\n", lpParms->lpstrReturn, lpParms->dwRetSize); TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) { switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) {
case MCI_INFO_PRODUCT: str = L"Wine's MIDI sequencer"; break; case MCI_INFO_PRODUCT: str = L"Wine's MIDI sequencer"; break;
...@@ -1521,7 +1521,7 @@ static DWORD MIDI_mciInfo(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_INFO_PARMSW lp ...@@ -1521,7 +1521,7 @@ static DWORD MIDI_mciInfo(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_INFO_PARMSW lp
case MCI_INFO_COPYRIGHT: str = wmm->lpstrCopyright; break; case MCI_INFO_COPYRIGHT: str = wmm->lpstrCopyright; break;
case MCI_INFO_NAME: str = wmm->lpstrName; break; case MCI_INFO_NAME: str = wmm->lpstrName; break;
default: default:
WARN("Don't know this info command (%u)\n", dwFlags); WARN("Don't know this info command (%lu)\n", dwFlags);
return MCIERR_MISSING_PARAMETER; /* not MCIERR_FLAGS_... */ return MCIERR_MISSING_PARAMETER; /* not MCIERR_FLAGS_... */
} }
if (!ret) { if (!ret) {
...@@ -1543,7 +1543,7 @@ static DWORD MIDI_mciSeek(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEEK_PARMS lpP ...@@ -1543,7 +1543,7 @@ static DWORD MIDI_mciSeek(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEEK_PARMS lpP
{ {
DWORD position; DWORD position;
TRACE("(%d, %08X, %p);\n", wmm->wDevID, dwFlags, lpParms); TRACE("(%d, %08lX, %p);\n", wmm->wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
...@@ -1561,7 +1561,7 @@ static DWORD MIDI_mciSeek(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEEK_PARMS lpP ...@@ -1561,7 +1561,7 @@ static DWORD MIDI_mciSeek(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEEK_PARMS lpP
wmm->dwPositionMS = 0xFFFFFFFF; /* FIXME */ wmm->dwPositionMS = 0xFFFFFFFF; /* FIXME */
} }
TRACE("Seeking to position=%u ms\n", wmm->dwPositionMS); TRACE("Seeking to position=%lu ms\n", wmm->dwPositionMS);
if (dwFlags & MCI_NOTIFY) if (dwFlags & MCI_NOTIFY)
MIDI_mciNotify(lpParms->dwCallback, wmm, MCI_NOTIFY_SUCCESSFUL); MIDI_mciNotify(lpParms->dwCallback, wmm, MCI_NOTIFY_SUCCESSFUL);
......
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