Commit 8729840f authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmusic: Build without -DWINE_NO_LONG_TYPES.

parent 26a9ce80
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dmusic.dll
IMPORTS = dxguid uuid ole32 advapi32 dsound user32 winmm
......
......@@ -56,7 +56,7 @@ static ULONG WINAPI IDirectMusicBufferImpl_AddRef(LPDIRECTMUSICBUFFER iface)
IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
TRACE("(%p): new ref = %lu\n", iface, ref);
return ref;
}
......@@ -66,7 +66,7 @@ static ULONG WINAPI IDirectMusicBufferImpl_Release(LPDIRECTMUSICBUFFER iface)
IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
TRACE("(%p): new ref = %lu\n", iface, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This->data);
......@@ -104,7 +104,7 @@ static HRESULT WINAPI IDirectMusicBufferImpl_PackStructured(LPDIRECTMUSICBUFFER
DWORD new_write_pos = This->write_pos + DMUS_EVENT_SIZE(sizeof(channel_message));
DMUS_EVENTHEADER *header;
TRACE("(%p)->(0x%s, %u, 0x%x)\n", iface, wine_dbgstr_longlong(ref_time), channel_group, channel_message);
TRACE("(%p, 0x%s, %lu, %#lx)\n", iface, wine_dbgstr_longlong(ref_time), channel_group, channel_message);
if (new_write_pos > This->size)
return DMUS_E_BUFFER_FULL;
......@@ -139,7 +139,7 @@ static HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured(IDirectMusicBuffer
DWORD new_write_pos = This->write_pos + DMUS_EVENT_SIZE(len);
DMUS_EVENTHEADER *header;
TRACE("(%p, 0x%s, %d, %d, %p)\n", This, wine_dbgstr_longlong(ref_time), channel_group, len, data);
TRACE("(%p, 0x%s, %ld, %ld, %p)\n", This, wine_dbgstr_longlong(ref_time), channel_group, len, data);
if (new_write_pos > This->size)
return DMUS_E_BUFFER_FULL;
......@@ -263,7 +263,7 @@ static HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes(LPDIRECTMUSICBUFFER if
{
IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface);
TRACE("(%p)->(%u)\n", iface, used_bytes);
TRACE("(%p, %lu)\n", iface, used_bytes);
if (used_bytes > This->size)
return DMUS_E_BUFFER_FULL;
......
......@@ -49,7 +49,7 @@ static ULONG WINAPI IReferenceClockImpl_AddRef(IReferenceClock *iface)
IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", This, ref);
TRACE("(%p): new ref = %lu\n", This, ref);
return ref;
}
......@@ -59,7 +59,7 @@ static ULONG WINAPI IReferenceClockImpl_Release(IReferenceClock *iface)
IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", This, ref);
TRACE("(%p): new ref = %lu\n", This, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
......@@ -103,7 +103,7 @@ static HRESULT WINAPI IReferenceClockImpl_Unadvise(IReferenceClock *iface, DWORD
{
IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
FIXME("(%p)->(%d): stub\n", This, dwAdviseCookie);
FIXME("(%p, %ld): stub\n", This, dwAdviseCookie);
return S_OK;
}
......
......@@ -85,7 +85,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_AddRef(IDirectMusicCollection *if
IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
TRACE("(%p): new ref = %lu\n", iface, ref);
return ref;
}
......@@ -95,7 +95,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_Release(IDirectMusicCollection *i
IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
TRACE("(%p): new ref = %lu\n", iface, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
......@@ -114,7 +114,7 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_GetInstrument(IDirectMusicColle
struct list *list_entry;
DWORD inst_patch;
TRACE("(%p/%p)->(%u, %p)\n", iface, This, patch, instrument);
TRACE("(%p, %lu, %p)\n", iface, patch, instrument);
LIST_FOR_EACH(list_entry, &This->Instruments) {
inst_entry = LIST_ENTRY(list_entry, DMUS_PRIVATE_INSTRUMENTENTRY, entry);
......@@ -142,7 +142,7 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_EnumInstrument(IDirectMusicColl
struct list *list_entry;
DWORD length;
TRACE("(%p/%p)->(%d, %p, %p, %d)\n", iface, This, index, patch, name, name_length);
TRACE("(%p, %ld, %p, %p, %ld)\n", iface, index, patch, name, name_length);
LIST_FOR_EACH(list_entry, &This->Instruments) {
inst_entry = LIST_ENTRY(list_entry, DMUS_PRIVATE_INSTRUMENTENTRY, entry);
......@@ -228,7 +228,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
This->pStm = stream;
IStream_Read(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD), NULL);
TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
TRACE_(dmfile)(": %s chunk (size = %#04lx)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
if (chunk.fccID != FOURCC_RIFF) {
TRACE_(dmfile)(": unexpected chunk; loading failed)\n");
......@@ -253,7 +253,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
do {
IStream_Read(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD), NULL);
StreamCount += sizeof(FOURCC) + sizeof(DWORD) + chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
TRACE_(dmfile)(": %s chunk (size = %#04lx)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
switch (chunk.fccID) {
case FOURCC_COLH: {
TRACE_(dmfile)(": collection header chunk\n");
......@@ -293,7 +293,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
do {
IStream_Read(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
TRACE_(dmfile)(": %s chunk (size = %#04lx)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
switch (chunk.fccID) {
case mmioFOURCC('I','N','A','M'): {
CHAR szName[DMUS_MAX_NAME];
......@@ -360,7 +360,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
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]);
break;
}
......@@ -378,7 +378,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
do {
IStream_Read(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
TRACE_(dmfile)(": %s chunk (size = %#04lx)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
switch (chunk.fccID) {
case FOURCC_LIST: {
IStream_Read(stream, &chunk.fccID, sizeof(FOURCC), NULL);
......@@ -401,7 +401,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
do {
IStream_Read(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD), NULL);
ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
TRACE_(dmfile)(": %s chunk (size = %#04lx)", debugstr_fourcc(chunk.fccID), chunk.dwSize);
switch (chunk.fccID) {
case FOURCC_INSH: {
TRACE_(dmfile)(": instrument header chunk\n");
......@@ -433,7 +433,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
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]);
/* DEBUG: dumps whole instrument object tree: */
if (TRACE_ON(dmusic)) {
......@@ -441,11 +441,11 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
if (!IsEqualGUID(&instrument->id, &GUID_NULL))
TRACE(" - GUID = %s\n", debugstr_dmguid(&instrument->id));
TRACE(" - Instrument header:\n");
TRACE(" - cRegions: %d\n", instrument->header.cRegions);
TRACE(" - cRegions: %ld\n", instrument->header.cRegions);
TRACE(" - Locale:\n");
TRACE(" - ulBank: %d\n", instrument->header.Locale.ulBank);
TRACE(" - ulInstrument: %d\n", instrument->header.Locale.ulInstrument);
TRACE(" => dwPatch: %d\n", MIDILOCALE2Patch(&instrument->header.Locale));
TRACE(" - ulBank: %ld\n", instrument->header.Locale.ulBank);
TRACE(" - ulInstrument: %ld\n", instrument->header.Locale.ulInstrument);
TRACE(" => dwPatch: %ld\n", MIDILOCALE2Patch(&instrument->header.Locale));
}
list_add_tail(&This->Instruments, &new_instrument->entry);
}
......@@ -461,7 +461,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
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]);
break;
}
......@@ -481,7 +481,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
break;
}
}
TRACE_(dmfile)(": StreamCount = %d < StreamSize = %d\n", StreamCount, StreamSize);
TRACE_(dmfile)(": StreamCount = %ld < StreamSize = %ld\n", StreamCount, StreamSize);
} while (StreamCount < StreamSize);
TRACE_(dmfile)(": reading finished\n");
......@@ -497,7 +497,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface,
dump_DMUS_OBJECTDESC(&This->dmobj.desc);
TRACE(" - Collection header:\n");
TRACE(" - cInstruments: %d\n", This->pHeader->cInstruments);
TRACE(" - cInstruments: %ld\n", This->pHeader->cInstruments);
TRACE(" - Instruments:\n");
LIST_FOR_EACH(listEntry, &This->Instruments) {
......
......@@ -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: %08lx\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)))
......
......@@ -62,7 +62,7 @@ static ULONG WINAPI master_IReferenceClock_AddRef(IReferenceClock *iface)
struct master_clock *This = impl_from_IReferenceClock(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref = %u\n", iface, ref);
TRACE("(%p) ref = %lu\n", iface, ref);
return ref;
}
......@@ -72,7 +72,7 @@ static ULONG WINAPI master_IReferenceClock_Release(IReferenceClock *iface)
struct master_clock *This = impl_from_IReferenceClock(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref = %u\n", iface, ref);
TRACE("(%p) ref = %lu\n", iface, ref);
if (!ref)
heap_free(This);
......@@ -115,7 +115,7 @@ static HRESULT WINAPI master_IReferenceClock_AdvisePeriodic(IReferenceClock *ifa
static HRESULT WINAPI master_IReferenceClock_Unadvise(IReferenceClock *iface, DWORD cookie)
{
TRACE("(%p, %#x): method not implemented\n", iface, cookie);
TRACE("(%p, %#lx): method not implemented\n", iface, cookie);
return E_NOTIMPL;
}
......@@ -183,7 +183,7 @@ static ULONG WINAPI IDirectMusic8Impl_AddRef(LPDIRECTMUSIC8 iface)
IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", This, ref);
TRACE("(%p): new ref = %lu\n", This, ref);
return ref;
}
......@@ -193,7 +193,7 @@ static ULONG WINAPI IDirectMusic8Impl_Release(LPDIRECTMUSIC8 iface)
IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", This, ref);
TRACE("(%p): new ref = %lu\n", This, ref);
if (!ref) {
IReferenceClock_Release(This->master_clock);
......@@ -213,7 +213,7 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD ind
{
IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface);
TRACE("(%p, %d, %p)\n", This, index, port_caps);
TRACE("(%p, %ld, %p)\n", This, index, port_caps);
if (!port_caps)
return E_POINTER;
......@@ -333,7 +333,7 @@ void dmusic_remove_port(IDirectMusic8Impl *dmusic, IDirectMusicPort *port)
static HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock(LPDIRECTMUSIC8 iface, DWORD index, LPDMUS_CLOCKINFO clock_info)
{
TRACE("(%p)->(%d, %p)\n", iface, index, clock_info);
TRACE("(%p, %ld, %p)\n", iface, index, clock_info);
if (!clock_info)
return E_POINTER;
......
......@@ -222,12 +222,12 @@ static const char* debugstr_DMUS_PORTPARAMS_FLAGS(DWORD flagmask)
void dump_DMUS_PORTPARAMS(LPDMUS_PORTPARAMS params)
{
TRACE("DMUS_PORTPARAMS (%p):\n", params);
TRACE(" - dwSize = %d\n", params->dwSize);
TRACE(" - dwSize = %ld\n", params->dwSize);
TRACE(" - dwValidParams = %s\n", debugstr_DMUS_PORTPARAMS_FLAGS(params->dwValidParams));
if (params->dwValidParams & DMUS_PORTPARAMS_VOICES) TRACE(" - dwVoices = %u\n", params->dwVoices);
if (params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) TRACE(" - dwChannelGroup = %u\n", params->dwChannelGroups);
if (params->dwValidParams & DMUS_PORTPARAMS_AUDIOCHANNELS) TRACE(" - dwAudioChannels = %u\n", params->dwAudioChannels);
if (params->dwValidParams & DMUS_PORTPARAMS_SAMPLERATE) TRACE(" - dwSampleRate = %u\n", params->dwSampleRate);
if (params->dwValidParams & DMUS_PORTPARAMS_EFFECTS) TRACE(" - dwEffectFlags = %x\n", params->dwEffectFlags);
if (params->dwValidParams & DMUS_PORTPARAMS_VOICES) TRACE(" - dwVoices = %lu\n", params->dwVoices);
if (params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) TRACE(" - dwChannelGroup = %lu\n", params->dwChannelGroups);
if (params->dwValidParams & DMUS_PORTPARAMS_AUDIOCHANNELS) TRACE(" - dwAudioChannels = %lu\n", params->dwAudioChannels);
if (params->dwValidParams & DMUS_PORTPARAMS_SAMPLERATE) TRACE(" - dwSampleRate = %lu\n", params->dwSampleRate);
if (params->dwValidParams & DMUS_PORTPARAMS_EFFECTS) TRACE(" - dwEffectFlags = %lx\n", params->dwEffectFlags);
if (params->dwValidParams & DMUS_PORTPARAMS_SHARE) TRACE(" - fShare = %u\n", params->fShare);
}
......@@ -51,7 +51,7 @@ static ULONG WINAPI IDirectMusicDownloadImpl_AddRef(IDirectMusicDownload *iface)
IDirectMusicDownloadImpl *This = impl_from_IDirectMusicDownload(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
TRACE("(%p): new ref = %lu\n", iface, ref);
return ref;
}
......@@ -61,7 +61,7 @@ static ULONG WINAPI IDirectMusicDownloadImpl_Release(IDirectMusicDownload *iface
IDirectMusicDownloadImpl *This = impl_from_IDirectMusicDownload(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
TRACE("(%p): new ref = %lu\n", iface, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
......
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