dmband: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2022-02-08 23:14:51 +01:00 committed by Alexandre Julliard
parent f586cfa52d
commit 0990abd7b9
5 changed files with 60 additions and 61 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dmband.dll MODULE = dmband.dll
IMPORTS = dxguid uuid ole32 advapi32 IMPORTS = dxguid uuid ole32 advapi32

View File

@ -69,7 +69,7 @@ static ULONG WINAPI IDirectMusicBandImpl_AddRef(IDirectMusicBand *iface)
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface); IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -79,7 +79,7 @@ static ULONG WINAPI IDirectMusicBandImpl_Release(IDirectMusicBand *iface)
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface); IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref) { if (!ref) {
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -213,30 +213,30 @@ static HRESULT parse_instrument(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_INSTRUMENT_CHUNK: { case DMUS_FOURCC_INSTRUMENT_CHUNK: {
TRACE_(dmfile)(": Instrument chunk\n"); TRACE_(dmfile)(": Instrument chunk\n");
if (Chunk.dwSize != sizeof(DMUS_IO_INSTRUMENT) && Chunk.dwSize != DMUS_IO_INSTRUMENT_DX7_SIZE) { if (Chunk.dwSize != sizeof(DMUS_IO_INSTRUMENT) && Chunk.dwSize != DMUS_IO_INSTRUMENT_DX7_SIZE) {
ERR_(dmfile)("unexpected size %d\n", Chunk.dwSize); ERR_(dmfile)("unexpected size %ld\n", Chunk.dwSize);
return E_FAIL; return E_FAIL;
} }
IStream_Read (pStm, &inst, Chunk.dwSize, NULL); IStream_Read (pStm, &inst, Chunk.dwSize, NULL);
if (Chunk.dwSize != sizeof(DMUS_IO_INSTRUMENT)) if (Chunk.dwSize != sizeof(DMUS_IO_INSTRUMENT))
inst.nPitchBendRange = 0; inst.nPitchBendRange = 0;
TRACE_(dmfile)(" - dwPatch: %u\n", inst.dwPatch); TRACE_(dmfile)(" - dwPatch: %lu\n", inst.dwPatch);
TRACE_(dmfile)(" - dwAssignPatch: %u\n", inst.dwAssignPatch); TRACE_(dmfile)(" - dwAssignPatch: %lu\n", inst.dwAssignPatch);
TRACE_(dmfile)(" - dwNoteRanges[0]: %u\n", inst.dwNoteRanges[0]); TRACE_(dmfile)(" - dwNoteRanges[0]: %lu\n", inst.dwNoteRanges[0]);
TRACE_(dmfile)(" - dwNoteRanges[1]: %u\n", inst.dwNoteRanges[1]); TRACE_(dmfile)(" - dwNoteRanges[1]: %lu\n", inst.dwNoteRanges[1]);
TRACE_(dmfile)(" - dwNoteRanges[2]: %u\n", inst.dwNoteRanges[2]); TRACE_(dmfile)(" - dwNoteRanges[2]: %lu\n", inst.dwNoteRanges[2]);
TRACE_(dmfile)(" - dwNoteRanges[3]: %u\n", inst.dwNoteRanges[3]); TRACE_(dmfile)(" - dwNoteRanges[3]: %lu\n", inst.dwNoteRanges[3]);
TRACE_(dmfile)(" - dwPChannel: %u\n", inst.dwPChannel); TRACE_(dmfile)(" - dwPChannel: %lu\n", inst.dwPChannel);
TRACE_(dmfile)(" - dwFlags: %x\n", inst.dwFlags); TRACE_(dmfile)(" - dwFlags: %lx\n", inst.dwFlags);
TRACE_(dmfile)(" - bPan: %u\n", inst.bPan); TRACE_(dmfile)(" - bPan: %u\n", inst.bPan);
TRACE_(dmfile)(" - bVolume: %u\n", inst.bVolume); TRACE_(dmfile)(" - bVolume: %u\n", inst.bVolume);
TRACE_(dmfile)(" - nTranspose: %d\n", inst.nTranspose); TRACE_(dmfile)(" - nTranspose: %d\n", inst.nTranspose);
TRACE_(dmfile)(" - dwChannelPriority: %u\n", inst.dwChannelPriority); TRACE_(dmfile)(" - dwChannelPriority: %lu\n", inst.dwChannelPriority);
TRACE_(dmfile)(" - nPitchBendRange: %d\n", inst.nPitchBendRange); TRACE_(dmfile)(" - nPitchBendRange: %d\n", inst.nPitchBendRange);
break; break;
} }
@ -272,7 +272,7 @@ static HRESULT parse_instrument(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
/* /*
@ -321,7 +321,7 @@ static HRESULT parse_instruments_list(IDirectMusicBandImpl *This, DMUS_PRIVATE_C
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_LIST: { case FOURCC_LIST: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
@ -351,7 +351,7 @@ static HRESULT parse_instruments_list(IDirectMusicBandImpl *This, DMUS_PRIVATE_C
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
return S_OK; return S_OK;
@ -378,7 +378,7 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &This->dmobj.desc); hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &This->dmobj.desc);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
@ -402,7 +402,7 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &This->dmobj.desc); hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &This->dmobj.desc);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
@ -417,7 +417,7 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
} }
} }
} }
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
break; break;
} }
@ -444,7 +444,7 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
} }
} }
} }
TRACE_(dmfile)(": StreamCount[0] = %d < StreamSize[0] = %d\n", StreamCount, StreamSize); TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize);
} while (StreamCount < StreamSize); } while (StreamCount < StreamSize);
return S_OK; return S_OK;
@ -465,11 +465,11 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
TRACE("(%p,%p): loading\n", This, pStm); TRACE("(%p,%p): loading\n", This, pStm);
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_RIFF: { case FOURCC_RIFF: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_BAND_FORM: { case DMUS_FOURCC_BAND_FORM: {
TRACE_(dmfile)(": Band form\n"); TRACE_(dmfile)(": Band form\n");

View File

@ -68,7 +68,7 @@ static ULONG WINAPI band_track_AddRef(IDirectMusicTrack8 *iface)
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -78,7 +78,7 @@ static ULONG WINAPI band_track_Release(IDirectMusicTrack8 *iface)
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref) { if (!ref) {
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
@ -101,7 +101,7 @@ static HRESULT WINAPI band_track_InitPlay(IDirectMusicTrack8 *iface,
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %p, %p, %p, %d, %x): stub\n", This, segment_state, performance, state_data, virtual_track8id, flags); FIXME("(%p, %p, %p, %p, %ld, %lx): stub\n", This, segment_state, performance, state_data, virtual_track8id, flags);
return S_OK; return S_OK;
} }
@ -120,7 +120,7 @@ static HRESULT WINAPI band_track_Play(IDirectMusicTrack8 *iface, void *state_dat
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %p, %d, %d, %d, %x, %p, %p, %d): semi-stub\n", This, state_data, mtStart, mtEnd, mtOffset, flags, performance, segment_state, virtual_id); FIXME("(%p, %p, %ld, %ld, %ld, %lx, %p, %p, %ld): semi-stub\n", This, state_data, mtStart, mtEnd, mtOffset, flags, performance, segment_state, virtual_id);
/* Sends following pMSG: /* Sends following pMSG:
- DMUS_PATCH_PMSG - DMUS_PATCH_PMSG
@ -137,7 +137,7 @@ static HRESULT WINAPI band_track_GetParam(IDirectMusicTrack8 *iface, REFGUID typ
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p, %p)\n", This, debugstr_dmguid(type), time, next, param); TRACE("(%p, %s, %ld, %p, %p)\n", This, debugstr_dmguid(type), time, next, param);
if (!type) if (!type)
return E_POINTER; return E_POINTER;
@ -154,7 +154,7 @@ static HRESULT WINAPI band_track_SetParam(IDirectMusicTrack8 *iface, REFGUID typ
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p)\n", This, debugstr_dmguid(type), time, param); TRACE("(%p, %s, %ld, %p)\n", This, debugstr_dmguid(type), time, param);
if (!type) if (!type)
return E_POINTER; return E_POINTER;
@ -234,7 +234,7 @@ static HRESULT WINAPI band_track_Clone(IDirectMusicTrack8 *iface, MUSIC_TIME mtS
MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack) MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack)
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %d, %d, %p): stub\n", This, mtStart, mtEnd, ppTrack); FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppTrack);
return S_OK; return S_OK;
} }
@ -245,7 +245,7 @@ static HRESULT WINAPI band_track_PlayEx(IDirectMusicTrack8 *iface, void *state_d
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %p, 0x%s, 0x%s, 0x%s, %x, %p, %p, %d): stub\n", This, state_data, wine_dbgstr_longlong(rtStart), FIXME("(%p, %p, 0x%s, 0x%s, 0x%s, %lx, %p, %p, %ld): stub\n", This, state_data, wine_dbgstr_longlong(rtStart),
wine_dbgstr_longlong(rtEnd), wine_dbgstr_longlong(rtOffset), flags, performance, segment_state, virtual_id); wine_dbgstr_longlong(rtEnd), wine_dbgstr_longlong(rtOffset), flags, performance, segment_state, virtual_id);
return S_OK; return S_OK;
@ -257,7 +257,7 @@ static HRESULT WINAPI band_track_GetParamEx(IDirectMusicTrack8 *iface,
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, 0x%s, %p, %p, %p, %x): stub\n", This, debugstr_dmguid(rguidType), FIXME("(%p, %s, 0x%s, %p, %p, %p, %lx): stub\n", This, debugstr_dmguid(rguidType),
wine_dbgstr_longlong(rtTime), rtNext, param, state_data, flags); wine_dbgstr_longlong(rtTime), rtNext, param, state_data, flags);
return S_OK; return S_OK;
@ -268,7 +268,7 @@ static HRESULT WINAPI band_track_SetParamEx(IDirectMusicTrack8 *iface, REFGUID r
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, 0x%s, %p, %p, %x): stub\n", This, debugstr_dmguid(rguidType), FIXME("(%p, %s, 0x%s, %p, %p, %lx): stub\n", This, debugstr_dmguid(rguidType),
wine_dbgstr_longlong(rtTime), param, state_data, flags); wine_dbgstr_longlong(rtTime), param, state_data, flags);
return S_OK; return S_OK;
@ -279,7 +279,7 @@ static HRESULT WINAPI band_track_Compose(IDirectMusicTrack8 *iface, IUnknown *co
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %p, %d, %p): method not implemented\n", This, context, trackgroup, track); TRACE("(%p, %p, %ld, %p): method not implemented\n", This, context, trackgroup, track);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -288,7 +288,7 @@ static HRESULT WINAPI band_track_Join(IDirectMusicTrack8 *iface, IDirectMusicTra
IDirectMusicTrack **ppResultTrack) IDirectMusicTrack **ppResultTrack)
{ {
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface); IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %p, %d, %p, %d, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack); FIXME("(%p, %p, %ld, %p, %ld, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack);
return S_OK; return S_OK;
} }
@ -383,7 +383,7 @@ static HRESULT parse_bands_list(IDirectMusicBandTrack *This, DMUS_PRIVATE_CHUNK
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_LIST: { case FOURCC_LIST: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
@ -393,14 +393,14 @@ static HRESULT parse_bands_list(IDirectMusicBandTrack *This, DMUS_PRIVATE_CHUNK
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_BANDITEM_CHUNK: { case DMUS_FOURCC_BANDITEM_CHUNK: {
DMUS_IO_BAND_ITEM_HEADER tmp_header; DMUS_IO_BAND_ITEM_HEADER tmp_header;
TRACE_(dmfile)(": Band Item chunk v1\n"); TRACE_(dmfile)(": Band Item chunk v1\n");
IStream_Read (pStm, &tmp_header, sizeof(DMUS_IO_BAND_ITEM_HEADER), NULL); IStream_Read (pStm, &tmp_header, sizeof(DMUS_IO_BAND_ITEM_HEADER), NULL);
TRACE_(dmfile)(" - lBandTime: %u\n", tmp_header.lBandTime); TRACE_(dmfile)(" - lBandTime: %lu\n", tmp_header.lBandTime);
header.dwVersion = 1; header.dwVersion = 1;
header.lBandTime = tmp_header.lBandTime; header.lBandTime = tmp_header.lBandTime;
@ -411,8 +411,8 @@ static HRESULT parse_bands_list(IDirectMusicBandTrack *This, DMUS_PRIVATE_CHUNK
TRACE_(dmfile)(": Band Item chunk v2\n"); TRACE_(dmfile)(": Band Item chunk v2\n");
IStream_Read (pStm, &tmp_header2, sizeof(DMUS_IO_BAND_ITEM_HEADER2), NULL); IStream_Read (pStm, &tmp_header2, sizeof(DMUS_IO_BAND_ITEM_HEADER2), NULL);
TRACE_(dmfile)(" - lBandTimeLogical: %u\n", tmp_header2.lBandTimeLogical); TRACE_(dmfile)(" - lBandTimeLogical: %lu\n", tmp_header2.lBandTimeLogical);
TRACE_(dmfile)(" - lBandTimePhysical: %u\n", tmp_header2.lBandTimePhysical); TRACE_(dmfile)(" - lBandTimePhysical: %lu\n", tmp_header2.lBandTimePhysical);
header.dwVersion = 2; header.dwVersion = 2;
header.lBandTimeLogical = tmp_header2.lBandTimeLogical; header.lBandTimeLogical = tmp_header2.lBandTimeLogical;
@ -465,7 +465,7 @@ static HRESULT parse_bands_list(IDirectMusicBandTrack *This, DMUS_PRIVATE_CHUNK
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[1] = %d < ListSize[1] = %d\n", ListCount[1], ListSize[1]); TRACE_(dmfile)(": ListCount[1] = %ld < ListSize[1] = %ld\n", ListCount[1], ListSize[1]);
} while (ListCount[1] < ListSize[1]); } while (ListCount[1] < ListSize[1]);
break; break;
} }
@ -476,7 +476,7 @@ static HRESULT parse_bands_list(IDirectMusicBandTrack *This, DMUS_PRIVATE_CHUNK
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
return S_OK; return S_OK;
@ -501,7 +501,7 @@ static HRESULT parse_bandtrack_form(IDirectMusicBandTrack *This, DMUS_PRIVATE_CH
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &This->dmobj.desc); hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &This->dmobj.desc);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
@ -525,7 +525,7 @@ static HRESULT parse_bandtrack_form(IDirectMusicBandTrack *This, DMUS_PRIVATE_CH
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &This->dmobj.desc); hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &This->dmobj.desc);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
@ -540,7 +540,7 @@ static HRESULT parse_bandtrack_form(IDirectMusicBandTrack *This, DMUS_PRIVATE_CH
} }
} }
} }
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
break; break;
} }
@ -567,7 +567,7 @@ static HRESULT parse_bandtrack_form(IDirectMusicBandTrack *This, DMUS_PRIVATE_CH
} }
} }
} }
TRACE_(dmfile)(": StreamCount[0] = %d < StreamSize[0] = %d\n", StreamCount, StreamSize); TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize);
} while (StreamCount < StreamSize); } while (StreamCount < StreamSize);
return S_OK; return S_OK;
@ -588,11 +588,11 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
TRACE("(%p, %p): Loading\n", This, pStm); TRACE("(%p, %p): Loading\n", This, pStm);
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case FOURCC_RIFF: { case FOURCC_RIFF: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_BANDTRACK_FORM: { case DMUS_FOURCC_BANDTRACK_FORM: {
TRACE_(dmfile)(": Band track form\n"); TRACE_(dmfile)(": Band track form\n");

View File

@ -226,10 +226,10 @@ void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc)
return; return;
TRACE_(dmfile)("DMUS_OBJECTDESC (%p):", desc); TRACE_(dmfile)("DMUS_OBJECTDESC (%p):", desc);
TRACE_(dmfile)(" - dwSize = %u\n", desc->dwSize); TRACE_(dmfile)(" - dwSize = %lu\n", desc->dwSize);
#define X(flag) if (desc->dwValidData & flag) TRACE_(dmfile)(#flag " ") #define X(flag) if (desc->dwValidData & flag) TRACE_(dmfile)(#flag " ")
TRACE_(dmfile)(" - dwValidData = %#08x ( ", desc->dwValidData); TRACE_(dmfile)(" - dwValidData = %#08lx ( ", desc->dwValidData);
X(DMUS_OBJ_OBJECT); X(DMUS_OBJ_OBJECT);
X(DMUS_OBJ_CLASS); X(DMUS_OBJ_CLASS);
X(DMUS_OBJ_NAME); X(DMUS_OBJ_NAME);
@ -285,7 +285,7 @@ const char *debugstr_chunk(const struct chunk_entry *chunk)
return "(null)"; return "(null)";
if (chunk->id == FOURCC_RIFF || chunk->id == FOURCC_LIST) if (chunk->id == FOURCC_RIFF || chunk->id == FOURCC_LIST)
type = wine_dbg_sprintf("type %s, ", debugstr_fourcc(chunk->type)); type = wine_dbg_sprintf("type %s, ", debugstr_fourcc(chunk->type));
return wine_dbg_sprintf("%s chunk, %ssize %u", debugstr_fourcc(chunk->id), type, chunk->size); return wine_dbg_sprintf("%s chunk, %ssize %lu", debugstr_fourcc(chunk->id), type, chunk->size);
} }
static HRESULT stream_read(IStream *stream, void *data, ULONG size) static HRESULT stream_read(IStream *stream, void *data, ULONG size)
@ -295,10 +295,10 @@ static HRESULT stream_read(IStream *stream, void *data, ULONG size)
hr = IStream_Read(stream, data, size, &read); hr = IStream_Read(stream, data, size, &read);
if (FAILED(hr)) if (FAILED(hr))
TRACE_(dmfile)("IStream_Read failed: %08x\n", hr); TRACE_(dmfile)("IStream_Read failed: %#lx\n", hr);
else if (!read && read < size) { else if (!read && read < size) {
/* All or nothing: Handle a partial read due to end of stream as an error */ /* All or nothing: Handle a partial read due to end of stream as an error */
TRACE_(dmfile)("Short read: %u < %u\n", read, size); TRACE_(dmfile)("Short read: %lu < %lu\n", read, size);
return E_FAIL; return E_FAIL;
} }
@ -393,7 +393,7 @@ HRESULT stream_chunk_get_array(IStream *stream, const struct chunk_entry *chunk,
if (FAILED(hr = stream_read(stream, &size, sizeof(DWORD)))) if (FAILED(hr = stream_read(stream, &size, sizeof(DWORD))))
return hr; return hr;
if (size != elem_size) { if (size != elem_size) {
WARN_(dmfile)("%s: Array element size mismatch: got %u, expected %u\n", WARN_(dmfile)("%s: Array element size mismatch: got %lu, expected %lu\n",
debugstr_chunk(chunk), size, elem_size); debugstr_chunk(chunk), size, elem_size);
return DMUS_E_UNSUPPORTED_STREAM; return DMUS_E_UNSUPPORTED_STREAM;
} }
@ -420,7 +420,7 @@ HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk,
ULONG size) ULONG size)
{ {
if (chunk->size != size) { if (chunk->size != size) {
WARN_(dmfile)("Chunk %s (size %u, offset %s) doesn't contains the expected data size %u\n", WARN_(dmfile)("Chunk %s (size %lu, offset %s) doesn't contains the expected data size %lu\n",
debugstr_fourcc(chunk->id), chunk->size, debugstr_fourcc(chunk->id), chunk->size,
wine_dbgstr_longlong(chunk->offset.QuadPart), size); wine_dbgstr_longlong(chunk->offset.QuadPart), size);
return E_FAIL; return E_FAIL;
@ -567,7 +567,7 @@ HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff,
struct chunk_entry chunk = {.parent = riff}; struct chunk_entry chunk = {.parent = riff};
HRESULT hr; HRESULT hr;
TRACE("Looking for %#x in %p: %s\n", supported, stream, debugstr_chunk(riff)); TRACE("Looking for %#lx in %p: %s\n", supported, stream, debugstr_chunk(riff));
desc->dwValidData = 0; desc->dwValidData = 0;
desc->dwSize = sizeof(*desc); desc->dwSize = sizeof(*desc);
@ -612,7 +612,7 @@ HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff,
break; break;
} }
} }
TRACE("Found %#x\n", desc->dwValidData); TRACE("Found %#lx\n", desc->dwValidData);
return hr; return hr;
} }
@ -636,7 +636,7 @@ HRESULT dmobj_parsereference(IStream *stream, const struct chunk_entry *list,
WARN("Failed to read data of %s\n", debugstr_chunk(&chunk)); WARN("Failed to read data of %s\n", debugstr_chunk(&chunk));
return hr; return hr;
} }
TRACE("REFERENCE guidClassID %s, dwValidData %#x\n", debugstr_dmguid(&reference.guidClassID), TRACE("REFERENCE guidClassID %s, dwValidData %#lx\n", debugstr_dmguid(&reference.guidClassID),
reference.dwValidData); reference.dwValidData);
if (FAILED(hr = dmobj_parsedescriptor(stream, list, &desc, reference.dwValidData))) if (FAILED(hr = dmobj_parsedescriptor(stream, list, &desc, reference.dwValidData)))

View File

@ -169,7 +169,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &ref_desc); hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &ref_desc);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
@ -181,7 +181,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
if (Chunk.dwSize != sizeof(DMUS_IO_REFERENCE)) return E_FAIL; if (Chunk.dwSize != sizeof(DMUS_IO_REFERENCE)) return E_FAIL;
IStream_Read (pStm, &ref, sizeof(DMUS_IO_REFERENCE), NULL); IStream_Read (pStm, &ref, sizeof(DMUS_IO_REFERENCE), NULL);
TRACE(" - guidClassID: %s\n", debugstr_dmguid(&ref.guidClassID)); TRACE(" - guidClassID: %s\n", debugstr_dmguid(&ref.guidClassID));
TRACE(" - dwValidData: %u\n", ref.dwValidData); TRACE(" - dwValidData: %lu\n", ref.dwValidData);
break; break;
} }
default: { default: {
@ -192,7 +192,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
} }
} }
} }
TRACE(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
ref_desc.dwValidData |= DMUS_OBJ_CLASS; ref_desc.dwValidData |= DMUS_OBJ_CLASS;