Commit 97df92d3 authored by Michael Ploujnikov's avatar Michael Ploujnikov Committed by Alexandre Julliard

mciseq: Win64 printf format warning fixes.

parent 1f2219d5
...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@ ...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = mciseq.dll MODULE = mciseq.dll
IMPORTS = winmm user32 kernel32 IMPORTS = winmm user32 kernel32
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \ C_SRCS = \
mcimidi.c mcimidi.c
......
...@@ -107,10 +107,10 @@ static DWORD CALLBACK MCI_SCAStarter(LPVOID arg) ...@@ -107,10 +107,10 @@ static DWORD CALLBACK MCI_SCAStarter(LPVOID arg)
struct SCA* sca = (struct SCA*)arg; struct SCA* sca = (struct SCA*)arg;
DWORD ret; DWORD ret;
TRACE("In thread before async command (%08x,%u,%08lx,%08lx)\n", TRACE("In thread before async command (%08x,%u,%08x,%08x)\n",
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2); sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
ret = mciSendCommandA(sca->wDevID, sca->wMsg, sca->dwParam1 | MCI_WAIT, sca->dwParam2); ret = mciSendCommandA(sca->wDevID, sca->wMsg, sca->dwParam1 | MCI_WAIT, sca->dwParam2);
TRACE("In thread after async command (%08x,%u,%08lx,%08lx)\n", TRACE("In thread after async command (%08x,%u,%08x,%08x)\n",
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2); sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
HeapFree(GetProcessHeap(), 0, sca); HeapFree(GetProcessHeap(), 0, sca);
ExitThread(ret); ExitThread(ret);
...@@ -281,7 +281,7 @@ static WORD MIDI_mciReadVaryLen(WINE_MCIMIDI* wmm, LPDWORD lpdw) ...@@ -281,7 +281,7 @@ static WORD MIDI_mciReadVaryLen(WINE_MCIMIDI* wmm, LPDWORD lpdw)
} while (byte & 0x80); } while (byte & 0x80);
*lpdw = value; *lpdw = value;
/* /*
TRACE("val=%08lX\n", value); TRACE("val=%08X\n", value);
*/ */
} }
return ret; return ret;
...@@ -299,7 +299,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -299,7 +299,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 %08lX\n", mmt->dwIndex); WARN("Can't seek at %08X\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 */
...@@ -351,7 +351,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -351,7 +351,7 @@ static DWORD MIDI_mciReadNextEvent(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
mmt->wEventLength = evtLength; mmt->wEventLength = evtLength;
/* /*
TRACE("[%u] => pulse=%08lx(%08lx), data=%08lx, length=%u\n", TRACE("[%u] => pulse=%08x(%08x), data=%08x, length=%u\n",
mmt->wTrackNr, mmt->dwEventPulse, evtPulse, mmt->wTrackNr, mmt->dwEventPulse, evtPulse,
mmt->dwEventData, mmt->wEventLength); mmt->dwEventData, mmt->wEventLength);
*/ */
...@@ -431,7 +431,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -431,7 +431,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
} }
mmt->dwLength = mmt->dwEventPulse; mmt->dwLength = mmt->dwEventPulse;
TRACE("Track %u has %lu bytes and %lu pulses\n", mmt->wTrackNr, toberead, mmt->dwLength); TRACE("Track %u has %u bytes and %u pulses\n", mmt->wTrackNr, toberead, mmt->dwLength);
/* reset track data */ /* reset track data */
mmt->wStatus = 1; /* ok, playing */ mmt->wStatus = 1; /* ok, playing */
...@@ -439,7 +439,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) ...@@ -439,7 +439,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=%lu track=%lu\n", WARN("Ouch, out of sync seek=%u track=%u\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);
...@@ -457,10 +457,10 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset) ...@@ -457,10 +457,10 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
FOURCC fourcc; FOURCC fourcc;
WORD nt; WORD nt;
TRACE("(%p, %08lX);\n", wmm, dwOffset); TRACE("(%p, %08X);\n", wmm, dwOffset);
if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) { if (mmioSeek(wmm->hFile, dwOffset, SEEK_SET) != dwOffset) {
WARN("Can't seek at %08lX begin of 'MThd'\n", dwOffset); WARN("Can't seek at %08X begin of 'MThd'\n", dwOffset);
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
if (mmioRead(wmm->hFile, (HPSTR)&fourcc, if (mmioRead(wmm->hFile, (HPSTR)&fourcc,
...@@ -481,7 +481,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset) ...@@ -481,7 +481,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
return MCIERR_INVALID_FILE; return MCIERR_INVALID_FILE;
} }
TRACE("toberead=0x%08lX, wFormat=0x%04X nTracks=0x%04X nDivision=0x%04X\n", TRACE("toberead=0x%08X, 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
...@@ -551,7 +551,7 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset) ...@@ -551,7 +551,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 %ld extra bytes\n", toberead); TRACE("Size of MThd > 6, skipping %d extra bytes\n", toberead);
mmioSeek(wmm->hFile, toberead, SEEK_CUR); mmioSeek(wmm->hFile, toberead, SEEK_CUR);
} }
...@@ -590,7 +590,7 @@ static DWORD MIDI_ConvertPulseToMS(WINE_MCIMIDI* wmm, DWORD pulse) ...@@ -590,7 +590,7 @@ static DWORD MIDI_ConvertPulseToMS(WINE_MCIMIDI* wmm, DWORD pulse)
} }
/* /*
TRACE("pulse=%lu tempo=%lu division=%u=0x%04x => ms=%lu\n", TRACE("pulse=%u tempo=%u division=%u=0x%04x => ms=%u\n",
pulse, wmm->dwTempo, wmm->nDivision, wmm->nDivision, ret); pulse, wmm->dwTempo, wmm->nDivision, wmm->nDivision, ret);
*/ */
...@@ -628,10 +628,10 @@ static DWORD MIDI_ConvertTimeFormatToMS(WINE_MCIMIDI* wmm, DWORD val) ...@@ -628,10 +628,10 @@ 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 %lu!\n", wmm->dwMciTimeFormat); WARN("Bad time format %u!\n", wmm->dwMciTimeFormat);
} }
/* /*
TRACE("val=%lu=0x%08lx [tf=%lu] => ret=%lu\n", val, val, wmm->dwMciTimeFormat, ret); TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val, wmm->dwMciTimeFormat, ret);
*/ */
return ret; return ret;
} }
...@@ -676,10 +676,10 @@ static DWORD MIDI_ConvertMSToTimeFormat(WINE_MCIMIDI* wmm, DWORD _val) ...@@ -676,10 +676,10 @@ 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 %lu!\n", wmm->dwMciTimeFormat); WARN("Bad time format %u!\n", wmm->dwMciTimeFormat);
} }
/* /*
TRACE("val=%lu [tf=%lu] => ret=%lu=0x%08lx\n", _val, wmm->dwMciTimeFormat, ret, ret); TRACE("val=%u [tf=%u] => ret=%u=0x%08x\n", _val, wmm->dwMciTimeFormat, ret, ret);
*/ */
return ret; return ret;
} }
...@@ -712,7 +712,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms) ...@@ -712,7 +712,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms)
DWORD dwDeviceID; DWORD dwDeviceID;
WINE_MCIMIDI* wmm = (WINE_MCIMIDI*)mciGetDriverData(wDevID); WINE_MCIMIDI* wmm = (WINE_MCIMIDI*)mciGetDriverData(wDevID);
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpParms); TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -732,7 +732,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms) ...@@ -732,7 +732,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms)
wmm->lpstrElementName = NULL; wmm->lpstrElementName = NULL;
dwDeviceID = lpParms->wDeviceID; dwDeviceID = lpParms->wDeviceID;
TRACE("wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID); TRACE("wDevID=%04X (lpParams->wDeviceID=%08X)\n", wDevID, dwDeviceID);
/* lpParms->wDeviceID = wDevID;*/ /* lpParms->wDeviceID = wDevID;*/
if (dwFlags & MCI_OPEN_ELEMENT) { if (dwFlags & MCI_OPEN_ELEMENT) {
...@@ -768,7 +768,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms) ...@@ -768,7 +768,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms)
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=%08lX\n", TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08X\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')) {
...@@ -812,7 +812,7 @@ static DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm ...@@ -812,7 +812,7 @@ static DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
DWORD dwRet = 0; DWORD dwRet = 0;
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -847,7 +847,7 @@ static DWORD MIDI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar ...@@ -847,7 +847,7 @@ static DWORD MIDI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -915,7 +915,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) ...@@ -915,7 +915,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
DWORD hiPulse; DWORD hiPulse;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -950,7 +950,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) ...@@ -950,7 +950,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
dwEndMS = 0xFFFFFFFFul; dwEndMS = 0xFFFFFFFFul;
} }
TRACE("Playing from %lu to %lu\n", dwStartMS, dwEndMS); TRACE("Playing from %u to %u\n", dwStartMS, dwEndMS);
/* init tracks */ /* init tracks */
for (nt = 0; nt < wmm->nTracks; nt++) { for (nt = 0; nt < wmm->nTracks; nt++) {
...@@ -997,7 +997,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) ...@@ -997,7 +997,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
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 %lu\n", wmm->dwStartTicks); TRACE("Setting dwStartTicks to %u\n", wmm->dwStartTicks);
} }
if (hiPulse > wmm->dwPulse) { if (hiPulse > wmm->dwPulse) {
...@@ -1006,8 +1006,8 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) ...@@ -1006,8 +1006,8 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
DWORD togo = wmm->dwStartTicks + wmm->dwPositionMS; DWORD togo = wmm->dwStartTicks + wmm->dwPositionMS;
DWORD tc = GetTickCount(); DWORD tc = GetTickCount();
TRACE("Pulses hi=0x%08lx <> cur=0x%08lx\n", hiPulse, wmm->dwPulse); TRACE("Pulses hi=0x%08x <> cur=0x%08x\n", hiPulse, wmm->dwPulse);
TRACE("Wait until %lu => %lu ms\n", TRACE("Wait until %u => %u 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);
...@@ -1094,7 +1094,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) ...@@ -1094,7 +1094,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
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 %ld (BPM=%ld)\n", wmm->dwTempo, (value) ? (60000000l / value) : 0); TRACE("Setting tempo to %d (BPM=%d)\n", wmm->dwTempo, (value) ? (60000000 / value) : 0);
wmm->dwTempo = value; wmm->dwTempo = value;
} }
break; break;
...@@ -1102,7 +1102,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) ...@@ -1102,7 +1102,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
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 (%lu)\n", mmt->dwEventPulse); WARN("SMPTE track start can only be expressed at start of track (%u)\n", mmt->dwEventPulse);
} else { } else {
BYTE h, m, s, f, ff; BYTE h, m, s, f, ff;
...@@ -1193,7 +1193,7 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar ...@@ -1193,7 +1193,7 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
DWORD dwRet; DWORD dwRet;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == 0) return MCIERR_INVALID_DEVICE_ID; if (wmm == 0) return MCIERR_INVALID_DEVICE_ID;
...@@ -1225,7 +1225,7 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar ...@@ -1225,7 +1225,7 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
&wmm->dwStatus, wmm->dwStatus); &wmm->dwStatus, wmm->dwStatus);
midiHdr.dwBytesRecorded = 0; midiHdr.dwBytesRecorded = 0;
dwRet = midiInStart((HMIDIIN)wmm->hMidi); dwRet = midiInStart((HMIDIIN)wmm->hMidi);
TRACE("midiInStart => dwBytesRecorded=%lu\n", midiHdr.dwBytesRecorded); TRACE("midiInStart => dwBytesRecorded=%u\n", midiHdr.dwBytesRecorded);
if (midiHdr.dwBytesRecorded == 0) break; if (midiHdr.dwBytesRecorded == 0) break;
} }
TRACE("Before MIDM_UNPREPARE\n"); TRACE("Before MIDM_UNPREPARE\n");
...@@ -1249,7 +1249,7 @@ static DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar ...@@ -1249,7 +1249,7 @@ static DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -1276,7 +1276,7 @@ static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa ...@@ -1276,7 +1276,7 @@ static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -1299,7 +1299,7 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) ...@@ -1299,7 +1299,7 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
{ {
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -1323,7 +1323,7 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) ...@@ -1323,7 +1323,7 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30; wmm->dwMciTimeFormat = MCI_FORMAT_SMPTE_30;
break; break;
default: default:
WARN("Bad time format %lu!\n", lpParms->dwTimeFormat); WARN("Bad time format %u!\n", lpParms->dwTimeFormat);
return MCIERR_BAD_TIME_FORMAT; return MCIERR_BAD_TIME_FORMAT;
} }
} }
...@@ -1354,7 +1354,7 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) ...@@ -1354,7 +1354,7 @@ static DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
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 %lu\n", lpParms->dwAudio); break; default: WARN("Unknown audio channel %u\n", lpParms->dwAudio); break;
} }
} }
...@@ -1379,7 +1379,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar ...@@ -1379,7 +1379,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
DWORD ret = 0; DWORD ret = 0;
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -1389,7 +1389,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar ...@@ -1389,7 +1389,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
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 => %u\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) {
...@@ -1401,7 +1401,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar ...@@ -1401,7 +1401,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
lpParms->dwReturn = MIDI_GetMThdLengthMS(wmm); lpParms->dwReturn = MIDI_GetMThdLengthMS(wmm);
} }
lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn); lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn);
TRACE("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn); TRACE("MCI_STATUS_LENGTH => %u\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);
...@@ -1415,13 +1415,13 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar ...@@ -1415,13 +1415,13 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
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 => %u\n", lpParms->dwReturn);
break; break;
case MCI_STATUS_POSITION: case MCI_STATUS_POSITION:
/* FIXME: do I need to use MCI_TRACK ? */ /* FIXME: do I need to use MCI_TRACK ? */
lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm, lpParms->dwReturn = MIDI_ConvertMSToTimeFormat(wmm,
(dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS); (dwFlags & MCI_STATUS_START) ? 0 : wmm->dwPositionMS);
TRACE("MCI_STATUS_POSITION %s => %lu\n", TRACE("MCI_STATUS_POSITION %s => %u\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:
...@@ -1472,7 +1472,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar ...@@ -1472,7 +1472,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
lpParms->dwReturn = wmm->dwTempo; lpParms->dwReturn = wmm->dwTempo;
break; break;
default: default:
FIXME("Unknowm command %08lX !\n", lpParms->dwItem); FIXME("Unknowm command %08X !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
...@@ -1496,7 +1496,7 @@ static DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, ...@@ -1496,7 +1496,7 @@ static DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
DWORD ret; DWORD ret;
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
...@@ -1549,7 +1549,7 @@ static DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, ...@@ -1549,7 +1549,7 @@ static DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;
default: default:
FIXME("Unknown capability (%08lx) !\n", lpParms->dwItem); FIXME("Unknown capability (%08x) !\n", lpParms->dwItem);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
} else { } else {
...@@ -1569,13 +1569,13 @@ static DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW lpParms) ...@@ -1569,13 +1569,13 @@ static DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW lpParms)
DWORD ret = 0; DWORD ret = 0;
static const WCHAR wszMidiSeq[] = {'W','i','n','e','\'','s',' ','M','I','D','I',' ','s','e','q','u','e','n','c','e','r',0}; static const WCHAR wszMidiSeq[] = {'W','i','n','e','\'','s',' ','M','I','D','I',' ','s','e','q','u','e','n','c','e','r',0};
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", 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;
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize); TRACE("buf=%p, len=%u\n", lpParms->lpstrReturn, lpParms->dwRetSize);
switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) { switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) {
case MCI_INFO_PRODUCT: str = wszMidiSeq; break; case MCI_INFO_PRODUCT: str = wszMidiSeq; break;
...@@ -1583,7 +1583,7 @@ static DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW lpParms) ...@@ -1583,7 +1583,7 @@ static DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW lpParms)
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 (%lu)\n", dwFlags); WARN("Don't know this info command (%u)\n", dwFlags);
return MCIERR_UNRECOGNIZED_COMMAND; return MCIERR_UNRECOGNIZED_COMMAND;
} }
if (str) { if (str) {
...@@ -1607,7 +1607,7 @@ static DWORD MIDI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms) ...@@ -1607,7 +1607,7 @@ static DWORD MIDI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
DWORD ret = 0; DWORD ret = 0;
WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID); WINE_MCIMIDI* wmm = MIDI_mciGetOpenDev(wDevID);
TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpParms);
if (lpParms == NULL) { if (lpParms == NULL) {
ret = MCIERR_NULL_PARAMETER_BLOCK; ret = MCIERR_NULL_PARAMETER_BLOCK;
...@@ -1627,7 +1627,7 @@ static DWORD MIDI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms) ...@@ -1627,7 +1627,7 @@ static DWORD MIDI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
return MCIERR_MISSING_PARAMETER; return MCIERR_MISSING_PARAMETER;
} }
TRACE("Seeking to position=%lu ms\n", wmm->dwPositionMS); TRACE("Seeking to position=%u ms\n", wmm->dwPositionMS);
if (dwFlags & MCI_NOTIFY) { if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
......
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