Commit 0990abd7 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmband: Build without -DWINE_NO_LONG_TYPES.

parent f586cfa5
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dmband.dll
IMPORTS = dxguid uuid ole32 advapi32
......
......@@ -69,7 +69,7 @@ static ULONG WINAPI IDirectMusicBandImpl_AddRef(IDirectMusicBand *iface)
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
}
......@@ -79,7 +79,7 @@ static ULONG WINAPI IDirectMusicBandImpl_Release(IDirectMusicBand *iface)
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
TRACE("(%p) ref=%ld\n", This, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
......@@ -213,30 +213,30 @@ static HRESULT parse_instrument(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *
do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
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) {
case DMUS_FOURCC_INSTRUMENT_CHUNK: {
TRACE_(dmfile)(": Instrument chunk\n");
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;
}
IStream_Read (pStm, &inst, Chunk.dwSize, NULL);
if (Chunk.dwSize != sizeof(DMUS_IO_INSTRUMENT))
inst.nPitchBendRange = 0;
TRACE_(dmfile)(" - dwPatch: %u\n", inst.dwPatch);
TRACE_(dmfile)(" - dwAssignPatch: %u\n", inst.dwAssignPatch);
TRACE_(dmfile)(" - dwNoteRanges[0]: %u\n", inst.dwNoteRanges[0]);
TRACE_(dmfile)(" - dwNoteRanges[1]: %u\n", inst.dwNoteRanges[1]);
TRACE_(dmfile)(" - dwNoteRanges[2]: %u\n", inst.dwNoteRanges[2]);
TRACE_(dmfile)(" - dwNoteRanges[3]: %u\n", inst.dwNoteRanges[3]);
TRACE_(dmfile)(" - dwPChannel: %u\n", inst.dwPChannel);
TRACE_(dmfile)(" - dwFlags: %x\n", inst.dwFlags);
TRACE_(dmfile)(" - dwPatch: %lu\n", inst.dwPatch);
TRACE_(dmfile)(" - dwAssignPatch: %lu\n", inst.dwAssignPatch);
TRACE_(dmfile)(" - dwNoteRanges[0]: %lu\n", inst.dwNoteRanges[0]);
TRACE_(dmfile)(" - dwNoteRanges[1]: %lu\n", inst.dwNoteRanges[1]);
TRACE_(dmfile)(" - dwNoteRanges[2]: %lu\n", inst.dwNoteRanges[2]);
TRACE_(dmfile)(" - dwNoteRanges[3]: %lu\n", inst.dwNoteRanges[3]);
TRACE_(dmfile)(" - dwPChannel: %lu\n", inst.dwPChannel);
TRACE_(dmfile)(" - dwFlags: %lx\n", inst.dwFlags);
TRACE_(dmfile)(" - bPan: %u\n", inst.bPan);
TRACE_(dmfile)(" - bVolume: %u\n", inst.bVolume);
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);
break;
}
......@@ -272,7 +272,7 @@ static HRESULT parse_instrument(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *
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]);
/*
......@@ -321,7 +321,7 @@ static HRESULT parse_instruments_list(IDirectMusicBandImpl *This, DMUS_PRIVATE_C
do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
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) {
case FOURCC_LIST: {
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
......@@ -351,7 +351,7 @@ static HRESULT parse_instruments_list(IDirectMusicBandImpl *This, DMUS_PRIVATE_C
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]);
return S_OK;
......@@ -378,7 +378,7 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
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);
if (FAILED(hr)) return hr;
......@@ -402,7 +402,7 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
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);
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]);
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);
return S_OK;
......@@ -465,11 +465,11 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
TRACE("(%p,%p): loading\n", This, pStm);
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) {
case FOURCC_RIFF: {
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) {
case DMUS_FOURCC_BAND_FORM: {
TRACE_(dmfile)(": Band form\n");
......
......@@ -226,10 +226,10 @@ void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc)
return;
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 " ")
TRACE_(dmfile)(" - dwValidData = %#08x ( ", desc->dwValidData);
TRACE_(dmfile)(" - dwValidData = %#08lx ( ", desc->dwValidData);
X(DMUS_OBJ_OBJECT);
X(DMUS_OBJ_CLASS);
X(DMUS_OBJ_NAME);
......@@ -285,7 +285,7 @@ const char *debugstr_chunk(const struct chunk_entry *chunk)
return "(null)";
if (chunk->id == FOURCC_RIFF || chunk->id == FOURCC_LIST)
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)
......@@ -295,10 +295,10 @@ static HRESULT stream_read(IStream *stream, void *data, ULONG size)
hr = IStream_Read(stream, data, size, &read);
if (FAILED(hr))
TRACE_(dmfile)("IStream_Read failed: %08x\n", hr);
TRACE_(dmfile)("IStream_Read failed: %#lx\n", hr);
else if (!read && read < size) {
/* 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;
}
......@@ -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))))
return hr;
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);
return DMUS_E_UNSUPPORTED_STREAM;
}
......@@ -420,7 +420,7 @@ HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk,
ULONG 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,
wine_dbgstr_longlong(chunk->offset.QuadPart), size);
return E_FAIL;
......@@ -567,7 +567,7 @@ HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff,
struct chunk_entry chunk = {.parent = riff};
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->dwSize = sizeof(*desc);
......@@ -612,7 +612,7 @@ HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff,
break;
}
}
TRACE("Found %#x\n", desc->dwValidData);
TRACE("Found %#lx\n", desc->dwValidData);
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));
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);
if (FAILED(hr = dmobj_parsedescriptor(stream, list, &desc, reference.dwValidData)))
......
......@@ -169,7 +169,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
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);
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;
IStream_Read (pStm, &ref, sizeof(DMUS_IO_REFERENCE), NULL);
TRACE(" - guidClassID: %s\n", debugstr_dmguid(&ref.guidClassID));
TRACE(" - dwValidData: %u\n", ref.dwValidData);
TRACE(" - dwValidData: %lu\n", ref.dwValidData);
break;
}
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]);
ref_desc.dwValidData |= DMUS_OBJ_CLASS;
......
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