Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bcd88ea3
Commit
bcd88ea3
authored
Dec 13, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmstyle: Use the debug functions provided by dmobject.[ch].
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eb60619e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
255 additions
and
335 deletions
+255
-335
dmobject.c
dlls/dmstyle/dmobject.c
+241
-6
dmobject.h
dlls/dmstyle/dmobject.h
+12
-2
dmstyle_main.c
dlls/dmstyle/dmstyle_main.c
+1
-0
dmutils.c
dlls/dmstyle/dmutils.c
+1
-301
dmutils.h
dlls/dmstyle/dmutils.h
+0
-26
No files found.
dlls/dmstyle/dmobject.c
View file @
bcd88ea3
...
...
@@ -25,22 +25,257 @@
#include "objbase.h"
#include "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
#include "dmobject.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmobj
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
/* RIFF format parsing */
#define CHUNK_HDR_SIZE (sizeof(FOURCC) + sizeof(DWORD))
/* Debugging helpers */
const
char
*
debugstr_dmguid
(
const
GUID
*
id
)
{
unsigned
int
i
;
#define X(guid) { &guid, #guid }
static
const
struct
{
const
GUID
*
guid
;
const
char
*
name
;
}
guids
[]
=
{
/* CLSIDs */
X
(
CLSID_AudioVBScript
),
X
(
CLSID_DirectMusic
),
X
(
CLSID_DirectMusicAudioPathConfig
),
X
(
CLSID_DirectMusicAuditionTrack
),
X
(
CLSID_DirectMusicBand
),
X
(
CLSID_DirectMusicBandTrack
),
X
(
CLSID_DirectMusicChordMapTrack
),
X
(
CLSID_DirectMusicChordMap
),
X
(
CLSID_DirectMusicChordTrack
),
X
(
CLSID_DirectMusicCollection
),
X
(
CLSID_DirectMusicCommandTrack
),
X
(
CLSID_DirectMusicComposer
),
X
(
CLSID_DirectMusicContainer
),
X
(
CLSID_DirectMusicGraph
),
X
(
CLSID_DirectMusicLoader
),
X
(
CLSID_DirectMusicLyricsTrack
),
X
(
CLSID_DirectMusicMarkerTrack
),
X
(
CLSID_DirectMusicMelodyFormulationTrack
),
X
(
CLSID_DirectMusicMotifTrack
),
X
(
CLSID_DirectMusicMuteTrack
),
X
(
CLSID_DirectMusicParamControlTrack
),
X
(
CLSID_DirectMusicPatternTrack
),
X
(
CLSID_DirectMusicPerformance
),
X
(
CLSID_DirectMusicScript
),
X
(
CLSID_DirectMusicScriptAutoImpSegment
),
X
(
CLSID_DirectMusicScriptAutoImpPerformance
),
X
(
CLSID_DirectMusicScriptAutoImpSegmentState
),
X
(
CLSID_DirectMusicScriptAutoImpAudioPathConfig
),
X
(
CLSID_DirectMusicScriptAutoImpAudioPath
),
X
(
CLSID_DirectMusicScriptAutoImpSong
),
X
(
CLSID_DirectMusicScriptSourceCodeLoader
),
X
(
CLSID_DirectMusicScriptTrack
),
X
(
CLSID_DirectMusicSection
),
X
(
CLSID_DirectMusicSegment
),
X
(
CLSID_DirectMusicSegmentState
),
X
(
CLSID_DirectMusicSegmentTriggerTrack
),
X
(
CLSID_DirectMusicSegTriggerTrack
),
X
(
CLSID_DirectMusicSeqTrack
),
X
(
CLSID_DirectMusicSignPostTrack
),
X
(
CLSID_DirectMusicSong
),
X
(
CLSID_DirectMusicStyle
),
X
(
CLSID_DirectMusicStyleTrack
),
X
(
CLSID_DirectMusicSynth
),
X
(
CLSID_DirectMusicSynthSink
),
X
(
CLSID_DirectMusicSysExTrack
),
X
(
CLSID_DirectMusicTemplate
),
X
(
CLSID_DirectMusicTempoTrack
),
X
(
CLSID_DirectMusicTimeSigTrack
),
X
(
CLSID_DirectMusicWaveTrack
),
X
(
CLSID_DirectSoundWave
),
/* IIDs */
X
(
IID_IDirectMusic
),
X
(
IID_IDirectMusic2
),
X
(
IID_IDirectMusic8
),
X
(
IID_IDirectMusicAudioPath
),
X
(
IID_IDirectMusicBand
),
X
(
IID_IDirectMusicBuffer
),
X
(
IID_IDirectMusicChordMap
),
X
(
IID_IDirectMusicCollection
),
X
(
IID_IDirectMusicComposer
),
X
(
IID_IDirectMusicContainer
),
X
(
IID_IDirectMusicDownload
),
X
(
IID_IDirectMusicDownloadedInstrument
),
X
(
IID_IDirectMusicGetLoader
),
X
(
IID_IDirectMusicGraph
),
X
(
IID_IDirectMusicInstrument
),
X
(
IID_IDirectMusicLoader
),
X
(
IID_IDirectMusicLoader8
),
X
(
IID_IDirectMusicObject
),
X
(
IID_IDirectMusicPatternTrack
),
X
(
IID_IDirectMusicPerformance
),
X
(
IID_IDirectMusicPerformance2
),
X
(
IID_IDirectMusicPerformance8
),
X
(
IID_IDirectMusicPort
),
X
(
IID_IDirectMusicPortDownload
),
X
(
IID_IDirectMusicScript
),
X
(
IID_IDirectMusicSegment
),
X
(
IID_IDirectMusicSegment2
),
X
(
IID_IDirectMusicSegment8
),
X
(
IID_IDirectMusicSegmentState
),
X
(
IID_IDirectMusicSegmentState8
),
X
(
IID_IDirectMusicStyle
),
X
(
IID_IDirectMusicStyle8
),
X
(
IID_IDirectMusicSynth
),
X
(
IID_IDirectMusicSynth8
),
X
(
IID_IDirectMusicSynthSink
),
X
(
IID_IDirectMusicThru
),
X
(
IID_IDirectMusicTool
),
X
(
IID_IDirectMusicTool8
),
X
(
IID_IDirectMusicTrack
),
X
(
IID_IDirectMusicTrack8
),
X
(
IID_IUnknown
),
X
(
IID_IPersistStream
),
X
(
IID_IStream
),
X
(
IID_IClassFactory
),
/* GUIDs */
X
(
GUID_DirectMusicAllTypes
),
X
(
GUID_NOTIFICATION_CHORD
),
X
(
GUID_NOTIFICATION_COMMAND
),
X
(
GUID_NOTIFICATION_MEASUREANDBEAT
),
X
(
GUID_NOTIFICATION_PERFORMANCE
),
X
(
GUID_NOTIFICATION_RECOMPOSE
),
X
(
GUID_NOTIFICATION_SEGMENT
),
X
(
GUID_BandParam
),
X
(
GUID_ChordParam
),
X
(
GUID_CommandParam
),
X
(
GUID_CommandParam2
),
X
(
GUID_CommandParamNext
),
X
(
GUID_IDirectMusicBand
),
X
(
GUID_IDirectMusicChordMap
),
X
(
GUID_IDirectMusicStyle
),
X
(
GUID_MuteParam
),
X
(
GUID_Play_Marker
),
X
(
GUID_RhythmParam
),
X
(
GUID_TempoParam
),
X
(
GUID_TimeSignature
),
X
(
GUID_Valid_Start_Time
),
X
(
GUID_Clear_All_Bands
),
X
(
GUID_ConnectToDLSCollection
),
X
(
GUID_Disable_Auto_Download
),
X
(
GUID_DisableTempo
),
X
(
GUID_DisableTimeSig
),
X
(
GUID_Download
),
X
(
GUID_DownloadToAudioPath
),
X
(
GUID_Enable_Auto_Download
),
X
(
GUID_EnableTempo
),
X
(
GUID_EnableTimeSig
),
X
(
GUID_IgnoreBankSelectForGM
),
X
(
GUID_SeedVariations
),
X
(
GUID_StandardMIDIFile
),
X
(
GUID_Unload
),
X
(
GUID_UnloadFromAudioPath
),
X
(
GUID_Variations
),
X
(
GUID_PerfMasterTempo
),
X
(
GUID_PerfMasterVolume
),
X
(
GUID_PerfMasterGrooveLevel
),
X
(
GUID_PerfAutoDownload
),
X
(
GUID_DefaultGMCollection
),
X
(
GUID_Synth_Default
),
X
(
GUID_Buffer_Reverb
),
X
(
GUID_Buffer_EnvReverb
),
X
(
GUID_Buffer_Stereo
),
X
(
GUID_Buffer_3D_Dry
),
X
(
GUID_Buffer_Mono
),
X
(
GUID_DMUS_PROP_GM_Hardware
),
X
(
GUID_DMUS_PROP_GS_Capable
),
X
(
GUID_DMUS_PROP_GS_Hardware
),
X
(
GUID_DMUS_PROP_DLS1
),
X
(
GUID_DMUS_PROP_DLS2
),
X
(
GUID_DMUS_PROP_Effects
),
X
(
GUID_DMUS_PROP_INSTRUMENT2
),
X
(
GUID_DMUS_PROP_LegacyCaps
),
X
(
GUID_DMUS_PROP_MemorySize
),
X
(
GUID_DMUS_PROP_SampleMemorySize
),
X
(
GUID_DMUS_PROP_SamplePlaybackRate
),
X
(
GUID_DMUS_PROP_SetSynthSink
),
X
(
GUID_DMUS_PROP_SinkUsesDSound
),
X
(
GUID_DMUS_PROP_SynthSink_DSOUND
),
X
(
GUID_DMUS_PROP_SynthSink_WAVE
),
X
(
GUID_DMUS_PROP_Volume
),
X
(
GUID_DMUS_PROP_WavesReverb
),
X
(
GUID_DMUS_PROP_WriteLatency
),
X
(
GUID_DMUS_PROP_WritePeriod
),
X
(
GUID_DMUS_PROP_XG_Capable
),
X
(
GUID_DMUS_PROP_XG_Hardware
)
};
#undef X
if
(
!
id
)
return
"(null)"
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
guids
);
i
++
)
if
(
IsEqualGUID
(
id
,
guids
[
i
].
guid
))
return
guids
[
i
].
name
;
return
debugstr_guid
(
id
);
}
static
inline
const
char
*
debugstr_fourcc
(
DWORD
fourc
c
)
void
dump_DMUS_OBJECTDESC
(
DMUS_OBJECTDESC
*
des
c
)
{
if
(
!
fourcc
)
return
"''"
;
return
wine_dbg_sprintf
(
"'%c%c%c%c'"
,
(
char
)(
fourcc
),
(
char
)(
fourcc
>>
8
),
(
char
)(
fourcc
>>
16
),
(
char
)(
fourcc
>>
24
));
if
(
!
desc
||
!
TRACE_ON
(
dmfile
))
return
;
TRACE_
(
dmfile
)(
"DMUS_OBJECTDESC (%p):"
,
desc
);
TRACE_
(
dmfile
)(
" - dwSize = %u
\n
"
,
desc
->
dwSize
);
#define X(flag) if (desc->dwValidData & flag) TRACE_(dmfile)(#flag " ")
TRACE_
(
dmfile
)(
" - dwValidData = %#08x ( "
,
desc
->
dwValidData
);
X
(
DMUS_OBJ_OBJECT
);
X
(
DMUS_OBJ_CLASS
);
X
(
DMUS_OBJ_NAME
);
X
(
DMUS_OBJ_CATEGORY
);
X
(
DMUS_OBJ_FILENAME
);
X
(
DMUS_OBJ_FULLPATH
);
X
(
DMUS_OBJ_URL
);
X
(
DMUS_OBJ_VERSION
);
X
(
DMUS_OBJ_DATE
);
X
(
DMUS_OBJ_LOADED
);
X
(
DMUS_OBJ_MEMORY
);
X
(
DMUS_OBJ_STREAM
);
TRACE_
(
dmfile
)(
")
\n
"
);
#undef X
if
(
desc
->
dwValidData
&
DMUS_OBJ_CLASS
)
TRACE_
(
dmfile
)(
" - guidClass = %s
\n
"
,
debugstr_dmguid
(
&
desc
->
guidClass
));
if
(
desc
->
dwValidData
&
DMUS_OBJ_OBJECT
)
TRACE_
(
dmfile
)(
" - guidObject = %s
\n
"
,
debugstr_guid
(
&
desc
->
guidObject
));
if
(
desc
->
dwValidData
&
DMUS_OBJ_DATE
)
{
SYSTEMTIME
time
;
FileTimeToSystemTime
(
&
desc
->
ftDate
,
&
time
);
TRACE_
(
dmfile
)(
" - ftDate =
\'
%04u-%02u-%02u %02u:%02u:%02u
\'\n
"
,
time
.
wYear
,
time
.
wMonth
,
time
.
wDay
,
time
.
wHour
,
time
.
wMinute
,
time
.
wSecond
);
}
if
(
desc
->
dwValidData
&
DMUS_OBJ_VERSION
)
TRACE_
(
dmfile
)(
" - vVersion =
\'
%u,%u,%u,%u
\'\n
"
,
HIWORD
(
desc
->
vVersion
.
dwVersionMS
),
LOWORD
(
desc
->
vVersion
.
dwVersionMS
),
HIWORD
(
desc
->
vVersion
.
dwVersionLS
),
LOWORD
(
desc
->
vVersion
.
dwVersionLS
));
if
(
desc
->
dwValidData
&
DMUS_OBJ_NAME
)
TRACE_
(
dmfile
)(
" - wszName = %s
\n
"
,
debugstr_w
(
desc
->
wszName
));
if
(
desc
->
dwValidData
&
DMUS_OBJ_CATEGORY
)
TRACE_
(
dmfile
)(
" - wszCategory = %s
\n
"
,
debugstr_w
(
desc
->
wszCategory
));
if
(
desc
->
dwValidData
&
DMUS_OBJ_FILENAME
)
TRACE_
(
dmfile
)(
" - wszFileName = %s
\n
"
,
debugstr_w
(
desc
->
wszFileName
));
if
(
desc
->
dwValidData
&
DMUS_OBJ_MEMORY
)
TRACE_
(
dmfile
)(
" - llMemLength = 0x%s - pbMemData = %p
\n
"
,
wine_dbgstr_longlong
(
desc
->
llMemLength
),
desc
->
pbMemData
);
if
(
desc
->
dwValidData
&
DMUS_OBJ_STREAM
)
TRACE_
(
dmfile
)(
" - pStream = %p
\n
"
,
desc
->
pStream
);
}
/* RIFF format parsing */
#define CHUNK_HDR_SIZE (sizeof(FOURCC) + sizeof(DWORD))
const
char
*
debugstr_chunk
(
const
struct
chunk_entry
*
chunk
)
{
const
char
*
type
=
""
;
...
...
dlls/dmstyle/dmobject.h
View file @
bcd88ea3
...
...
@@ -60,8 +60,6 @@ static inline HRESULT stream_reset_chunk_start(IStream *stream, const struct chu
return
IStream_Seek
(
stream
,
offset
,
STREAM_SEEK_SET
,
NULL
);
}
const
char
*
debugstr_chunk
(
const
struct
chunk_entry
*
chunk
)
DECLSPEC_HIDDEN
;
/* IDirectMusicObject base object */
struct
dmobject
{
...
...
@@ -106,3 +104,15 @@ HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream
BOOL
clear_dirty
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
unimpl_IPersistStream_GetSizeMax
(
IPersistStream
*
iface
,
ULARGE_INTEGER
*
size
)
DECLSPEC_HIDDEN
;
/* Debugging helpers */
const
char
*
debugstr_chunk
(
const
struct
chunk_entry
*
chunk
)
DECLSPEC_HIDDEN
;
const
char
*
debugstr_dmguid
(
const
GUID
*
id
)
DECLSPEC_HIDDEN
;
void
dump_DMUS_OBJECTDESC
(
DMUS_OBJECTDESC
*
desc
)
DECLSPEC_HIDDEN
;
static
inline
const
char
*
debugstr_fourcc
(
DWORD
fourcc
)
{
if
(
!
fourcc
)
return
"''"
;
return
wine_dbg_sprintf
(
"'%c%c%c%c'"
,
(
char
)(
fourcc
),
(
char
)(
fourcc
>>
8
),
(
char
)(
fourcc
>>
16
),
(
char
)(
fourcc
>>
24
));
}
dlls/dmstyle/dmstyle_main.c
View file @
bcd88ea3
...
...
@@ -33,6 +33,7 @@
#include "dmusici.h"
#include "dmstyle_private.h"
#include "dmobject.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmstyle
);
...
...
dlls/dmstyle/dmutils.c
View file @
bcd88ea3
...
...
@@ -38,9 +38,9 @@
#include "dmusics.h"
#include "dmutils.h"
#include "dmobject.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmfile
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmime
);
HRESULT
IDirectMusicUtils_IPersistStream_ParseDescGeneric
(
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
LPDMUS_OBJECTDESC
pDesc
)
{
...
...
@@ -215,303 +215,3 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
return
hr
;
}
/* FOURCC to string conversion for debug messages */
const
char
*
debugstr_fourcc
(
DWORD
fourcc
)
{
if
(
!
fourcc
)
return
"'null'"
;
return
wine_dbg_sprintf
(
"
\'
%c%c%c%c
\'
"
,
(
char
)(
fourcc
),
(
char
)(
fourcc
>>
8
),
(
char
)(
fourcc
>>
16
),
(
char
)(
fourcc
>>
24
));
}
/* DMUS_VERSION struct to string conversion for debug messages */
static
const
char
*
debugstr_dmversion
(
const
DMUS_VERSION
*
version
)
{
if
(
!
version
)
return
"'null'"
;
return
wine_dbg_sprintf
(
"
\'
%i,%i,%i,%i
\'
"
,
HIWORD
(
version
->
dwVersionMS
),
LOWORD
(
version
->
dwVersionMS
),
HIWORD
(
version
->
dwVersionLS
),
LOWORD
(
version
->
dwVersionLS
));
}
/* month number into month name (for debugstr_filetime) */
static
const
char
*
debugstr_month
(
DWORD
dwMonth
)
{
switch
(
dwMonth
)
{
case
1
:
return
"January"
;
case
2
:
return
"February"
;
case
3
:
return
"March"
;
case
4
:
return
"April"
;
case
5
:
return
"May"
;
case
6
:
return
"June"
;
case
7
:
return
"July"
;
case
8
:
return
"August"
;
case
9
:
return
"September"
;
case
10
:
return
"October"
;
case
11
:
return
"November"
;
case
12
:
return
"December"
;
default:
return
"Invalid"
;
}
}
/* FILETIME struct to string conversion for debug messages */
static
const
char
*
debugstr_filetime
(
const
FILETIME
*
time
)
{
SYSTEMTIME
sysTime
;
if
(
!
time
)
return
"'null'"
;
FileTimeToSystemTime
(
time
,
&
sysTime
);
return
wine_dbg_sprintf
(
"
\'
%02i. %s %04i %02i:%02i:%02i
\'
"
,
sysTime
.
wDay
,
debugstr_month
(
sysTime
.
wMonth
),
sysTime
.
wYear
,
sysTime
.
wHour
,
sysTime
.
wMinute
,
sysTime
.
wSecond
);
}
/* returns name of given GUID */
const
char
*
debugstr_dmguid
(
const
GUID
*
id
)
{
static
const
guid_info
guids
[]
=
{
/* CLSIDs */
GE
(
CLSID_AudioVBScript
),
GE
(
CLSID_DirectMusic
),
GE
(
CLSID_DirectMusicAudioPathConfig
),
GE
(
CLSID_DirectMusicAuditionTrack
),
GE
(
CLSID_DirectMusicBand
),
GE
(
CLSID_DirectMusicBandTrack
),
GE
(
CLSID_DirectMusicChordMapTrack
),
GE
(
CLSID_DirectMusicChordMap
),
GE
(
CLSID_DirectMusicChordTrack
),
GE
(
CLSID_DirectMusicCollection
),
GE
(
CLSID_DirectMusicCommandTrack
),
GE
(
CLSID_DirectMusicComposer
),
GE
(
CLSID_DirectMusicContainer
),
GE
(
CLSID_DirectMusicGraph
),
GE
(
CLSID_DirectMusicLoader
),
GE
(
CLSID_DirectMusicLyricsTrack
),
GE
(
CLSID_DirectMusicMarkerTrack
),
GE
(
CLSID_DirectMusicMelodyFormulationTrack
),
GE
(
CLSID_DirectMusicMotifTrack
),
GE
(
CLSID_DirectMusicMuteTrack
),
GE
(
CLSID_DirectMusicParamControlTrack
),
GE
(
CLSID_DirectMusicPatternTrack
),
GE
(
CLSID_DirectMusicPerformance
),
GE
(
CLSID_DirectMusicScript
),
GE
(
CLSID_DirectMusicScriptAutoImpSegment
),
GE
(
CLSID_DirectMusicScriptAutoImpPerformance
),
GE
(
CLSID_DirectMusicScriptAutoImpSegmentState
),
GE
(
CLSID_DirectMusicScriptAutoImpAudioPathConfig
),
GE
(
CLSID_DirectMusicScriptAutoImpAudioPath
),
GE
(
CLSID_DirectMusicScriptAutoImpSong
),
GE
(
CLSID_DirectMusicScriptSourceCodeLoader
),
GE
(
CLSID_DirectMusicScriptTrack
),
GE
(
CLSID_DirectMusicSection
),
GE
(
CLSID_DirectMusicSegment
),
GE
(
CLSID_DirectMusicSegmentState
),
GE
(
CLSID_DirectMusicSegmentTriggerTrack
),
GE
(
CLSID_DirectMusicSegTriggerTrack
),
GE
(
CLSID_DirectMusicSeqTrack
),
GE
(
CLSID_DirectMusicSignPostTrack
),
GE
(
CLSID_DirectMusicSong
),
GE
(
CLSID_DirectMusicStyle
),
GE
(
CLSID_DirectMusicStyleTrack
),
GE
(
CLSID_DirectMusicSynth
),
GE
(
CLSID_DirectMusicSynthSink
),
GE
(
CLSID_DirectMusicSysExTrack
),
GE
(
CLSID_DirectMusicTemplate
),
GE
(
CLSID_DirectMusicTempoTrack
),
GE
(
CLSID_DirectMusicTimeSigTrack
),
GE
(
CLSID_DirectMusicWaveTrack
),
GE
(
CLSID_DirectSoundWave
),
/* IIDs */
GE
(
IID_IDirectMusic
),
GE
(
IID_IDirectMusic2
),
GE
(
IID_IDirectMusic8
),
GE
(
IID_IDirectMusicAudioPath
),
GE
(
IID_IDirectMusicBand
),
GE
(
IID_IDirectMusicBuffer
),
GE
(
IID_IDirectMusicChordMap
),
GE
(
IID_IDirectMusicCollection
),
GE
(
IID_IDirectMusicComposer
),
GE
(
IID_IDirectMusicContainer
),
GE
(
IID_IDirectMusicDownload
),
GE
(
IID_IDirectMusicDownloadedInstrument
),
GE
(
IID_IDirectMusicGetLoader
),
GE
(
IID_IDirectMusicGraph
),
GE
(
IID_IDirectMusicInstrument
),
GE
(
IID_IDirectMusicLoader
),
GE
(
IID_IDirectMusicLoader8
),
GE
(
IID_IDirectMusicObject
),
GE
(
IID_IDirectMusicPatternTrack
),
GE
(
IID_IDirectMusicPerformance
),
GE
(
IID_IDirectMusicPerformance2
),
GE
(
IID_IDirectMusicPerformance8
),
GE
(
IID_IDirectMusicPort
),
GE
(
IID_IDirectMusicPortDownload
),
GE
(
IID_IDirectMusicScript
),
GE
(
IID_IDirectMusicSegment
),
GE
(
IID_IDirectMusicSegment2
),
GE
(
IID_IDirectMusicSegment8
),
GE
(
IID_IDirectMusicSegmentState
),
GE
(
IID_IDirectMusicSegmentState8
),
GE
(
IID_IDirectMusicStyle
),
GE
(
IID_IDirectMusicStyle8
),
GE
(
IID_IDirectMusicSynth
),
GE
(
IID_IDirectMusicSynth8
),
GE
(
IID_IDirectMusicSynthSink
),
GE
(
IID_IDirectMusicThru
),
GE
(
IID_IDirectMusicTool
),
GE
(
IID_IDirectMusicTool8
),
GE
(
IID_IDirectMusicTrack
),
GE
(
IID_IDirectMusicTrack8
),
GE
(
IID_IUnknown
),
GE
(
IID_IPersistStream
),
GE
(
IID_IStream
),
GE
(
IID_IClassFactory
),
/* GUIDs */
GE
(
GUID_DirectMusicAllTypes
),
GE
(
GUID_NOTIFICATION_CHORD
),
GE
(
GUID_NOTIFICATION_COMMAND
),
GE
(
GUID_NOTIFICATION_MEASUREANDBEAT
),
GE
(
GUID_NOTIFICATION_PERFORMANCE
),
GE
(
GUID_NOTIFICATION_RECOMPOSE
),
GE
(
GUID_NOTIFICATION_SEGMENT
),
GE
(
GUID_BandParam
),
GE
(
GUID_ChordParam
),
GE
(
GUID_CommandParam
),
GE
(
GUID_CommandParam2
),
GE
(
GUID_CommandParamNext
),
GE
(
GUID_IDirectMusicBand
),
GE
(
GUID_IDirectMusicChordMap
),
GE
(
GUID_IDirectMusicStyle
),
GE
(
GUID_MuteParam
),
GE
(
GUID_Play_Marker
),
GE
(
GUID_RhythmParam
),
GE
(
GUID_TempoParam
),
GE
(
GUID_TimeSignature
),
GE
(
GUID_Valid_Start_Time
),
GE
(
GUID_Clear_All_Bands
),
GE
(
GUID_ConnectToDLSCollection
),
GE
(
GUID_Disable_Auto_Download
),
GE
(
GUID_DisableTempo
),
GE
(
GUID_DisableTimeSig
),
GE
(
GUID_Download
),
GE
(
GUID_DownloadToAudioPath
),
GE
(
GUID_Enable_Auto_Download
),
GE
(
GUID_EnableTempo
),
GE
(
GUID_EnableTimeSig
),
GE
(
GUID_IgnoreBankSelectForGM
),
GE
(
GUID_SeedVariations
),
GE
(
GUID_StandardMIDIFile
),
GE
(
GUID_Unload
),
GE
(
GUID_UnloadFromAudioPath
),
GE
(
GUID_Variations
),
GE
(
GUID_PerfMasterTempo
),
GE
(
GUID_PerfMasterVolume
),
GE
(
GUID_PerfMasterGrooveLevel
),
GE
(
GUID_PerfAutoDownload
),
GE
(
GUID_DefaultGMCollection
),
GE
(
GUID_Synth_Default
),
GE
(
GUID_Buffer_Reverb
),
GE
(
GUID_Buffer_EnvReverb
),
GE
(
GUID_Buffer_Stereo
),
GE
(
GUID_Buffer_3D_Dry
),
GE
(
GUID_Buffer_Mono
),
GE
(
GUID_DMUS_PROP_GM_Hardware
),
GE
(
GUID_DMUS_PROP_GS_Capable
),
GE
(
GUID_DMUS_PROP_GS_Hardware
),
GE
(
GUID_DMUS_PROP_DLS1
),
GE
(
GUID_DMUS_PROP_DLS2
),
GE
(
GUID_DMUS_PROP_Effects
),
GE
(
GUID_DMUS_PROP_INSTRUMENT2
),
GE
(
GUID_DMUS_PROP_LegacyCaps
),
GE
(
GUID_DMUS_PROP_MemorySize
),
GE
(
GUID_DMUS_PROP_SampleMemorySize
),
GE
(
GUID_DMUS_PROP_SamplePlaybackRate
),
GE
(
GUID_DMUS_PROP_SetSynthSink
),
GE
(
GUID_DMUS_PROP_SinkUsesDSound
),
GE
(
GUID_DMUS_PROP_SynthSink_DSOUND
),
GE
(
GUID_DMUS_PROP_SynthSink_WAVE
),
GE
(
GUID_DMUS_PROP_Volume
),
GE
(
GUID_DMUS_PROP_WavesReverb
),
GE
(
GUID_DMUS_PROP_WriteLatency
),
GE
(
GUID_DMUS_PROP_WritePeriod
),
GE
(
GUID_DMUS_PROP_XG_Capable
),
GE
(
GUID_DMUS_PROP_XG_Hardware
)
};
unsigned
int
i
;
if
(
!
id
)
return
"(null)"
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
guids
);
i
++
)
{
if
(
IsEqualGUID
(
id
,
guids
[
i
].
guid
))
return
guids
[
i
].
name
;
}
/* if we didn't find it, act like standard debugstr_guid */
return
debugstr_guid
(
id
);
}
/* generic flag-dumping function */
static
const
char
*
debugstr_flags
(
DWORD
flags
,
const
flag_info
*
names
,
size_t
num_names
){
static
char
buffer
[
128
]
=
""
,
*
ptr
=
&
buffer
[
0
];
unsigned
int
i
;
int
size
=
sizeof
(
buffer
);
for
(
i
=
0
;
i
<
num_names
;
i
++
)
{
if
((
flags
&
names
[
i
].
val
))
{
int
cnt
=
snprintf
(
ptr
,
size
,
"%s "
,
names
[
i
].
name
);
if
(
cnt
<
0
||
cnt
>=
size
)
break
;
size
-=
cnt
;
ptr
+=
cnt
;
}
}
ptr
=
&
buffer
[
0
];
return
ptr
;
}
/* dump DMUS_OBJ flags */
static
const
char
*
debugstr_DMUS_OBJ_FLAGS
(
DWORD
flagmask
)
{
static
const
flag_info
flags
[]
=
{
FE
(
DMUS_OBJ_OBJECT
),
FE
(
DMUS_OBJ_CLASS
),
FE
(
DMUS_OBJ_NAME
),
FE
(
DMUS_OBJ_CATEGORY
),
FE
(
DMUS_OBJ_FILENAME
),
FE
(
DMUS_OBJ_FULLPATH
),
FE
(
DMUS_OBJ_URL
),
FE
(
DMUS_OBJ_VERSION
),
FE
(
DMUS_OBJ_DATE
),
FE
(
DMUS_OBJ_LOADED
),
FE
(
DMUS_OBJ_MEMORY
),
FE
(
DMUS_OBJ_STREAM
)
};
return
debugstr_flags
(
flagmask
,
flags
,
ARRAY_SIZE
(
flags
));
}
void
dump_DMUS_OBJECTDESC
(
DMUS_OBJECTDESC
*
pDesc
)
{
if
(
!
TRACE_ON
(
dmime
))
return
;
if
(
pDesc
)
{
TRACE_
(
dmime
)(
"DMUS_OBJECTDESC (%p):"
,
pDesc
);
TRACE_
(
dmime
)(
" - dwSize = 0x%08X
\n
"
,
pDesc
->
dwSize
);
TRACE_
(
dmime
)(
" - dwValidData = 0x%08X ( %s)
\n
"
,
pDesc
->
dwValidData
,
debugstr_DMUS_OBJ_FLAGS
(
pDesc
->
dwValidData
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_CLASS
)
TRACE_
(
dmime
)(
" - guidClass = %s
\n
"
,
debugstr_dmguid
(
&
pDesc
->
guidClass
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_OBJECT
)
TRACE_
(
dmime
)(
" - guidObject = %s
\n
"
,
debugstr_guid
(
&
pDesc
->
guidObject
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_DATE
)
TRACE_
(
dmime
)(
" - ftDate = %s
\n
"
,
debugstr_filetime
(
&
pDesc
->
ftDate
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_VERSION
)
TRACE_
(
dmime
)(
" - vVersion = %s
\n
"
,
debugstr_dmversion
(
&
pDesc
->
vVersion
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_NAME
)
TRACE_
(
dmime
)(
" - wszName = %s
\n
"
,
debugstr_w
(
pDesc
->
wszName
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_CATEGORY
)
TRACE_
(
dmime
)(
" - wszCategory = %s
\n
"
,
debugstr_w
(
pDesc
->
wszCategory
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_FILENAME
)
TRACE_
(
dmime
)(
" - wszFileName = %s
\n
"
,
debugstr_w
(
pDesc
->
wszFileName
));
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_MEMORY
)
TRACE_
(
dmime
)(
" - llMemLength = 0x%s - pbMemData = %p
\n
"
,
wine_dbgstr_longlong
(
pDesc
->
llMemLength
),
pDesc
->
pbMemData
);
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_STREAM
)
TRACE_
(
dmime
)(
" - pStream = %p
\n
"
,
pDesc
->
pStream
);
}
}
dlls/dmstyle/dmutils.h
View file @
bcd88ea3
...
...
@@ -34,30 +34,4 @@ extern HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_C
extern
HRESULT
IDirectMusicUtils_IPersistStream_ParseUNFOGeneric
(
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
LPDMUS_OBJECTDESC
pDesc
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IDirectMusicUtils_IPersistStream_ParseReference
(
LPPERSISTSTREAM
iface
,
DMUS_PRIVATE_CHUNK
*
pChunk
,
IStream
*
pStm
,
IDirectMusicObject
**
ppObject
)
DECLSPEC_HIDDEN
;
/**
* Debug utilities
*/
/* used for generic dumping (copied from ddraw) */
typedef
struct
{
DWORD
val
;
const
char
*
name
;
}
flag_info
;
typedef
struct
{
const
GUID
*
guid
;
const
char
*
name
;
}
guid_info
;
/* used for initialising structs */
#define FE(x) { x, #x }
#define GE(x) { &x, #x }
/* FOURCC to string conversion for debug messages */
extern
const
char
*
debugstr_fourcc
(
DWORD
fourcc
)
DECLSPEC_HIDDEN
;
/* returns name of given GUID */
extern
const
char
*
debugstr_dmguid
(
const
GUID
*
id
)
DECLSPEC_HIDDEN
;
/* dump whole DMUS_OBJECTDESC struct */
extern
void
dump_DMUS_OBJECTDESC
(
DMUS_OBJECTDESC
*
pDesc
)
DECLSPEC_HIDDEN
;
#endif
/* __WINE_DMUTILS_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment