Commit 7776591f authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

dmusic: Add dump function for DMUS_PORTPARAMS struct.

parent 7a772ed8
......@@ -178,6 +178,9 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLS
TRACE("(%p, %s, %p, %p, %p)\n", This, debugstr_dmguid(rclsidPort), pPortParams, ppPort, pUnkOuter);
if (TRACE_ON(dmusic))
dump_DMUS_PORTPARAMS(pPortParams);
if(!rclsidPort)
return E_POINTER;
......
......@@ -463,3 +463,31 @@ void dump_DMUS_OBJECTDESC(LPDMUS_OBJECTDESC desc)
wine_dbgstr_longlong(desc->llMemLength), desc->pbMemData);
if (desc->dwValidData & DMUS_OBJ_STREAM) TRACE(" - pStream = %p\n", desc->pStream);
}
/* Dump DMUS_PORTPARAMS flags */
static const char* debugstr_DMUS_PORTPARAMS_FLAGS(DWORD flagmask)
{
static const flag_info flags[] = {
FE(DMUS_PORTPARAMS_VOICES),
FE(DMUS_PORTPARAMS_CHANNELGROUPS),
FE(DMUS_PORTPARAMS_AUDIOCHANNELS),
FE(DMUS_PORTPARAMS_SAMPLERATE),
FE(DMUS_PORTPARAMS_EFFECTS),
FE(DMUS_PORTPARAMS_SHARE)
};
return debugstr_flags(flagmask, flags, sizeof(flags)/sizeof(flags[0]));
}
/* Dump whole DMUS_PORTPARAMS struct */
void dump_DMUS_PORTPARAMS(LPDMUS_PORTPARAMS params)
{
TRACE("DMUS_PORTPARAMS (%p):\n", params);
TRACE(" - dwSize = %d\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_SHARE) TRACE(" - fShare = %u\n", params->fShare);
}
......@@ -276,5 +276,7 @@ extern const char *debugstr_fourcc (DWORD fourcc) DECLSPEC_HIDDEN;
extern const char *debugstr_dmguid (const GUID *id) DECLSPEC_HIDDEN;
/* Dump whole DMUS_OBJECTDESC struct */
extern void dump_DMUS_OBJECTDESC(LPDMUS_OBJECTDESC desc) DECLSPEC_HIDDEN;
/* Dump whole DMUS_PORTPARAMS struct */
extern void dump_DMUS_PORTPARAMS(LPDMUS_PORTPARAMS params) DECLSPEC_HIDDEN;
#endif /* __WINE_DMUSIC_PRIVATE_H */
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