Get rid of the ICOM_CALL macros.
[wine] / include / dmusici.h
1 /*
2  *  DirectMusic Performance API
3  *
4  *  Copyright (C) 2003 Rok Mandeljc
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU Library General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __WINE_DMUSIC_PERFORMANCE_H
22 #define __WINE_DMUSIC_PERFORMANCE_H
23
24 #include "objbase.h"
25 #include "mmsystem.h"
26
27 #include "oleauto.h"
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34 /*****************************************************************************
35  * Types
36  */
37 typedef WORD            TRANSITION_TYPE;
38 /* Already defined somewhere? */
39 /* typedef __int64         REFERENCE_TIME; */
40 typedef long            MUSIC_TIME;
41
42 /*****************************************************************************
43  * Predeclare the interfaces
44  */
45 DEFINE_GUID(CLSID_DirectMusicPerformance,                                       0xd2ac2881,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
46 DEFINE_GUID(CLSID_DirectMusicSegment,                                           0xd2ac2882,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
47 DEFINE_GUID(CLSID_DirectMusicSegmentState,                                      0xd2ac2883,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
48 DEFINE_GUID(CLSID_DirectMusicGraph,                                                     0xd2ac2884,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
49 DEFINE_GUID(CLSID_DirectMusicStyle,                                                     0xd2ac288a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
50 DEFINE_GUID(CLSID_DirectMusicChordMap,                                          0xd2ac288f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
51 DEFINE_GUID(CLSID_DirectMusicComposer,                                          0xd2ac2890,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
52 DEFINE_GUID(CLSID_DirectMusicLoader,                                            0xd2ac2892,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
53 DEFINE_GUID(CLSID_DirectMusicBand,                                                      0x79ba9e00,0xb6ee,0x11d1,0x86,0xbe,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
54 DEFINE_GUID(CLSID_DirectMusicPatternTrack,                                      0xd2ac2897,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
55 DEFINE_GUID(CLSID_DirectMusicScript,                                            0x810b5013,0xe88d,0x11d2,0x8b,0xc1,0x0,0x60,0x8,0x93,0xb1,0xb6);
56 DEFINE_GUID(CLSID_DirectMusicContainer,                                         0x9301e380,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47);
57 DEFINE_GUID(CLSID_DirectSoundWave,                                                      0x8a667154,0xf9cb,0x11d2,0xad,0x8a,0x0,0x60,0xb0,0x57,0x5a,0xbc);
58 DEFINE_GUID(CLSID_DirectMusicSong,                                                      0xaed5f0a5,0xd972,0x483d,0xa3,0x84,0x64,0x9d,0xfe,0xb9,0xc1,0x81);
59 DEFINE_GUID(CLSID_DirectMusicAudioPathConfig,                           0xee0b9ca0,0xa81e,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
60
61 DEFINE_GUID(IID_IDirectMusicLoader,                                                     0x2ffaaca2,0x5dca,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
62 typedef struct IDirectMusicLoader IDirectMusicLoader, *LPDIRECTMUSICLOADER, *LPDMUS_LOADER;
63 DEFINE_GUID(IID_IDirectMusicGetLoader,                                          0x68a04844,0xd13d,0x11d1,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
64 #define IID_IDirectMusicGetLoader8 IID_IDirectMusicGetLoader
65 typedef struct IDirectMusicGetLoader IDirectMusicGetLoader, *LPDIRECTMUSICGETLOADER, IDirectMusicGetLoader8, *LPDIRECTMUSICGETLOADER8;
66 DEFINE_GUID(IID_IDirectMusicObject,                                                     0xd2ac28b5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
67 #define IID_IDirectMusicObject8 IID_IDirectMusicObject
68 typedef struct IDirectMusicObject IDirectMusicObject, *LPDIRECTMUSICOBJECT, IDirectMusicObject8, *LPDIRECTMUSICOBJECT8, *LPDMUS_OBJECT;
69 DEFINE_GUID(IID_IDirectMusicSegment,                                            0xf96029a2,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
70 typedef struct IDirectMusicSegment IDirectMusicSegment, *LPDIRECTMUSICSEGMENT;
71 DEFINE_GUID(IID_IDirectMusicSegmentState,                                       0xa3afdcc7,0xd3ee,0x11d1,0xbc,0x8d,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
72 typedef struct IDirectMusicSegmentState IDirectMusicSegmentState, *LPDIRECTMUSICSEGMENTSTATE;
73 DEFINE_GUID(IID_IDirectMusicPerformance,                                        0x7d43d03,0x6523,0x11d2,0x87,0x1d,0x0,0x60,0x8,0x93,0xb1,0xbd);
74 typedef struct IDirectMusicPerformance IDirectMusicPerformance, *LPDIRECTMUSICPERFORMANCE;
75 DEFINE_GUID(IID_IDirectMusicGraph,                                                      0x2befc277,0x5497,0x11d2,0xbc,0xcb,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
76 #define IID_IDirectMusicGraph8 IID_IDirectMusicGraph
77 typedef struct IDirectMusicGraph IDirectMusicGraph, *LPDIRECTMUSICGRAPH, IDirectMusicGraph8, *LPDIRECTMUSICGRAPH8;
78 DEFINE_GUID(IID_IDirectMusicStyle,                                                      0xd2ac28bd,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
79 typedef struct IDirectMusicStyle IDirectMusicStyle, *LPDIRECTMUSICSTYLE;
80 DEFINE_GUID(IID_IDirectMusicChordMap,                                           0xd2ac28be,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
81 #define IID_IDirectMusicChordMap8 IID_IDirectMusicChordMap
82 typedef struct IDirectMusicChordMap IDirectMusicChordMap, *LPDIRECTMUSICCHORDMAP, IDirectMusicChordMap8, *LPDIRECTMUSICCHORDMAP8;
83 DEFINE_GUID(IID_IDirectMusicComposer,                                           0xd2ac28bf,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
84 #define IID_IDirectMusicComposer8 IID_IDirectMusicComposer
85 typedef struct IDirectMusicComposer IDirectMusicComposer, *LPDIRECTMUSICCOMPOSER;
86 DEFINE_GUID(IID_IDirectMusicBand,                                                       0xd2ac28c0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
87 #define IID_IDirectMusicBand8 IID_IDirectMusicBand
88 typedef struct IDirectMusicBand IDirectMusicBand, *LPDIRECTMUSICBAND, IDirectMusicBand8, *LPDIRECTMUSICBAND8, *LPDMUS_BAND;
89 DEFINE_GUID(IID_IDirectMusicPerformance2,                                       0x6fc2cae0,0xbc78,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
90 typedef struct IDirectMusicPerformance2 IDirectMusicPerformance2, *LPDIRECTMUSICPERFORMANCE2;
91 DEFINE_GUID(IID_IDirectMusicSegment2,                                           0xd38894d1,0xc052,0x11d2,0x87,0x2f,0x0,0x60,0x8,0x93,0xb1,0xbd);
92 typedef struct IDirectMusicSegment2 IDirectMusicSegment2, *LPDIRECTMUSICSEGMENT2;
93 DEFINE_GUID(IID_IDirectMusicLoader8,                                            0x19e7c08c,0xa44,0x4e6a,0xa1,0x16,0x59,0x5a,0x7c,0xd5,0xde,0x8c);
94 typedef struct IDirectMusicLoader8 IDirectMusicLoader8, *LPDIRECTMUSICLOADER8;
95 DEFINE_GUID(IID_IDirectMusicPerformance8,                                       0x679c4137,0xc62e,0x4147,0xb2,0xb4,0x9d,0x56,0x9a,0xcb,0x25,0x4c);
96 typedef struct IDirectMusicPerformance8 IDirectMusicPerformance8, *LPDIRECTMUSICPERFORMANCE8;
97 DEFINE_GUID(IID_IDirectMusicSegment8,                                           0xc6784488,0x41a3,0x418f,0xaa,0x15,0xb3,0x50,0x93,0xba,0x42,0xd4);
98 typedef struct IDirectMusicSegment8 IDirectMusicSegment8, *LPDIRECTMUSICSEGMENT8;
99 DEFINE_GUID(IID_IDirectMusicSegmentState8,                                      0xa50e4730,0xae4,0x48a7,0x98,0x39,0xbc,0x4,0xbf,0xe0,0x77,0x72);
100 typedef struct IDirectMusicSegmentState8 IDirectMusicSegmentState8, *LPDIRECTMUSICSEGMENTSTATE8;
101 DEFINE_GUID(IID_IDirectMusicStyle8,                                                     0xfd24ad8a,0xa260,0x453d,0xbf,0x50,0x6f,0x93,0x84,0xf7,0x9,0x85);
102 typedef struct IDirectMusicStyle8 IDirectMusicStyle8, *LPDIRECTMUSICSTYLE8;
103 DEFINE_GUID(IID_IDirectMusicPatternTrack,                                       0x51c22e10,0xb49f,0x46fc,0xbe,0xc2,0xe6,0x28,0x8f,0xb9,0xed,0xe6);
104 #define IID_IDirectMusicPatternTrack8 IID_IDirectMusicPatternTrack
105 typedef struct IDirectMusicPatternTrack IDirectMusicPatternTrack, *LPDIRECTMUSICPATTERNTRACK, IDirectMusicPatternTrack8, *LPDIRECTMUSICPATTERNTRACK8;
106 DEFINE_GUID(IID_IDirectMusicScript,                                                     0x2252373a,0x5814,0x489b,0x82,0x9,0x31,0xfe,0xde,0xba,0xf1,0x37);
107 #define IID_IDirectMusicScript8 IID_IDirectMusicScript
108 typedef struct IDirectMusicScript IDirectMusicScript, *LPDIRECTMUSICSCRIPT, IDirectMusicScript8, *LPDIRECTMUSICSCRIPT8;
109 DEFINE_GUID(IID_IDirectMusicContainer,                                          0x9301e386,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47);
110 #define IID_IDirectMusicContainer8 IID_IDirectMusicContainer
111 typedef struct IDirectMusicContainer IDirectMusicContainer, *LPDIRECTMUSICCONTAINER, IDirectMusicContainer8, *LPDIRECTMUSICCONTAINER8;
112 DEFINE_GUID(IID_IDirectMusicSong,                                                       0xa862b2ec,0x3676,0x4982,0x85,0xa,0x78,0x42,0x77,0x5e,0x1d,0x86);
113 #define IID_IDirectMusicSong8 IID_IDirectMusicSong
114 typedef struct IDirectMusicSong IDirectMusicSong, *LPDIRECTMUSICSONG, IDirectMusicSong8, *LPDIRECTMUSICSONG8;
115 DEFINE_GUID(IID_IDirectMusicAudioPath,                                          0xc87631f5,0x23be,0x4986,0x88,0x36,0x5,0x83,0x2f,0xcc,0x48,0xf9);
116 #define IID_IDirectMusicAudioPath8 IID_IDirectMusicAudioPath
117 typedef struct IDirectMusicAudioPath IDirectMusicAudioPath, *LPDIRECTMUSICAUDIOPATH, IDirectMusicAudioPath8, *LPDIRECTMUSICAUDIOPATH8;
118
119 /* Imported from dmplugin.h */
120 typedef struct IDirectMusicTrack IDirectMusicTrack, *LPDIRECTMUSICTRACK;
121 typedef struct IDirectMusicTool IDirectMusicTool, *LPDIRECTMUSICTOOL;
122 typedef struct IDirectMusicTool8 IDirectMusicTool8, *LPDIRECTMUSICTOOL8;
123 typedef struct IDirectMusicTrack8 IDirectMusicTrack8, *LPDIRECTMUSICTRACK8;
124
125 DEFINE_GUID(GUID_DirectMusicAllTypes,                                           0xd2ac2893,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
126
127 DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,                                          0xd2ac2899,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
128 DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,                                      0x81f75bc5,0x4e5d,0x11d2,0xbc,0xc7,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
129 DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,                           0xd2ac289a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
130 DEFINE_GUID(GUID_NOTIFICATION_CHORD,                                            0xd2ac289b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
131 DEFINE_GUID(GUID_NOTIFICATION_COMMAND,                                          0xd2ac289c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
132 DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE,                                        0xd348372b,0x945b,0x45ae,0xa5,0x22,0x45,0xf,0x12,0x5b,0x84,0xa5);
133
134 DEFINE_GUID(GUID_CommandParam,                                                          0xd2ac289d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
135 DEFINE_GUID(GUID_CommandParam2,                                                         0x28f97ef7,0x9538,0x11d2,0x97,0xa9,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
136 DEFINE_GUID(GUID_CommandParamNext,                                                      0x472afe7a,0x281b,0x11d3,0x81,0x7d,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
137 DEFINE_GUID(GUID_ChordParam,                                                            0xd2ac289e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
138 DEFINE_GUID(GUID_RhythmParam,                                                           0xd2ac289f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
139 DEFINE_GUID(GUID_IDirectMusicStyle,                                                     0xd2ac28a1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
140 DEFINE_GUID(GUID_TimeSignature,                                                         0xd2ac28a4,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
141 DEFINE_GUID(GUID_TempoParam,                                                            0xd2ac28a5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
142 DEFINE_GUID(GUID_Valid_Start_Time,                                                      0x7f6b1760,0x1fdb,0x11d3,0x82,0x26,0x44,0x45,0x53,0x54,0x0,0x0);
143 DEFINE_GUID(GUID_Play_Marker,                                                           0xd8761a41,0x801a,0x11d3,0x9b,0xd1,0xda,0xf7,0xe1,0xc3,0xd8,0x34);
144 DEFINE_GUID(GUID_BandParam,                                                                     0x2bb1938,0xcb8b,0x11d2,0x8b,0xb9,0x0,0x60,0x8,0x93,0xb1,0xb6);
145 DEFINE_GUID(GUID_IDirectMusicBand,                                                      0xd2ac28ac,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
146 DEFINE_GUID(GUID_IDirectMusicChordMap,                                          0xd2ac28ad,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
147 DEFINE_GUID(GUID_MuteParam,                                                                     0xd2ac28af,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
148
149 DEFINE_GUID(GUID_Download,                                                                      0xd2ac28a7,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
150 DEFINE_GUID(GUID_Unload,                                                                        0xd2ac28a8,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
151 DEFINE_GUID(GUID_ConnectToDLSCollection,                                        0x1db1ae6b,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
152 DEFINE_GUID(GUID_Enable_Auto_Download,                                          0xd2ac28a9,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
153 DEFINE_GUID(GUID_Disable_Auto_Download,                                         0xd2ac28aa,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
154 DEFINE_GUID(GUID_Clear_All_Bands,                                                       0xd2ac28ab,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
155 DEFINE_GUID(GUID_StandardMIDIFile,                                                      0x6621075,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
156 #define GUID_IgnoreBankSelectForGM      GUID_StandardMIDIFile
157
158 DEFINE_GUID(GUID_DisableTimeSig,                                                        0x45fc707b,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
159 DEFINE_GUID(GUID_EnableTimeSig,                                                         0x45fc707c,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
160 DEFINE_GUID(GUID_DisableTempo,                                                          0x45fc707d,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
161 DEFINE_GUID(GUID_EnableTempo,                                                           0x45fc707e,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
162
163 DEFINE_GUID(GUID_SeedVariations,                                                        0x65b76fa5,0xff37,0x11d2,0x81,0x4e,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
164 DEFINE_GUID(GUID_MelodyFragment,                                                        0xb291c7f2,0xb616,0x11d2,0x97,0xfa,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
165 DEFINE_GUID(GUID_Clear_All_MelodyFragments,                                     0x8509fee6,0xb617,0x11d2,0x97,0xfa,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
166 DEFINE_GUID(GUID_Variations,                                                            0x11f72cce,0x26e6,0x4ecd,0xaf,0x2e,0xd6,0x68,0xe6,0x67,0x7,0xd8);
167 DEFINE_GUID(GUID_DownloadToAudioPath,                                           0x9f2c0341,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x0,0x0);
168 DEFINE_GUID(GUID_UnloadFromAudioPath,                                           0x9f2c0342,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x0,0x0);
169
170 DEFINE_GUID(GUID_PerfMasterTempo,                                                       0xd2ac28b0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
171 DEFINE_GUID(GUID_PerfMasterVolume,                                                      0xd2ac28b1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
172 DEFINE_GUID(GUID_PerfMasterGrooveLevel,                                         0xd2ac28b2,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
173 DEFINE_GUID(GUID_PerfAutoDownload,                                                      0xfb09565b,0x3631,0x11d2,0xbc,0xb8,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
174
175 DEFINE_GUID(GUID_DefaultGMCollection,                                           0xf17e8673,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
176
177 DEFINE_GUID(GUID_Synth_Default,                                                         0x26bb9432,0x45fe,0x48d3,0xa3,0x75,0x24,0x72,0xc5,0xe3,0xe7,0x86);
178
179 DEFINE_GUID(GUID_Buffer_Reverb,                                                         0x186cc541,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
180 DEFINE_GUID(GUID_Buffer_EnvReverb,                                                      0x186cc542,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
181 DEFINE_GUID(GUID_Buffer_Stereo,                                                         0x186cc545,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
182 DEFINE_GUID(GUID_Buffer_3D_Dry,                                                         0x186cc546,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
183 DEFINE_GUID(GUID_Buffer_Mono,                                                           0x186cc547,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
184
185
186 /*****************************************************************************
187  * Definitions
188  */
189 #define MT_MIN          0x80000000
190 #define MT_MAX          0x7FFFFFFF
191
192 #define DMUS_PPQ        768
193
194 #define DMUS_PMSG_PART \
195     DWORD               dwSize; \
196     REFERENCE_TIME      rtTime; \
197     MUSIC_TIME          mtTime; \
198     DWORD               dwFlags; \
199     DWORD               dwPChannel; \
200     DWORD               dwVirtualTrackID; \
201     IDirectMusicTool*   pTool; \
202     IDirectMusicGraph*  pGraph; \
203     DWORD               dwType; \
204     DWORD               dwVoiceID; \
205     DWORD               dwGroupID; \
206     IUnknown*           punkUser;
207
208 #define DMUS_PCHANNEL_BROADCAST_PERFORMANCE     0xFFFFFFFF
209 #define DMUS_PCHANNEL_BROADCAST_AUDIOPATH   0xFFFFFFFE
210 #define DMUS_PCHANNEL_BROADCAST_SEGMENT     0xFFFFFFFD
211 #define DMUS_PCHANNEL_BROADCAST_GROUPS          0xFFFFFFFC
212 #define DMUS_PCHANNEL_ALL           0xFFFFFFFB
213
214 #define DMUS_PATH_SEGMENT          0x1000
215 #define DMUS_PATH_SEGMENT_TRACK    0x1100
216 #define DMUS_PATH_SEGMENT_GRAPH    0x1200
217 #define DMUS_PATH_SEGMENT_TOOL     0x1300
218 #define DMUS_PATH_AUDIOPATH        0x2000
219 #define DMUS_PATH_AUDIOPATH_GRAPH  0x2200
220 #define DMUS_PATH_AUDIOPATH_TOOL   0x2300
221 #define DMUS_PATH_PERFORMANCE      0x3000
222 #define DMUS_PATH_PERFORMANCE_GRAPH 0x3200
223 #define DMUS_PATH_PERFORMANCE_TOOL 0x3300
224 #define DMUS_PATH_PORT             0x4000
225 #define DMUS_PATH_BUFFER           0x6000
226 #define DMUS_PATH_BUFFER_DMO       0x6100
227 #define DMUS_PATH_MIXIN_BUFFER     0x7000
228 #define DMUS_PATH_MIXIN_BUFFER_DMO 0x7100
229 #define DMUS_PATH_PRIMARY_BUFFER   0x8000
230
231 #define DMUS_APATH_SHARED_STEREOPLUSREVERB   0x1
232 #define DMUS_APATH_DYNAMIC_3D                0x6
233 #define DMUS_APATH_DYNAMIC_MONO              0x7
234 #define DMUS_APATH_DYNAMIC_STEREO            0x8
235
236 #define DMUS_AUDIOF_3D          0x1
237 #define DMUS_AUDIOF_ENVIRON     0x2
238 #define DMUS_AUDIOF_EAX         0x4
239 #define DMUS_AUDIOF_DMOS        0x8
240 #define DMUS_AUDIOF_STREAMING   0x10
241 #define DMUS_AUDIOF_BUFFERS     0x20
242 #define DMUS_AUDIOF_ALL         0x3F
243
244 #define DMUS_AUDIOPARAMS_FEATURES       0x00000001
245 #define DMUS_AUDIOPARAMS_VOICES         0x00000002
246 #define DMUS_AUDIOPARAMS_SAMPLERATE     0x00000004
247 #define DMUS_AUDIOPARAMS_DEFAULTSYNTH   0x00000008
248
249 #define DMUS_SEG_REPEAT_INFINITE    0xFFFFFFFF
250 #define DMUS_SEG_ALLTRACKS          0x80000000
251 #define DMUS_SEG_ANYTRACK           0x80000000
252
253 #define DMUS_MAXSUBCHORD 8
254
255 #define DMUS_PLAYMODE_FIXED             0
256 #define DMUS_PLAYMODE_FIXEDTOKEY        DMUS_PLAYMODE_KEY_ROOT
257 #define DMUS_PLAYMODE_FIXEDTOCHORD      DMUS_PLAYMODE_CHORD_ROOT
258 #define DMUS_PLAYMODE_PEDALPOINT        (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
259 #define DMUS_PLAYMODE_MELODIC           (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
260 #define DMUS_PLAYMODE_NORMALCHORD       (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
261 #define DMUS_PLAYMODE_ALWAYSPLAY        (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD)
262 #define DMUS_PLAYMODE_PEDALPOINTCHORD   (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
263 #define DMUS_PLAYMODE_PEDALPOINTALWAYS  (DMUS_PLAYMODE_PEDALPOINT | DMUS_PLAYMODE_PEDALPOINTCHORD)
264 #define DMUS_PLAYMODE_PURPLEIZED        DMUS_PLAYMODE_ALWAYSPLAY
265 #define DMUS_PLAYMODE_SCALE_ROOT        DMUS_PLAYMODE_KEY_ROOT
266 #define DMUS_PLAYMODE_FIXEDTOSCALE      DMUS_PLAYMODE_FIXEDTOKEY
267
268 #define DMUS_TEMPO_MAX          1000
269 #define DMUS_TEMPO_MIN          1
270
271 #define DMUS_MASTERTEMPO_MAX    100.0f
272 #define DMUS_MASTERTEMPO_MIN    0.01f
273
274 #define DMUS_CURVET_PBCURVE             0x03
275 #define DMUS_CURVET_CCCURVE             0x04
276 #define DMUS_CURVET_MATCURVE    0x05
277 #define DMUS_CURVET_PATCURVE    0x06
278 #define DMUS_CURVET_RPNCURVE    0x07
279 #define DMUS_CURVET_NRPNCURVE   0x08
280
281 #define DMUS_NOTIFICATION_SEGSTART       0x0
282 #define DMUS_NOTIFICATION_SEGEND         0x1
283 #define DMUS_NOTIFICATION_SEGALMOSTEND   0x2
284 #define DMUS_NOTIFICATION_SEGLOOP        0x3
285 #define DMUS_NOTIFICATION_SEGABORT       0x4
286
287 #define DMUS_NOTIFICATION_MUSICSTARTED   0x0
288 #define DMUS_NOTIFICATION_MUSICSTOPPED   0x1
289 #define DMUS_NOTIFICATION_MUSICALMOSTEND 0x2
290
291 #define DMUS_NOTIFICATION_MEASUREBEAT    0x0
292
293 #define DMUS_NOTIFICATION_CHORD          0x0
294
295 #define DMUS_NOTIFICATION_GROOVE         0x0
296 #define DMUS_NOTIFICATION_EMBELLISHMENT  0x1
297
298 #define DMUS_NOTIFICATION_RECOMPOSE      0x0
299
300 #define DMUS_WAVEF_OFF           0x1
301 #define DMUS_WAVEF_STREAMING     0x2
302 #define DMUS_WAVEF_NOINVALIDATE  0x4
303 #define DMUS_WAVEF_NOPREROLL     0x8
304
305 #define DMUS_MAX_NAME           0x40
306 #define DMUS_MAX_CATEGORY       0x40
307 #define DMUS_MAX_FILENAME       MAX_PATH
308
309 #define DMUS_OBJ_OBJECT         0x001
310 #define DMUS_OBJ_CLASS          0x002
311 #define DMUS_OBJ_NAME           0x004
312 #define DMUS_OBJ_CATEGORY       0x008
313 #define DMUS_OBJ_FILENAME       0x010
314 #define DMUS_OBJ_FULLPATH       0x020
315 #define DMUS_OBJ_URL            0x040
316 #define DMUS_OBJ_VERSION        0x080
317 #define DMUS_OBJ_DATE           0x100
318 #define DMUS_OBJ_LOADED         0x200
319 #define DMUS_OBJ_MEMORY         0x400
320 #define DMUS_OBJ_STREAM         0x800
321
322 #define DMUS_TRACKCONFIG_OVERRIDE_ALL           0x00001
323 #define DMUS_TRACKCONFIG_OVERRIDE_PRIMARY       0x00002
324 #define DMUS_TRACKCONFIG_FALLBACK               0x00004
325 #define DMUS_TRACKCONFIG_CONTROL_ENABLED        0x00008
326 #define DMUS_TRACKCONFIG_PLAY_ENABLED           0x00010
327 #define DMUS_TRACKCONFIG_NOTIFICATION_ENABLED   0x00020
328 #define DMUS_TRACKCONFIG_PLAY_CLOCKTIME         0x00040
329 #define DMUS_TRACKCONFIG_PLAY_COMPOSE           0x00080
330 #define DMUS_TRACKCONFIG_LOOP_COMPOSE           0x00100
331 #define DMUS_TRACKCONFIG_COMPOSING              0x00200
332 #define DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART    0x00400
333 #define DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT  0x00800
334 #define DMUS_TRACKCONFIG_TRANS1_TOSEGSTART      0x01000
335 #define DMUS_TRACKCONFIG_CONTROL_PLAY           0x10000
336 #define DMUS_TRACKCONFIG_CONTROL_NOTIFICATION   0x20000
337 #define DMUS_TRACKCONFIG_DEFAULT    (DMUS_TRACKCONFIG_CONTROL_ENABLED | DMUS_TRACKCONFIG_PLAY_ENABLED | DMUS_TRACKCONFIG_NOTIFICATION_ENABLED)
338
339 #define DMUS_MAX_FRAGMENTLABEL 20
340
341 #define DMUS_FRAGMENTF_USE_REPEAT      0x1
342 #define DMUS_FRAGMENTF_REJECT_REPEAT   0x2
343 #define DMUS_FRAGMENTF_USE_LABEL       0x4
344
345 #define DMUS_CONNECTIONF_INTERVALS     0x2
346 #define DMUS_CONNECTIONF_OVERLAP       0x4
347
348 #define DMUSB_LOADED    0x1
349 #define DMUSB_DEFAULT   0x2
350
351 /*****************************************************************************
352  * Structures
353  */
354 typedef enum enumDMUS_STYLET_TYPES
355 {
356     DMUS_STYLET_PATTERN         = 0,
357     DMUS_STYLET_MOTIF           = 1,
358     DMUS_STYLET_FRAGMENT        = 2,
359 } DMUS_STYLET_TYPES;
360
361 typedef enum enumDMUS_COMMANDT_TYPES
362 {
363     DMUS_COMMANDT_GROOVE            = 0,
364     DMUS_COMMANDT_FILL              = 1,
365     DMUS_COMMANDT_INTRO             = 2,
366     DMUS_COMMANDT_BREAK             = 3,
367     DMUS_COMMANDT_END               = 4,
368     DMUS_COMMANDT_ENDANDINTRO       = 5
369 } DMUS_COMMANDT_TYPES;
370
371 typedef enum enumDMUS_SHAPET_TYPES
372 {
373     DMUS_SHAPET_FALLING             = 0,
374     DMUS_SHAPET_LEVEL               = 1,
375     DMUS_SHAPET_LOOPABLE            = 2,
376     DMUS_SHAPET_LOUD                = 3,
377     DMUS_SHAPET_QUIET               = 4,
378     DMUS_SHAPET_PEAKING             = 5,
379     DMUS_SHAPET_RANDOM              = 6,
380     DMUS_SHAPET_RISING              = 7,
381     DMUS_SHAPET_SONG                = 8
382 }   DMUS_SHAPET_TYPES;
383
384 typedef enum enumDMUS_COMPOSEF_FLAGS
385 {
386     DMUS_COMPOSEF_NONE                = 0x00000,
387     DMUS_COMPOSEF_ALIGN               = 0x00001,
388     DMUS_COMPOSEF_OVERLAP             = 0x00002,
389     DMUS_COMPOSEF_IMMEDIATE           = 0x00004,
390     DMUS_COMPOSEF_GRID                = 0x00008,
391     DMUS_COMPOSEF_BEAT                = 0x00010,
392     DMUS_COMPOSEF_MEASURE             = 0x00020,
393     DMUS_COMPOSEF_AFTERPREPARETIME    = 0x00040,
394     DMUS_COMPOSEF_VALID_START_BEAT    = 0x00080,
395     DMUS_COMPOSEF_VALID_START_GRID    = 0x00100,
396     DMUS_COMPOSEF_VALID_START_TICK    = 0x00200,
397     DMUS_COMPOSEF_SEGMENTEND          = 0x00400,
398     DMUS_COMPOSEF_MARKER              = 0x00800,
399     DMUS_COMPOSEF_MODULATE            = 0x01000,
400     DMUS_COMPOSEF_LONG                = 0x02000,
401     DMUS_COMPOSEF_ENTIRE_TRANSITION   = 0x04000,
402     DMUS_COMPOSEF_1BAR_TRANSITION     = 0x08000,
403     DMUS_COMPOSEF_ENTIRE_ADDITION     = 0x10000,
404     DMUS_COMPOSEF_1BAR_ADDITION       = 0x20000,
405     DMUS_COMPOSEF_VALID_START_MEASURE = 0x40000,
406     DMUS_COMPOSEF_DEFAULT             = 0x80000,
407     DMUS_COMPOSEF_NOINVALIDATE        = 0x100000,
408     DMUS_COMPOSEF_USE_AUDIOPATH       = 0x200000,
409     DMUS_COMPOSEF_INVALIDATE_PRI      = 0x400000
410 }   DMUS_COMPOSEF_FLAGS;
411
412 typedef struct _DMUS_PMSG
413 {
414     DMUS_PMSG_PART
415 } DMUS_PMSG;
416
417 typedef struct _DMUS_AUDIOPARAMS
418 {
419     DWORD   dwSize;
420     BOOL    fInitNow;
421     DWORD       dwValidData;
422     DWORD   dwFeatures;
423     DWORD   dwVoices;
424     DWORD   dwSampleRate;
425     CLSID   clsidDefaultSynth;
426 } DMUS_AUDIOPARAMS;
427
428 typedef enum enumDMUS_PMSGF_FLAGS
429 {
430     DMUS_PMSGF_REFTIME          = 0x01,
431     DMUS_PMSGF_MUSICTIME        = 0x02,
432     DMUS_PMSGF_TOOL_IMMEDIATE   = 0x04,
433     DMUS_PMSGF_TOOL_QUEUE       = 0x08,
434     DMUS_PMSGF_TOOL_ATTIME      = 0x10,
435     DMUS_PMSGF_TOOL_FLUSH       = 0x20,
436     DMUS_PMSGF_LOCKTOREFTIME    = 0x40,
437     DMUS_PMSGF_DX8              = 0x80
438 } DMUS_PMSGF_FLAGS;
439
440 typedef enum enumDMUS_PMSGT_TYPES
441 {
442     DMUS_PMSGT_MIDI             = 0,
443     DMUS_PMSGT_NOTE             = 1,
444     DMUS_PMSGT_SYSEX            = 2,
445     DMUS_PMSGT_NOTIFICATION     = 3,
446     DMUS_PMSGT_TEMPO            = 4,
447     DMUS_PMSGT_CURVE            = 5,
448     DMUS_PMSGT_TIMESIG          = 6,
449     DMUS_PMSGT_PATCH            = 7,
450     DMUS_PMSGT_TRANSPOSE        = 8,
451     DMUS_PMSGT_CHANNEL_PRIORITY = 9,
452     DMUS_PMSGT_STOP             = 10,
453     DMUS_PMSGT_DIRTY            = 11,
454     DMUS_PMSGT_WAVE             = 12,
455     DMUS_PMSGT_LYRIC            = 13,
456     DMUS_PMSGT_SCRIPTLYRIC      = 14,
457     DMUS_PMSGT_USER             = 255
458 } DMUS_PMSGT_TYPES;
459
460 typedef enum enumDMUS_SEGF_FLAGS
461 {
462     DMUS_SEGF_REFTIME             = 0x00000040,
463     DMUS_SEGF_SECONDARY           = 0x00000080,
464     DMUS_SEGF_QUEUE               = 0x00000100,
465     DMUS_SEGF_CONTROL             = 0x00000200,
466     DMUS_SEGF_AFTERPREPARETIME    = 0x00000400,
467     DMUS_SEGF_GRID                = 0x00000800,
468     DMUS_SEGF_BEAT                = 0x00001000,
469     DMUS_SEGF_MEASURE             = 0x00002000,
470     DMUS_SEGF_DEFAULT             = 0x00004000,
471     DMUS_SEGF_NOINVALIDATE        = 0x00008000,
472     DMUS_SEGF_ALIGN               = 0x00010000,
473     DMUS_SEGF_VALID_START_BEAT    = 0x00020000,
474     DMUS_SEGF_VALID_START_GRID    = 0x00040000,
475     DMUS_SEGF_VALID_START_TICK    = 0x00080000,
476     DMUS_SEGF_AUTOTRANSITION      = 0x00100000,
477     DMUS_SEGF_AFTERQUEUETIME      = 0x00200000,
478     DMUS_SEGF_AFTERLATENCYTIME    = 0x00400000,
479     DMUS_SEGF_SEGMENTEND          = 0x00800000,
480     DMUS_SEGF_MARKER              = 0x01000000,
481     DMUS_SEGF_TIMESIG_ALWAYS      = 0x02000000,
482     DMUS_SEGF_USE_AUDIOPATH       = 0x04000000,
483     DMUS_SEGF_VALID_START_MEASURE = 0x08000000,
484     DMUS_SEGF_INVALIDATE_PRI      = 0x10000000
485 } DMUS_SEGF_FLAGS;
486
487 typedef enum enumDMUS_TIME_RESOLVE_FLAGS
488 {
489     DMUS_TIME_RESOLVE_AFTERPREPARETIME  = DMUS_SEGF_AFTERPREPARETIME,
490     DMUS_TIME_RESOLVE_AFTERQUEUETIME    = DMUS_SEGF_AFTERQUEUETIME,
491     DMUS_TIME_RESOLVE_AFTERLATENCYTIME  = DMUS_SEGF_AFTERLATENCYTIME,
492     DMUS_TIME_RESOLVE_GRID              = DMUS_SEGF_GRID,
493     DMUS_TIME_RESOLVE_BEAT              = DMUS_SEGF_BEAT,
494     DMUS_TIME_RESOLVE_MEASURE           = DMUS_SEGF_MEASURE,
495     DMUS_TIME_RESOLVE_MARKER            = DMUS_SEGF_MARKER,
496     DMUS_TIME_RESOLVE_SEGMENTEND        = DMUS_SEGF_SEGMENTEND,
497 } DMUS_TIME_RESOLVE_FLAGS;
498
499 typedef enum enumDMUS_CHORDKEYF_FLAGS
500 {
501     DMUS_CHORDKEYF_SILENT = 1,
502 } DMUS_CHORDKEYF_FLAGS;
503
504 typedef struct _DMUS_SUBCHORD
505 {
506     DWORD   dwChordPattern;
507     DWORD   dwScalePattern;
508     DWORD   dwInversionPoints;
509     DWORD   dwLevels;
510     BYTE    bChordRoot;
511     BYTE    bScaleRoot;
512 } DMUS_SUBCHORD;
513
514 typedef struct _DMUS_CHORD_KEY
515 {
516     WCHAR           wszName[16];
517     WORD            wMeasure;
518     BYTE            bBeat;
519     BYTE            bSubChordCount;
520     DMUS_SUBCHORD   SubChordList[DMUS_MAXSUBCHORD];
521     DWORD           dwScale;
522     BYTE            bKey;
523     BYTE            bFlags;
524 } DMUS_CHORD_KEY;
525
526 typedef struct _DMUS_NOTE_PMSG
527 {
528     DMUS_PMSG_PART
529
530     MUSIC_TIME mtDuration;
531     WORD    wMusicValue;
532     WORD    wMeasure;
533     short   nOffset;
534     BYTE    bBeat;
535     BYTE    bGrid;
536     BYTE    bVelocity;
537     BYTE    bFlags;
538     BYTE    bTimeRange;
539     BYTE    bDurRange;
540     BYTE    bVelRange;
541     BYTE    bPlayModeFlags;
542     BYTE    bSubChordLevel;
543     BYTE    bMidiValue;
544     char    cTranspose;
545 } DMUS_NOTE_PMSG;
546
547 typedef enum enumDMUS_NOTEF_FLAGS
548 {
549     DMUS_NOTEF_NOTEON               = 0x01,
550     DMUS_NOTEF_NOINVALIDATE         = 0x02,
551     DMUS_NOTEF_NOINVALIDATE_INSCALE = 0x04,
552     DMUS_NOTEF_NOINVALIDATE_INCHORD = 0x08,
553     DMUS_NOTEF_REGENERATE           = 0x10,
554 } DMUS_NOTEF_FLAGS;
555
556 typedef enum enumDMUS_PLAYMODE_FLAGS
557 {
558     DMUS_PLAYMODE_KEY_ROOT          = 0x01,
559     DMUS_PLAYMODE_CHORD_ROOT        = 0x02,
560     DMUS_PLAYMODE_SCALE_INTERVALS   = 0x04,
561     DMUS_PLAYMODE_CHORD_INTERVALS   = 0x08,
562     DMUS_PLAYMODE_NONE              = 0x10,
563 } DMUS_PLAYMODE_FLAGS;
564
565 typedef struct _DMUS_MIDI_PMSG
566 {
567     DMUS_PMSG_PART
568
569     BYTE    bStatus;
570     BYTE    bByte1;
571     BYTE    bByte2;
572     BYTE    bPad[1];
573 } DMUS_MIDI_PMSG;
574
575 typedef struct _DMUS_PATCH_PMSG
576 {
577     DMUS_PMSG_PART
578
579     BYTE    byInstrument;
580     BYTE    byMSB;
581     BYTE    byLSB;
582     BYTE    byPad[1];
583 } DMUS_PATCH_PMSG;
584
585 typedef struct _DMUS_TRANSPOSE_PMSG
586 {
587     DMUS_PMSG_PART
588
589     short   nTranspose;
590     WORD    wMergeIndex;
591 } DMUS_TRANSPOSE_PMSG;
592
593 typedef struct _DMUS_CHANNEL_PRIORITY_PMSG
594 {
595     DMUS_PMSG_PART
596
597     DWORD   dwChannelPriority;
598 } DMUS_CHANNEL_PRIORITY_PMSG;
599
600 typedef struct _DMUS_TEMPO_PMSG
601 {
602     DMUS_PMSG_PART
603
604     double  dblTempo;
605 } DMUS_TEMPO_PMSG;
606
607 typedef struct _DMUS_SYSEX_PMSG
608 {
609     DMUS_PMSG_PART
610
611     DWORD   dwLen;
612     BYTE    abData[1];
613 } DMUS_SYSEX_PMSG;
614
615 typedef struct _DMUS_CURVE_PMSG
616 {
617     DMUS_PMSG_PART
618
619     MUSIC_TIME      mtDuration;
620     MUSIC_TIME      mtOriginalStart;
621     MUSIC_TIME      mtResetDuration;
622     short           nStartValue;
623     short           nEndValue;
624     short           nResetValue;
625     WORD            wMeasure;
626     short           nOffset;
627     BYTE            bBeat;
628     BYTE            bGrid;
629     BYTE            bType;
630     BYTE            bCurveShape;
631     BYTE            bCCData;
632     BYTE            bFlags;
633     WORD            wParamType;
634     WORD            wMergeIndex;
635 } DMUS_CURVE_PMSG;
636
637 typedef enum enumDMUS_CURVE_FLAGS
638 {
639         DMUS_CURVE_RESET = 1,
640         DMUS_CURVE_START_FROM_CURRENT = 2
641 } DMUS_CURVE_FLAGS;
642
643 #define DMUS_CURVE_RESET        0x01
644
645 enum
646 {
647     DMUS_CURVES_LINEAR  = 0x0,
648     DMUS_CURVES_INSTANT = 0x1,
649     DMUS_CURVES_EXP     = 0x2,
650     DMUS_CURVES_LOG     = 0x3,
651     DMUS_CURVES_SINE    = 0x4
652 };
653
654 typedef struct _DMUS_TIMESIG_PMSG
655 {
656     DMUS_PMSG_PART
657
658     BYTE    bBeatsPerMeasure;
659     BYTE    bBeat;
660     WORD    wGridsPerBeat;
661 } DMUS_TIMESIG_PMSG;
662
663 typedef struct _DMUS_NOTIFICATION_PMSG
664 {
665     DMUS_PMSG_PART
666
667     GUID    guidNotificationType;
668     DWORD   dwNotificationOption;
669     DWORD   dwField1;
670     DWORD   dwField2;
671 } DMUS_NOTIFICATION_PMSG;
672
673 typedef struct _DMUS_WAVE_PMSG
674 {
675     DMUS_PMSG_PART
676
677     REFERENCE_TIME rtStartOffset;
678     REFERENCE_TIME rtDuration;
679     long    lOffset;
680     long    lVolume;
681     long    lPitch;
682     BYTE    bFlags;
683 } DMUS_WAVE_PMSG;
684
685 typedef struct _DMUS_LYRIC_PMSG
686 {
687     DMUS_PMSG_PART
688
689     WCHAR    wszString[1];
690 } DMUS_LYRIC_PMSG;
691
692 typedef struct _DMUS_VERSION {
693   DWORD    dwVersionMS;
694   DWORD    dwVersionLS;
695 } DMUS_VERSION, *LPDMUS_VERSION;
696
697 typedef struct _DMUS_TIMESIGNATURE
698 {
699     MUSIC_TIME mtTime;
700     BYTE    bBeatsPerMeasure;
701     BYTE    bBeat;
702     WORD    wGridsPerBeat;
703 } DMUS_TIMESIGNATURE;
704
705 typedef struct _DMUS_VALID_START_PARAM
706 {
707     MUSIC_TIME mtTime;
708 } DMUS_VALID_START_PARAM;
709
710 typedef struct _DMUS_PLAY_MARKER_PARAM
711 {
712     MUSIC_TIME mtTime;
713 } DMUS_PLAY_MARKER_PARAM;
714
715 typedef struct _DMUS_OBJECTDESC
716 {
717     DWORD          dwSize;
718     DWORD          dwValidData;
719     GUID           guidObject;
720     GUID           guidClass;
721     FILETIME       ftDate;
722     DMUS_VERSION   vVersion;
723     WCHAR          wszName[DMUS_MAX_NAME];
724     WCHAR          wszCategory[DMUS_MAX_CATEGORY];
725     WCHAR          wszFileName[DMUS_MAX_FILENAME];
726     LONGLONG       llMemLength;
727     LPBYTE         pbMemData;
728     IStream *      pStream;
729 } DMUS_OBJECTDESC, *LPDMUS_OBJECTDESC;
730
731 typedef struct _DMUS_SCRIPT_ERRORINFO
732 {
733     DWORD dwSize;
734     HRESULT hr;
735     ULONG ulLineNumber;
736     LONG ichCharPosition;
737     WCHAR wszSourceFile[DMUS_MAX_FILENAME];
738     WCHAR wszSourceComponent[DMUS_MAX_FILENAME];
739     WCHAR wszDescription[DMUS_MAX_FILENAME];
740     WCHAR wszSourceLineText[DMUS_MAX_FILENAME];
741 } DMUS_SCRIPT_ERRORINFO;
742
743 typedef struct _DMUS_COMMAND_PARAM
744 {
745     BYTE bCommand;
746     BYTE bGrooveLevel;
747     BYTE bGrooveRange;
748     BYTE bRepeatMode;
749 } DMUS_COMMAND_PARAM;
750
751 typedef struct _DMUS_COMMAND_PARAM_2
752 {
753         MUSIC_TIME mtTime;
754     BYTE bCommand;
755     BYTE bGrooveLevel;
756     BYTE bGrooveRange;
757     BYTE bRepeatMode;
758 } DMUS_COMMAND_PARAM_2;
759
760 typedef struct _DMUS_CONNECTION_RULE
761 {
762     DWORD       dwFlags;
763     DWORD       dwIntervals;
764 } DMUS_CONNECTION_RULE;
765
766 typedef struct _DMUS_MELODY_FRAGMENT
767 {
768     MUSIC_TIME  mtTime;
769     DWORD       dwID;
770     WCHAR       wszVariationLabel[DMUS_MAX_FRAGMENTLABEL];
771     DWORD       dwVariationFlags;
772     DWORD       dwRepeatFragmentID;
773     DWORD       dwFragmentFlags;
774     DWORD       dwPlayModeFlags;
775     DWORD       dwTransposeIntervals;
776     DMUS_COMMAND_PARAM      Command;
777     DMUS_CONNECTION_RULE    ConnectionArc;
778 } DMUS_MELODY_FRAGMENT;
779
780 typedef struct _DMUS_BAND_PARAM
781 {
782     MUSIC_TIME  mtTimePhysical;
783     IDirectMusicBand *pBand;
784 } DMUS_BAND_PARAM;
785
786
787 typedef struct _DMUS_VARIATIONS_PARAM
788 {
789     DWORD   dwPChannelsUsed;
790     DWORD*  padwPChannels;
791     DWORD*  padwVariations;
792 } DMUS_VARIATIONS_PARAM;
793
794 /*****************************************************************************
795  * IDirectMusicBand interface
796  */
797 #undef INTERFACE
798 #define INTERFACE IDirectMusicBand
799 #define IDirectMusicBand_METHODS \
800     /*** IDirectMusicBand methods ***/ \
801     STDMETHOD(CreateSegment)(THIS_ IDirectMusicSegment **ppSegment) PURE; \
802     STDMETHOD(Download)(THIS_ IDirectMusicPerformance *pPerformance) PURE; \
803     STDMETHOD(Unload)(THIS_ IDirectMusicPerformance *pPerformance) PURE;
804
805     /*** IDirectMusicBand methods ***/
806 #define IDirectMusicBand_IMETHODS \
807     IUnknown_IMETHODS \
808     IDirectMusicBand_METHODS
809 ICOM_DEFINE(IDirectMusicBand,IUnknown)
810 #undef INTERFACE
811
812 #ifdef COBJMACROS
813 /*** IUnknown methods ***/
814 #define IDirectMusicBand_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
815 #define IDirectMusicBand_AddRef(p)              (p)->lpVtbl->AddRef(p)
816 #define IDirectMusicBand_Release(p)             (p)->lpVtbl->Release(p)
817 /*** IDirectMusicBand methods ***/
818 #define IDirectMusicBand_CreateSegment(p,a)     (p)->lpVtbl->CreateSegment(p,a)
819 #define IDirectMusicBand_Download(p,a)          (p)->lpVtbl->Download(p,a)
820 #define IDirectMusicBand_Unload(p,a)            (p)->lpVtbl->Unload(p,a)
821 #endif
822
823
824 /*****************************************************************************
825  * IDirectMusicObject interface
826  */
827 #undef INTERFACE
828 #define INTERFACE IDirectMusicObject
829 #define IDirectMusicObject_METHODS \
830     /*** IDirectMusicObject methods ***/ \
831     STDMETHOD(GetDescriptor)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; \
832     STDMETHOD(SetDescriptor)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; \
833     STDMETHOD(ParseDescriptor)(THIS_ LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc) PURE;
834
835     /*** IDirectMusicObject methods ***/
836 #define IDirectMusicObject_IMETHODS \
837     IUnknown_IMETHODS \
838     IDirectMusicObject_METHODS
839 ICOM_DEFINE(IDirectMusicObject,IUnknown)
840 #undef INTERFACE
841
842 #ifdef COBJMACROS
843 /*** IUnknown methods ***/
844 #define IDirectMusicObject_QueryInterface(p,a,b)   (p)->lpVtbl->QueryInterface(p,a,b)
845 #define IDirectMusicObject_AddRef(p)               (p)->lpVtbl->AddRef(p)
846 #define IDirectMusicObject_Release(p)              (p)->lpVtbl->Release(p)
847 /*** IDirectMusicObject methods ***/
848 #define IDirectMusicObject_GetDescriptor(p,a)      (p)->lpVtbl->GetDescriptor(p,a)
849 #define IDirectMusicObject_SetDescriptor(p,a)      (p)->lpVtbl->SetDescriptor(p,a)
850 #define IDirectMusicObject_ParseDescriptor(p,a,b)  (p)->lpVtbl->ParseDescriptor(p,a,b)
851 #endif
852
853
854 /*****************************************************************************
855  * IDirectMusicLoader interface
856  */
857 #undef INTERFACE
858 #define INTERFACE IDirectMusicLoader
859 #define IDirectMusicLoader_METHODS \
860     /*** IDirectMusicLoader methods ***/ \
861     STDMETHOD(_GetObject)(THIS_ LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID *ppv) PURE; \
862     STDMETHOD(SetObject)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; \
863     STDMETHOD(SetSearchDirectory)(THIS_ REFGUID rguidClass, WCHAR *pwzPath, BOOL fClear) PURE; \
864     STDMETHOD(ScanDirectory)(THIS_ REFGUID rguidClass, WCHAR *pwzFileExtension, WCHAR *pwzScanFileName) PURE; \
865     STDMETHOD(CacheObject)(THIS_ IDirectMusicObject *pObject) PURE; \
866     STDMETHOD(ReleaseObject)(THIS_ IDirectMusicObject *pObject) PURE; \
867     STDMETHOD(ClearCache)(THIS_ REFGUID rguidClass) PURE; \
868     STDMETHOD(EnableCache)(THIS_ REFGUID rguidClass, BOOL fEnable) PURE; \
869     STDMETHOD(EnumObject)(THIS_ REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc) PURE;
870
871     /*** IDirectMusicLoader methods ***/
872 #define IDirectMusicLoader_IMETHODS \
873     IUnknown_IMETHODS \
874     IDirectMusicLoader_METHODS
875 ICOM_DEFINE(IDirectMusicLoader,IUnknown)
876 #undef INTERFACE
877
878 #ifdef COBJMACROS
879 /*** IUnknown methods ***/
880 #define IDirectMusicLoader_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
881 #define IDirectMusicLoader_AddRef(p)                   (p)->lpVtbl->AddRef(p)
882 #define IDirectMusicLoader_Release(p)                  (p)->lpVtbl->Release(p)
883 /*** IDirectMusicLoader methods ***/
884 #define IDirectMusicLoader_GetObject(p,a,b,c)          (p)->lpVtbl->_GetObject(p,a,b,c)
885 #define IDirectMusicLoader_SetObject(p,a)              (p)->lpVtbl->SetObject(p,a)
886 #define IDirectMusicLoader_SetSearchDirectory(p,a,b,c) (p)->lpVtbl->SetSearchDirectory(p,a,b,c)
887 #define IDirectMusicLoader_ScanDirectory(p,a,b,c)      (p)->lpVtbl->ScanDirectory(p,a,b,c)
888 #define IDirectMusicLoader_CacheObject(p,a)            (p)->lpVtbl->CacheObject(p,a)
889 #define IDirectMusicLoader_ReleaseObject(p,a)          (p)->lpVtbl->ReleaseObject(p,a)
890 #define IDirectMusicLoader_ClearCache(p,a)             (p)->lpVtbl->ClearCache(p,a)
891 #define IDirectMusicLoader_EnableCache(p,a,b)          (p)->lpVtbl->EnableCache(p,a,b)
892 #define IDirectMusicLoader_EnumObject(p,a,b,c)         (p)->lpVtbl->EnumObject(p,a,b,c)
893 #endif
894
895
896 /*****************************************************************************
897  * IDirectMusicLoader8 interface
898  */
899 #undef INTERFACE
900 #define INTERFACE IDirectMusicLoader8
901 #define IDirectMusicLoader8_METHODS \
902     /*** IDirectMusicLoader8 methods ***/ \
903     STDMETHOD_(void,CollectGarbage)(THIS) PURE; \
904     STDMETHOD(ReleaseObjectByUnknown)(THIS_ IUnknown *pObject) PURE; \
905     STDMETHOD(LoadObjectFromFile)(THIS_ REFGUID rguidClassID, REFIID iidInterfaceID, WCHAR *pwzFilePath, void **ppObject) PURE;
906
907     /*** IDirectMusicLoader8 methods ***/
908 #define IDirectMusicLoader8_IMETHODS \
909     IUnknown_IMETHODS \
910     IDirectMusicLoader_METHODS \
911         IDirectMusicLoader8_METHODS
912 ICOM_DEFINE(IDirectMusicLoader8,IDirectMusicLoader)
913 #undef INTERFACE
914
915 #ifdef COBJMACROS
916 /*** IUnknown methods ***/
917 #define IDirectMusicLoader8_QueryInterface(p,a,b)         (p)->lpVtbl->QueryInterface(p,a,b)
918 #define IDirectMusicLoader8_AddRef(p)                     (p)->lpVtbl->AddRef(p)
919 #define IDirectMusicLoader8_Release(p)                    (p)->lpVtbl->Release(p)
920 /*** IDirectMusicLoader methods ***/
921 #define IDirectMusicLoader8_GetObject(p,a,b,c)            (p)->lpVtbl->_GetObject(p,a,b,c)
922 #define IDirectMusicLoader8_SetObject(p,a)                (p)->lpVtbl->SetObject(p,a)
923 #define IDirectMusicLoader8_SetSearchDirectory(p,a,b,c)   (p)->lpVtbl->SetSearchDirectory(p,a,b,c)
924 #define IDirectMusicLoader8_ScanDirectory(p,a,b,c)        (p)->lpVtbl->ScanDirectory(p,a,b,c)
925 #define IDirectMusicLoader8_CacheObject(p,a)              (p)->lpVtbl->CacheObject(p,a)
926 #define IDirectMusicLoader8_ReleaseObject(p,a)            (p)->lpVtbl->ReleaseObject(p,a)
927 #define IDirectMusicLoader8_ClearCache(p,a)               (p)->lpVtbl->ClearCache(p,a)
928 #define IDirectMusicLoader8_EnableCache(p,a,b)            (p)->lpVtbl->EnableCache(p,a,b)
929 #define IDirectMusicLoader8_EnumObject(p,a,b,c)           (p)->lpVtbl->EnumObject(p,a,b,c)
930 /*** IDirectMusicLoader8 methods ***/
931 #define IDirectMusicLoader8_CollectGarbage(p)             (p)->lpVtbl->CollectGarbage(p)
932 #define IDirectMusicLoader8_ReleaseObjectByUnknown(p,a)   (p)->lpVtbl->ReleaseObjectByUnknown(p,a)
933 #define IDirectMusicLoader8_LoadObjectFromFile(p,a,b,c,d) (p)->lpVtbl->LoadObjectFromFile(p,a,b,c,d)
934 #endif
935
936
937 /*****************************************************************************
938  * IDirectMusicGetLoader interface
939  */
940 #undef INTERFACE
941 #define INTERFACE IDirectMusicGetLoader
942 #define IDirectMusicGetLoader_METHODS \
943     /*** IDirectMusicGetLoader methods ***/ \
944     STDMETHOD(GetLoader)(THIS_ IDirectMusicLoader **ppLoader) PURE;
945
946     /*** IDirectMusicGetLoader methods ***/
947 #define IDirectMusicGetLoader_IMETHODS \
948     IUnknown_IMETHODS \
949     IDirectMusicGetLoader_METHODS
950 ICOM_DEFINE(IDirectMusicGetLoader,IUnknown)
951 #undef INTERFACE
952
953 #ifdef COBJMACROS
954 /*** IUnknown methods ***/
955 #define IDirectMusicGetLoader_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
956 #define IDirectMusicGetLoader_AddRef(p)             (p)->lpVtbl->AddRef(p)
957 #define IDirectMusicGetLoader_Release(p)            (p)->lpVtbl->Release(p)
958 /*** IDirectMusicGetLoader methods ***/
959 #define IDirectMusicGetLoader_GetLoader(p,a)        (p)->lpVtbl->GetLoader(p,a)
960 #endif
961
962
963 /*****************************************************************************
964  * IDirectMusicSegment interface
965  */
966 #undef INTERFACE
967 #define INTERFACE IDirectMusicSegment
968 #define IDirectMusicSegment_METHODS \
969     /*** IDirectMusicSegment methods ***/ \
970     STDMETHOD(GetLength)(THIS_ MUSIC_TIME *pmtLength) PURE; \
971     STDMETHOD(SetLength)(THIS_ MUSIC_TIME mtLength) PURE; \
972     STDMETHOD(GetRepeats)(THIS_ DWORD *pdwRepeats) PURE; \
973     STDMETHOD(SetRepeats)(THIS_ DWORD dwRepeats) PURE; \
974     STDMETHOD(GetDefaultResolution)(THIS_ DWORD *pdwResolution) PURE; \
975     STDMETHOD(SetDefaultResolution)(THIS_ DWORD dwResolution) PURE; \
976     STDMETHOD(GetTrack)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack **ppTrack) PURE; \
977     STDMETHOD(GetTrackGroup)(THIS_ IDirectMusicTrack *pTrack, DWORD *pdwGroupBits) PURE; \
978     STDMETHOD(InsertTrack)(THIS_ IDirectMusicTrack *pTrack, DWORD dwGroupBits) PURE; \
979     STDMETHOD(RemoveTrack)(THIS_ IDirectMusicTrack *pTrack) PURE; \
980     STDMETHOD(InitPlay)(THIS_ IDirectMusicSegmentState **ppSegState, IDirectMusicPerformance *pPerformance, DWORD  dwFlags) PURE; \
981     STDMETHOD(GetGraph)(THIS_ IDirectMusicGraph **ppGraph) PURE; \
982     STDMETHOD(SetGraph)(THIS_ IDirectMusicGraph *pGraph) PURE; \
983     STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; \
984     STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; \
985     STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; \
986     STDMETHOD(SetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void *pParam) PURE; \
987     STDMETHOD(Clone)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment **ppSegment) PURE; \
988     STDMETHOD(SetStartPoint)(THIS_ MUSIC_TIME mtStart) PURE; \
989     STDMETHOD(GetStartPoint)(THIS_ MUSIC_TIME *pmtStart) PURE; \
990     STDMETHOD(SetLoopPoints)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd) PURE; \
991     STDMETHOD(GetLoopPoints)(THIS_ MUSIC_TIME *pmtStart, MUSIC_TIME *pmtEnd) PURE; \
992     STDMETHOD(SetPChannelsUsed)(THIS_ DWORD dwNumPChannels, DWORD *paPChannels) PURE;
993
994     /*** IDirectMusicSegment methods ***/
995 #define IDirectMusicSegment_IMETHODS \
996     IUnknown_IMETHODS \
997     IDirectMusicSegment_METHODS
998 ICOM_DEFINE(IDirectMusicSegment,IUnknown)
999 #undef INTERFACE
1000
1001 #ifdef COBJMACROS
1002 /*** IUnknown methods ***/
1003 #define IDirectMusicSegment_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
1004 #define IDirectMusicSegment_AddRef(p)                   (p)->lpVtbl->AddRef(p)
1005 #define IDirectMusicSegment_Release(p)                  (p)->lpVtbl->Release(p)
1006 /*** IDirectMusicSegment methods ***/
1007 #define IDirectMusicSegment_GetLength(p,a)              (p)->lpVtbl->GetLength(p,a)
1008 #define IDirectMusicSegment_SetLength(p,a)              (p)->lpVtbl->SetLength(p,a)
1009 #define IDirectMusicSegment_GetRepeats(p,a)             (p)->lpVtbl->GetRepeats(p,a)
1010 #define IDirectMusicSegment_SetRepeats(p,a)             (p)->lpVtbl->SetRepeats(p,a)
1011 #define IDirectMusicSegment_GetDefaultResolution(p,a)   (p)->lpVtbl->GetDefaultResolution(p,a)
1012 #define IDirectMusicSegment_SetDefaultResolution(p,a)   (p)->lpVtbl->SetDefaultResolution(p,a)
1013 #define IDirectMusicSegment_GetTrack(p,a,b,c,d)         (p)->lpVtbl->GetTrack(p,a,b,c,d)
1014 #define IDirectMusicSegment_GetTrackGroup(p,a,b)        (p)->lpVtbl->GetTrackGroup(p,a,b)
1015 #define IDirectMusicSegment_InsertTrack(p,a,b)          (p)->lpVtbl->InsertTrack(p,a,b)
1016 #define IDirectMusicSegment_RemoveTrack(p,a)            (p)->lpVtbl->RemoveTrack(p,a)
1017 #define IDirectMusicSegment_InitPlay(p,a,b,c)           (p)->lpVtbl->InitPlay(p,a,b,c)
1018 #define IDirectMusicSegment_GetGraph(p,a)               (p)->lpVtbl->GetGraph(p,a)
1019 #define IDirectMusicSegment_SetGraph(p,a)               (p)->lpVtbl->SetGraph(p,a)
1020 #define IDirectMusicSegment_AddNotificationType(p,a)    (p)->lpVtbl->AddNotificationType(p,a)
1021 #define IDirectMusicSegment_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a)
1022 #define IDirectMusicSegment_GetParam(p,a,b,c,d,e,f)     (p)->lpVtbl->GetParam(p,a,b,c,d,e,f)
1023 #define IDirectMusicSegment_SetParam(p,a,b,c,d,e)       (p)->lpVtbl->SetParam(p,a,b,c,d,e)
1024 #define IDirectMusicSegment_Clone(p,a,b,c)              (p)->lpVtbl->Clone(p,a,b,c)
1025 #define IDirectMusicSegment_SetStartPoint(p,a)          (p)->lpVtbl->SetStartPoint(p,a)
1026 #define IDirectMusicSegment_GetStartPoint(p,a)          (p)->lpVtbl->GetStartPoint(p,a)
1027 #define IDirectMusicSegment_SetLoopPoints(p,a,b)        (p)->lpVtbl->SetLoopPoints(p,a,b)
1028 #define IDirectMusicSegment_GetLoopPoints(p,a,b)        (p)->lpVtbl->GetLoopPoints(p,a,b)
1029 #define IDirectMusicSegment_SetPChannelsUsed(p,a,b)     (p)->lpVtbl->SetPChannelsUsed(p,a,b)
1030 #endif
1031
1032
1033 /*****************************************************************************
1034  * IDirectMusicSegment8 interface
1035  */
1036 #undef INTERFACE
1037 #define INTERFACE IDirectMusicSegment8
1038 #define IDirectMusicSegment8_METHODS \
1039     /*** IDirectMusicSegment8 methods ***/ \
1040     STDMETHOD(SetTrackConfig)(THIS_ REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) PURE; \
1041     STDMETHOD(GetAudioPathConfig)(THIS_ IUnknown **ppAudioPathConfig) PURE; \
1042     STDMETHOD(Compose)(THIS_ MUSIC_TIME mtTime, IDirectMusicSegment *pFromSegment, IDirectMusicSegment *pToSegment, IDirectMusicSegment **ppComposedSegment) PURE; \
1043     STDMETHOD(Download)(THIS_ IUnknown *pAudioPath) PURE; \
1044     STDMETHOD(Unload)(THIS_ IUnknown *pAudioPath) PURE;
1045
1046     /*** IDirectMusicSegment8 methods ***/
1047 #define IDirectMusicSegment8_IMETHODS \
1048     IUnknown_IMETHODS \
1049     IDirectMusicSegment_METHODS \
1050         IDirectMusicSegment8_METHODS
1051 ICOM_DEFINE(IDirectMusicSegment8,IDirectMusicSegment)
1052 #undef INTERFACE
1053
1054 #ifdef COBJMACROS
1055 /*** IUnknown methods ***/
1056 #define IDirectMusicSegment8_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
1057 #define IDirectMusicSegment8_AddRef(p)                   (p)->lpVtbl->AddRef(p)
1058 #define IDirectMusicSegment8_Release(p)                  (p)->lpVtbl->Release(p)
1059 /*** IDirectMusicSegment methods ***/
1060 #define IDirectMusicSegment8_GetLength(p,a)              (p)->lpVtbl->GetLength(p,a)
1061 #define IDirectMusicSegment8_SetLength(p,a)              (p)->lpVtbl->SetLength(p,a)
1062 #define IDirectMusicSegment8_GetRepeats(p,a)             (p)->lpVtbl->GetRepeats(p,a)
1063 #define IDirectMusicSegment8_SetRepeats(p,a)             (p)->lpVtbl->SetRepeats(p,a)
1064 #define IDirectMusicSegment8_GetDefaultResolution(p,a)   (p)->lpVtbl->GetDefaultResolution(p,a)
1065 #define IDirectMusicSegment8_SetDefaultResolution(p,a)   (p)->lpVtbl->SetDefaultResolution(p,a)
1066 #define IDirectMusicSegment8_GetTrack(p,a,b,c,d)         (p)->lpVtbl->GetTrack(p,a,b,c,d)
1067 #define IDirectMusicSegment8_GetTrackGroup(p,a,b)        (p)->lpVtbl->GetTrackGroup(p,a,b)
1068 #define IDirectMusicSegment8_InsertTrack(p,a,b)          (p)->lpVtbl->InsertTrack(p,a,b)
1069 #define IDirectMusicSegment8_RemoveTrack(p,a)            (p)->lpVtbl->RemoveTrack(p,a)
1070 #define IDirectMusicSegment8_InitPlay(p,a,b,c)           (p)->lpVtbl->InitPlay(p,a,b,c)
1071 #define IDirectMusicSegment8_GetGraph(p,a)               (p)->lpVtbl->GetGraph(p,a)
1072 #define IDirectMusicSegment8_SetGraph(p,a)               (p)->lpVtbl->SetGraph(p,a)
1073 #define IDirectMusicSegment8_AddNotificationType(p,a)    (p)->lpVtbl->AddNotificationType(p,a)
1074 #define IDirectMusicSegment8_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a)
1075 #define IDirectMusicSegment8_GetParam(p,a,b,c,d,e,f)     (p)->lpVtbl->GetParam(p,a,b,c,d,e,f)
1076 #define IDirectMusicSegment8_SetParam(p,a,b,c,d,e)       (p)->lpVtbl->SetParam(p,a,b,c,d,e)
1077 #define IDirectMusicSegment8_Clone(p,a,b,c)              (p)->lpVtbl->Clone(p,a,b,c)
1078 #define IDirectMusicSegment8_SetStartPoint(p,a)          (p)->lpVtbl->SetStartPoint(p,a)
1079 #define IDirectMusicSegment8_GetStartPoint(p,a)          (p)->lpVtbl->GetStartPoint(p,a)
1080 #define IDirectMusicSegment8_SetLoopPoints(p,a,b)        (p)->lpVtbl->SetLoopPoints(p,a,b)
1081 #define IDirectMusicSegment8_GetLoopPoints(p,a,b)        (p)->lpVtbl->GetLoopPoints(p,a,b)
1082 #define IDirectMusicSegment8_SetPChannelsUsed(p,a,b)     (p)->lpVtbl->SetPChannelsUsed(p,a,b)
1083 /*** IDirectMusicSegment8 methods ***/
1084 #define IDirectMusicSegment8_SetTrackConfig(p,a,b,c,d,e) (p)->lpVtbl->SetTrackConfig(p,a,b,c,d,e)
1085 #define IDirectMusicSegment8_GetAudioPathConfig(p,a)     (p)->lpVtbl->GetAudioPathConfig(p,a)
1086 #define IDirectMusicSegment8_Compose(p,a,b,c,d)          (p)->lpVtbl->Compose(p,a,b,c,d)
1087 #define IDirectMusicSegment8_Download(p,a)               (p)->lpVtbl->Download(p,a)
1088 #define IDirectMusicSegment8_Unload(p,a)                 (p)->lpVtbl->Unload(p,a)
1089 #endif
1090
1091
1092 /*****************************************************************************
1093  * IDirectMusicSegmentState interface
1094  */
1095 #undef INTERFACE
1096 #define INTERFACE IDirectMusicSegmentState
1097 #define IDirectMusicSegmentState_METHODS \
1098     /*** IDirectMusicSegmentState methods ***/ \
1099     STDMETHOD(GetRepeats)(THIS_ DWORD *pdwRepeats) PURE; \
1100     STDMETHOD(GetSegment)(THIS_ IDirectMusicSegment **ppSegment) PURE; \
1101     STDMETHOD(GetStartTime)(THIS_ MUSIC_TIME *pmtStart) PURE; \
1102     STDMETHOD(GetSeek)(THIS_ MUSIC_TIME *pmtSeek) PURE; \
1103     STDMETHOD(GetStartPoint)(THIS_ MUSIC_TIME *pmtStart) PURE;
1104
1105     /*** IDirectMusicSegmentState methods ***/
1106 #define IDirectMusicSegmentState_IMETHODS \
1107     IUnknown_IMETHODS \
1108     IDirectMusicSegmentState_METHODS
1109 ICOM_DEFINE(IDirectMusicSegmentState,IUnknown)
1110 #undef INTERFACE
1111
1112 #ifdef COBJMACROS
1113 /*** IUnknown methods ***/
1114 #define IDirectMusicSegmentState_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
1115 #define IDirectMusicSegmentState_AddRef(p)              (p)->lpVtbl->AddRef(p)
1116 #define IDirectMusicSegmentState_Release(p)             (p)->lpVtbl->Release(p)
1117 /*** IDirectMusicSegmentState methods ***/
1118 #define IDirectMusicSegmentState_GetRepeats(p,a)        (p)->lpVtbl->GetRepeats(p,a)
1119 #define IDirectMusicSegmentState_GetSegment(p,a)        (p)->lpVtbl->GetSegment(p,a)
1120 #define IDirectMusicSegmentState_GetStartTime(p,a)      (p)->lpVtbl->GetStartTime(p,a)
1121 #define IDirectMusicSegmentState_GetSeek(p,a)           (p)->lpVtbl->GetSeek(p,a)
1122 #define IDirectMusicSegmentState_GetStartPoint(p,a)     (p)->lpVtbl->GetStartPoint(p,a)
1123 #endif
1124
1125
1126 /*****************************************************************************
1127  * IDirectMusicSegmentState8 interface
1128  */
1129 #undef INTERFACE
1130 #define INTERFACE IDirectMusicSegmentState8
1131 #define IDirectMusicSegmentState8_METHODS \
1132     /*** IDirectMusicSegmentState8 methods ***/ \
1133     STDMETHOD(SetTrackConfig)(THIS_ REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) PURE; \
1134     STDMETHOD(GetObjectInPath)(THIS_ DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void **ppObject) PURE;
1135
1136     /*** IDirectMusicSegmentState8 methods ***/
1137 #define IDirectMusicSegmentState8_IMETHODS \
1138     IUnknown_IMETHODS \
1139     IDirectMusicSegmentState_METHODS \
1140     IDirectMusicSegmentState8_METHODS
1141 ICOM_DEFINE(IDirectMusicSegmentState8,IDirectMusicSegmentState)
1142 #undef INTERFACE
1143
1144 #ifdef COBJMACROS
1145 /*** IUnknown methods ***/
1146 #define IDirectMusicSegmentState8_QueryInterface(p,a,b)            (p)->lpVtbl->QueryInterface(p,a,b)
1147 #define IDirectMusicSegmentState8_AddRef(p)                        (p)->lpVtbl->AddRef(p)
1148 #define IDirectMusicSegmentState8_Release(p)                       (p)->lpVtbl->Release(p)
1149 /*** IDirectMusicSegmentState methods ***/
1150 #define IDirectMusicSegmentState8_GetRepeats(p,a)                  (p)->lpVtbl->GetRepeats(p,a)
1151 #define IDirectMusicSegmentState8_GetSegment(p,a)                  (p)->lpVtbl->GetSegment(p,a)
1152 #define IDirectMusicSegmentState8_GetStartTime(p,a)                (p)->lpVtbl->GetStartTime(p,a)
1153 #define IDirectMusicSegmentState8_GetSeek(p,a)                     (p)->lpVtbl->GetSeek(p,a)
1154 #define IDirectMusicSegmentState8_GetStartPoint(p,a)               (p)->lpVtbl->GetStartPoint(p,a)
1155 /*** IDirectMusicSegmentState8 methods ***/
1156 #define IDirectMusicSegmentState8_SetTrackConfig(p,a,b,c,d,e)      (p)->lpVtbl->SetTrackConfig(p,a,b,c,d,e)
1157 #define IDirectMusicSegmentState8_GetObjectInPath(p,a,b,c,d,e,f,g) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d,e,f,g)
1158 #endif
1159
1160
1161 /*****************************************************************************
1162  * IDirectMusicAudioPath interface
1163  */
1164 #undef INTERFACE
1165 #define INTERFACE IDirectMusicAudioPath
1166 #define IDirectMusicAudioPath_METHODS \
1167     /*** IDirectMusicAudioPath methods ***/ \
1168     STDMETHOD(GetObjectInPath)(THIS_ DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, WORD dwIndex, REFGUID iidInterface, void **ppObject) PURE; \
1169     STDMETHOD(Activate)(THIS_ BOOL fActivate) PURE; \
1170     STDMETHOD(SetVolume)(THIS_ long lVolume, DWORD dwDuration) PURE; \
1171     STDMETHOD(ConvertPChannel)(THIS_ DWORD dwPChannelIn, DWORD *pdwPChannelOut) PURE;
1172
1173     /*** IDirectMusicAudioPath methods ***/
1174 #define IDirectMusicAudioPath_IMETHODS \
1175     IUnknown_IMETHODS \
1176     IDirectMusicAudioPath_METHODS
1177 ICOM_DEFINE(IDirectMusicAudioPath,IUnknown)
1178 #undef INTERFACE
1179
1180 #ifdef COBJMACROS
1181 /*** IUnknown methods ***/
1182 #define IDirectMusicAudioPath_QueryInterface(p,a,b)             (p)->lpVtbl->QueryInterface(p,a,b)
1183 #define IDirectMusicAudioPath_AddRef(p)                         (p)->lpVtbl->AddRef(p)
1184 #define IDirectMusicAudioPath_Release(p)                        (p)->lpVtbl->Release(p)
1185 /*** IDirectMusicAudioPath methods ***/
1186 #define IDirectMusicAudioPath_GetObjectInPath(p,a,b,c,d,e,f,g)  (p)->lpVtbl->GetObjectInPath(p,a,b,c,d,e,f,g)
1187 #define IDirectMusicAudioPath_Activate(p,a)                     (p)->lpVtbl->Activate(p,a)
1188 #define IDirectMusicAudioPath_SetVolume(p,a,b)                  (p)->lpVtbl->SetVolume(p,a,b)
1189 #define IDirectMusicAudioPath_ConvertPChannel(p,a,b)            (p)->lpVtbl->ConvertPChannel(p,a,b)
1190 #endif
1191
1192
1193 /*****************************************************************************
1194  * IDirectMusicPerformance interface
1195  */
1196 #undef INTERFACE
1197 #define INTERFACE IDirectMusicPerformance
1198 #define IDirectMusicPerformance_METHODS \
1199     /*** IDirectMusicPerformance methods ***/ \
1200     STDMETHOD(Init)(THIS_ IDirectMusic **ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; \
1201     STDMETHOD(PlaySegment)(THIS_ IDirectMusicSegment *pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState **ppSegmentState) PURE; \
1202     STDMETHOD(Stop)(THIS_ IDirectMusicSegment *pSegment, IDirectMusicSegmentState *pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags) PURE; \
1203     STDMETHOD(GetSegmentState)(THIS_ IDirectMusicSegmentState **ppSegmentState, MUSIC_TIME mtTime) PURE; \
1204     STDMETHOD(SetPrepareTime)(THIS_ DWORD dwMilliSeconds) PURE; \
1205     STDMETHOD(GetPrepareTime)(THIS_ DWORD *pdwMilliSeconds) PURE; \
1206     STDMETHOD(SetBumperLength)(THIS_ DWORD dwMilliSeconds) PURE; \
1207     STDMETHOD(GetBumperLength)(THIS_ DWORD *pdwMilliSeconds) PURE; \
1208     STDMETHOD(SendPMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; \
1209     STDMETHOD(MusicToReferenceTime)(THIS_ MUSIC_TIME mtTime, REFERENCE_TIME *prtTime) PURE; \
1210     STDMETHOD(ReferenceToMusicTime)(THIS_ REFERENCE_TIME rtTime, MUSIC_TIME *pmtTime) PURE; \
1211     STDMETHOD(IsPlaying)(THIS_ IDirectMusicSegment *pSegment, IDirectMusicSegmentState *pSegState) PURE; \
1212     STDMETHOD(GetTime)(THIS_ REFERENCE_TIME *prtNow, MUSIC_TIME *pmtNow) PURE; \
1213     STDMETHOD(AllocPMsg)(THIS_ ULONG cb, DMUS_PMSG **ppPMSG) PURE; \
1214     STDMETHOD(FreePMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; \
1215     STDMETHOD(GetGraph)(THIS_ IDirectMusicGraph **ppGraph) PURE; \
1216     STDMETHOD(SetGraph)(THIS_ IDirectMusicGraph *pGraph) PURE; \
1217     STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, REFERENCE_TIME rtMinimum) PURE; \
1218     STDMETHOD(GetNotificationPMsg)(THIS_ DMUS_NOTIFICATION_PMSG **ppNotificationPMsg) PURE; \
1219     STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; \
1220     STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; \
1221     STDMETHOD(AddPort)(THIS_ IDirectMusicPort *pPort) PURE; \
1222     STDMETHOD(RemovePort)(THIS_ IDirectMusicPort *pPort) PURE; \
1223     STDMETHOD(AssignPChannelBlock)(THIS_ DWORD dwBlockNum, IDirectMusicPort *pPort, DWORD dwGroup) PURE; \
1224     STDMETHOD(AssignPChannel)(THIS_ DWORD dwPChannel, IDirectMusicPort *pPort, DWORD dwGroup, DWORD dwMChannel) PURE; \
1225     STDMETHOD(PChannelInfo)(THIS_ DWORD dwPChannel, IDirectMusicPort **ppPort, DWORD *pdwGroup, DWORD *pdwMChannel) PURE; \
1226     STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument **ppDownInst, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort **ppPort, DWORD *pdwGroup, DWORD *pdwMChannel) PURE; \
1227     STDMETHOD(Invalidate)(THIS_ MUSIC_TIME mtTime, DWORD dwFlags) PURE; \
1228     STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; \
1229     STDMETHOD(SetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void *pParam) PURE; \
1230     STDMETHOD(GetGlobalParam)(THIS_ REFGUID rguidType, void *pParam, DWORD dwSize) PURE; \
1231     STDMETHOD(SetGlobalParam)(THIS_ REFGUID rguidType, void *pParam, DWORD dwSize) PURE; \
1232     STDMETHOD(GetLatencyTime)(THIS_ REFERENCE_TIME *prtTime) PURE; \
1233     STDMETHOD(GetQueueTime)(THIS_ REFERENCE_TIME *prtTime) PURE; \
1234     STDMETHOD(AdjustTime)(THIS_ REFERENCE_TIME rtAmount) PURE; \
1235     STDMETHOD(CloseDown)(THIS) PURE; \
1236     STDMETHOD(GetResolvedTime)(THIS_ REFERENCE_TIME rtTime, REFERENCE_TIME *prtResolved, DWORD dwTimeResolveFlags) PURE; \
1237     STDMETHOD(MIDIToMusic)(THIS_ BYTE bMIDIValue, DMUS_CHORD_KEY *pChord, BYTE bPlayMode, BYTE bChordLevel, WORD *pwMusicValue) PURE; \
1238     STDMETHOD(MusicToMIDI)(THIS_ WORD wMusicValue, DMUS_CHORD_KEY *pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE *pbMIDIValue) PURE; \
1239     STDMETHOD(TimeToRhythm)(THIS_ MUSIC_TIME mtTime, DMUS_TIMESIGNATURE *pTimeSig, WORD *pwMeasure, BYTE *pbBeat, BYTE *pbGrid, short *pnOffset) PURE; \
1240     STDMETHOD(RhythmToTime)(THIS_ WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE *pTimeSig, MUSIC_TIME *pmtTime) PURE;
1241
1242     /*** IDirectMusicPerformance methods ***/
1243 #define IDirectMusicPerformance_IMETHODS \
1244     IUnknown_IMETHODS \
1245     IDirectMusicPerformance_METHODS
1246 ICOM_DEFINE(IDirectMusicPerformance,IUnknown)
1247 #undef INTERFACE
1248
1249 #ifdef COBJMACROS
1250 /*** IUnknown methods ***/
1251 #define IDirectMusicPerformance_QueryInterface(p,a,b)                   (p)->lpVtbl->QueryInterface(p,a,b)
1252 #define IDirectMusicPerformance_AddRef(p)                               (p)->lpVtbl->AddRef(p)
1253 #define IDirectMusicPerformance_Release(p)                              (p)->lpVtbl->Release(p)
1254 /*** IDirectMusicPerformance methods ***/
1255 #define IDirectMusicPerformance_Init(p,a,b,c)                           (p)->lpVtbl->Init(p,a,b,c)
1256 #define IDirectMusicPerformance_PlaySegment(p,a,b,c,d)                  (p)->lpVtbl->PlaySegment(p,a,b,c,d)
1257 #define IDirectMusicPerformance_Stop(p,a,b,c,d)                         (p)->lpVtbl->Stop(p,a,b,c,d)
1258 #define IDirectMusicPerformance_GetSegmentState(p,a,b)                  (p)->lpVtbl->GetSegmentState(p,a,b)
1259 #define IDirectMusicPerformance_SetPrepareTime(p,a)                     (p)->lpVtbl->SetPrepareTime(p,a)
1260 #define IDirectMusicPerformance_GetPrepareTime(p,a)                     (p)->lpVtbl->GetPrepareTime(p,a)
1261 #define IDirectMusicPerformance_SetBumperLength(p,a)                    (p)->lpVtbl->SetBumperLength(p,a)
1262 #define IDirectMusicPerformance_GetBumperLength(p,a)                    (p)->lpVtbl->GetBumperLength(p,a)
1263 #define IDirectMusicPerformance_SendPMsg(p,a)                           (p)->lpVtbl->SendPMsg(p,a)
1264 #define IDirectMusicPerformance_MusicToReferenceTime(p,a,b)             (p)->lpVtbl->MusicToReferenceTime(p,a,b)
1265 #define IDirectMusicPerformance_ReferenceToMusicTime(p,a,b)             (p)->lpVtbl->ReferenceToMusicTime(p,a,b)
1266 #define IDirectMusicPerformance_IsPlaying(p,a,b)                        (p)->lpVtbl->IsPlaying(p,a,b)
1267 #define IDirectMusicPerformance_GetTime(p,a,b)                          (p)->lpVtbl->GetTime(p,a,b)
1268 #define IDirectMusicPerformance_AllocPMsg(p,a,b)                        (p)->lpVtbl->AllocPMsg(p,a,b)
1269 #define IDirectMusicPerformance_FreePMsg(p,a)                           (p)->lpVtbl->FreePMsg(p,a)
1270 #define IDirectMusicPerformance_GetGraph(p,a)                           (p)->lpVtbl->GetGraph(p,a)
1271 #define IDirectMusicPerformance_SetGraph(p,a)                           (p)->lpVtbl->SetGraph(p,a)
1272 #define IDirectMusicPerformance_SetNotificationHandle(p,a,b)            (p)->lpVtbl->SetNotificationHandle(p,a,b)
1273 #define IDirectMusicPerformance_GetNotificationPMsg(p,a)                (p)->lpVtbl->GetNotificationPMsg(p,a)
1274 #define IDirectMusicPerformance_AddNotificationType(p,a)                (p)->lpVtbl->AddNotificationType(p,a)
1275 #define IDirectMusicPerformance_RemoveNotificationType(p,a)             (p)->lpVtbl->RemoveNotificationType(p,a)
1276 #define IDirectMusicPerformance_AddPort(p,a)                            (p)->lpVtbl->AddPort(p,a)
1277 #define IDirectMusicPerformance_RemovePort(p,a)                         (p)->lpVtbl->RemovePort(p,a)
1278 #define IDirectMusicPerformance_AssignPChannelBlock(p,a,b,c)            (p)->lpVtbl->AssignPChannelBlock(p,a,b,c)
1279 #define IDirectMusicPerformance_AssignPChannel(p,a,b,c,d)               (p)->lpVtbl->AssignPChannel(p,a,b,c,d)
1280 #define IDirectMusicPerformance_PChannelInfo(p,a,b,c,d)                 (p)->lpVtbl->PChannelInfo(p,a,b,c,d)
1281 #define IDirectMusicPerformance_DownloadInstrument(p,a,b,c,d,e,f,g,h)   (p)->lpVtbl->DownloadInstrument(p,a,b,c,d,e,f,g,h)
1282 #define IDirectMusicPerformance_Invalidate(p,a,b)                       (p)->lpVtbl->Invalidate(p,a,b)
1283 #define IDirectMusicPerformance_GetParam(p,a,b,c,d,e,f)                 (p)->lpVtbl->GetParam(p,a,b,c,d,e,f)
1284 #define IDirectMusicPerformance_SetParam(p,a,b,c,d,e)                   (p)->lpVtbl->SetParam(p,a,b,c,d,e)
1285 #define IDirectMusicPerformance_GetGlobalParam(p,a,b,c)                 (p)->lpVtbl->GetGlobalParam(p,a,b,c)
1286 #define IDirectMusicPerformance_SetGlobalParam(p,a,b,c)                 (p)->lpVtbl->SetGlobalParam(p,a,b,c)
1287 #define IDirectMusicPerformance_GetLatencyTime(p,a)                     (p)->lpVtbl->GetLatencyTime(p,a)
1288 #define IDirectMusicPerformance_GetQueueTime(p,a)                       (p)->lpVtbl->GetQueueTime(p,a)
1289 #define IDirectMusicPerformance_AdjustTime(p,a)                         (p)->lpVtbl->AdjustTime(p,a)
1290 #define IDirectMusicPerformance_CloseDown(p)                            (p)->lpVtbl->CloseDown(p)
1291 #define IDirectMusicPerformance_GetResolvedTime(p,a,b,c)                (p)->lpVtbl->GetResolvedTime(p,a,b,c)
1292 #define IDirectMusicPerformance_MIDIToMusic(p,a,b,c,d,e)                (p)->lpVtbl->MIDIToMusic(p,a,b,c,d,e)
1293 #define IDirectMusicPerformance_MusicToMIDI(p,a,b,c,d,e)                (p)->lpVtbl->MusicToMIDI(p,a,b,c,d,e)
1294 #define IDirectMusicPerformance_TimeToRhythm(p,a,b,c,d,e,f)             (p)->lpVtbl->TimeToRhythm(p,a,b,c,d,e,f)
1295 #define IDirectMusicPerformance_RhythmToTime(p,a,b,c,d,e,f)             (p)->lpVtbl->RhythmToTime(p,a,b,c,d,e,f)
1296 #endif
1297
1298
1299 /*****************************************************************************
1300  * IDirectMusicPerformance8 interface
1301  */
1302 #undef INTERFACE
1303 #define INTERFACE IDirectMusicPerformance8
1304 #define IDirectMusicPerformance8_METHODS \
1305     /*** IDirectMusicPerformance8 methods ***/ \
1306     STDMETHOD(InitAudio)(THIS_ IDirectMusic **ppDirectMusic, IDirectSound **ppDirectSound, HWND hWnd, DWORD dwDefaultPathType, DWORD dwPChannelCount, DWORD dwFlags, DMUS_AUDIOPARAMS *pParams) PURE; \
1307     STDMETHOD(PlaySegmentEx)(THIS_ IUnknown *pSource, WCHAR *pwzSegmentName, IUnknown *pTransition, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState **ppSegmentState, IUnknown *pFrom, IUnknown *pAudioPath) PURE; \
1308     STDMETHOD(StopEx)(THIS_ IUnknown *pObjectToStop, __int64 i64StopTime, DWORD dwFlags) PURE; \
1309     STDMETHOD(ClonePMsg)(THIS_ DMUS_PMSG *pSourcePMSG, DMUS_PMSG **ppCopyPMSG) PURE; \
1310     STDMETHOD(CreateAudioPath)(THIS_ IUnknown *pSourceConfig, BOOL fActivate, IDirectMusicAudioPath **ppNewPath) PURE; \
1311     STDMETHOD(CreateStandardAudioPath)(THIS_ DWORD dwType, DWORD dwPChannelCount, BOOL fActivate, IDirectMusicAudioPath **ppNewPath) PURE; \
1312     STDMETHOD(SetDefaultAudioPath)(THIS_ IDirectMusicAudioPath *pAudioPath) PURE; \
1313     STDMETHOD(GetDefaultAudioPath)(THIS_ IDirectMusicAudioPath **ppAudioPath) PURE; \
1314     STDMETHOD(GetParamEx)(THIS_ REFGUID rguidType, DWORD dwTrackID, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE;
1315
1316     /*** IDirectMusicPerformance8 methods ***/
1317 #define IDirectMusicPerformance8_IMETHODS \
1318     IUnknown_IMETHODS \
1319     IDirectMusicPerformance_METHODS \
1320     IDirectMusicPerformance8_METHODS
1321 ICOM_DEFINE(IDirectMusicPerformance8,IDirectMusicPerformance)
1322 #undef INTERFACE
1323
1324 #ifdef COBJMACROS
1325 /*** IUnknown methods ***/
1326 #define IDirectMusicPerformance8_QueryInterface(p,a,b)                  (p)->lpVtbl->QueryInterface(p,a,b)
1327 #define IDirectMusicPerformance8_AddRef(p)                              (p)->lpVtbl->AddRef(p)
1328 #define IDirectMusicPerformance8_Release(p)                             (p)->lpVtbl->Release(p)
1329 /*** IDirectMusicPerformance methods ***/
1330 #define IDirectMusicPerformance8_Init(p,a,b,c)                          (p)->lpVtbl->Init(p,a,b,c)
1331 #define IDirectMusicPerformance8_PlaySegment(p,a,b,c,d)                 (p)->lpVtbl->PlaySegment(p,a,b,c,d)
1332 #define IDirectMusicPerformance8_Stop(p,a,b,c,d)                        (p)->lpVtbl->Stop(p,a,b,c,d)
1333 #define IDirectMusicPerformance8_GetSegmentState(p,a,b)                 (p)->lpVtbl->GetSegmentState(p,a,b)
1334 #define IDirectMusicPerformance8_SetPrepareTime(p,a)                    (p)->lpVtbl->SetPrepareTime(p,a)
1335 #define IDirectMusicPerformance8_GetPrepareTime(p,a)                    (p)->lpVtbl->GetPrepareTime(p,a)
1336 #define IDirectMusicPerformance8_SetBumperLength(p,a)                   (p)->lpVtbl->SetBumperLength(p,a)
1337 #define IDirectMusicPerformance8_GetBumperLength(p,a)                   (p)->lpVtbl->GetBumperLength(p,a)
1338 #define IDirectMusicPerformance8_SendPMsg(p,a)                          (p)->lpVtbl->SendPMsg(p,a)
1339 #define IDirectMusicPerformance8_MusicToReferenceTime(p,a,b)            (p)->lpVtbl->MusicToReferenceTime(p,a,b)
1340 #define IDirectMusicPerformance8_ReferenceToMusicTime(p,a,b)            (p)->lpVtbl->ReferenceToMusicTime(p,a,b)
1341 #define IDirectMusicPerformance8_IsPlaying(p,a,b)                       (p)->lpVtbl->IsPlaying(p,a,b)
1342 #define IDirectMusicPerformance8_GetTime(p,a,b)                         (p)->lpVtbl->GetTime(p,a,b)
1343 #define IDirectMusicPerformance8_AllocPMsg(p,a,b)                       (p)->lpVtbl->AllocPMsg(p,a,b)
1344 #define IDirectMusicPerformance8_FreePMsg(p,a)                          (p)->lpVtbl->FreePMsg(p,a)
1345 #define IDirectMusicPerformance8_GetGraph(p,a)                          (p)->lpVtbl->GetGraph(p,a)
1346 #define IDirectMusicPerformance8_SetGraph(p,a)                          (p)->lpVtbl->SetGraph(p,a)
1347 #define IDirectMusicPerformance8_SetNotificationHandle(p,a,b)           (p)->lpVtbl->SetNotificationHandle(p,a,b)
1348 #define IDirectMusicPerformance8_GetNotificationPMsg(p,a)               (p)->lpVtbl->GetNotificationPMsg(p,a)
1349 #define IDirectMusicPerformance8_AddNotificationType(p,a)               (p)->lpVtbl->AddNotificationType(p,a)
1350 #define IDirectMusicPerformance8_RemoveNotificationType(p,a)            (p)->lpVtbl->RemoveNotificationType(p,a)
1351 #define IDirectMusicPerformance8_AddPort(p,a)                           (p)->lpVtbl->AddPort(p,a)
1352 #define IDirectMusicPerformance8_RemovePort(p,a)                        (p)->lpVtbl->RemovePort(p,a)
1353 #define IDirectMusicPerformance8_AssignPChannelBlock(p,a,b,c)           (p)->lpVtbl->AssignPChannelBlock(p,a,b,c)
1354 #define IDirectMusicPerformance8_AssignPChannel(p,a,b,c,d)              (p)->lpVtbl->AssignPChannel(p,a,b,c,d)
1355 #define IDirectMusicPerformance8_PChannelInfo(p,a,b,c,d)                (p)->lpVtbl->PChannelInfo(p,a,b,c,d)
1356 #define IDirectMusicPerformance8_DownloadInstrument(p,a,b,c,d,e,f,g,h)  (p)->lpVtbl->DownloadInstrument(p,a,b,c,d,e,f,g,h)
1357 #define IDirectMusicPerformance8_Invalidate(p,a,b)                      (p)->lpVtbl->Invalidate(p,a,b)
1358 #define IDirectMusicPerformance8_GetParam(p,a,b,c,d,e,f)                (p)->lpVtbl->GetParam(p,a,b,c,d,e,f)
1359 #define IDirectMusicPerformance8_SetParam(p,a,b,c,d,e)                  (p)->lpVtbl->SetParam(p,a,b,c,d,e)
1360 #define IDirectMusicPerformance8_GetGlobalParam(p,a,b,c)                (p)->lpVtbl->GetGlobalParam(p,a,b,c)
1361 #define IDirectMusicPerformance8_SetGlobalParam(p,a,b,c)                (p)->lpVtbl->SetGlobalParam(p,a,b,c)
1362 #define IDirectMusicPerformance8_GetLatencyTime(p,a)                    (p)->lpVtbl->GetLatencyTime(p,a)
1363 #define IDirectMusicPerformance8_GetQueueTime(p,a)                      (p)->lpVtbl->GetQueueTime(p,a)
1364 #define IDirectMusicPerformance8_AdjustTime(p,a)                        (p)->lpVtbl->AdjustTime(p,a)
1365 #define IDirectMusicPerformance8_CloseDown(p)                           (p)->lpVtbl->CloseDown(p)
1366 #define IDirectMusicPerformance8_GetResolvedTime(p,a,b,c)               (p)->lpVtbl->GetResolvedTime(p,a,b,c)
1367 #define IDirectMusicPerformance8_MIDIToMusic(p,a,b,c,d,e)               (p)->lpVtbl->MIDIToMusic(p,a,b,c,d,e)
1368 #define IDirectMusicPerformance8_MusicToMIDI(p,a,b,c,d,e)               (p)->lpVtbl->MusicToMIDI(p,a,b,c,d,e)
1369 #define IDirectMusicPerformance8_TimeToRhythm(p,a,b,c,d,e,f)            (p)->lpVtbl->TimeToRhythm(p,a,b,c,d,e,f)
1370 #define IDirectMusicPerformance8_RhythmToTime(p,a,b,c,d,e,f)            (p)->lpVtbl->RhythmToTime(p,a,b,c,d,e,f)
1371     /*  IDirectMusicPerformance8 methods*/
1372 #define IDirectMusicPerformance8_InitAudio(p,a,b,c,d,e,f,g)             (p)->lpVtbl->InitAudio(p,a,b,c,d,e,f,g)
1373 #define IDirectMusicPerformance8_PlaySegmentEx(p,a,b,c,d,e,f,g,h)       (p)->lpVtbl->PlaySegmentEx(p,a,b,c,d,e,f,g,h)
1374 #define IDirectMusicPerformance8_StopEx(p,a,b,c)                        (p)->lpVtbl->StopEx(p,a,b,c)
1375 #define IDirectMusicPerformance8_ClonePMsg(p,a,b)                       (p)->lpVtbl->ClonePMsg(p,a,b)
1376 #define IDirectMusicPerformance8_CreateAudioPath(p,a,b,c)               (p)->lpVtbl->CreateAudioPath(p,a,b,c)
1377 #define IDirectMusicPerformance8_CreateStandardAudioPath(p,a,b,c,d)     (p)->lpVtbl->CreateStandardAudioPath(p,a,b,c,d)
1378 #define IDirectMusicPerformance8_SetDefaultAudioPath(p,a)               (p)->lpVtbl->SetDefaultAudioPath(p,a)
1379 #define IDirectMusicPerformance8_GetDefaultAudioPath(p,a)               (p)->lpVtbl->GetDefaultAudioPath(p,a)
1380 #define IDirectMusicPerformance8_GetParamEx(p,a,b,c,d,e,f,g)            (p)->lpVtbl->GetParamEx(p,a,b,c,d,e,f,g)
1381 #endif
1382
1383
1384 /*****************************************************************************
1385  * IDirectMusicGraph interface
1386  */
1387 #undef INTERFACE
1388 #define INTERFACE IDirectMusicGraph
1389 #define IDirectMusicGraph_METHODS \
1390     /*** IDirectMusicGraph methods ***/ \
1391     STDMETHOD(StampPMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; \
1392     STDMETHOD(InsertTool)(THIS_ IDirectMusicTool *pTool, DWORD *pdwPChannels, DWORD cPChannels, LONG lIndex) PURE; \
1393     STDMETHOD(GetTool)(THIS_ DWORD dwIndex, IDirectMusicTool **ppTool) PURE; \
1394     STDMETHOD(RemoveTool)(THIS_ IDirectMusicTool *pTool) PURE;
1395
1396     /*** IDirectMusicGraph methods ***/
1397 #define IDirectMusicGraph_IMETHODS \
1398     IUnknown_IMETHODS \
1399     IDirectMusicGraph_METHODS
1400 ICOM_DEFINE(IDirectMusicGraph,IUnknown)
1401 #undef INTERFACE
1402
1403 #ifdef COBJMACROS
1404 /*** IUnknown methods ***/
1405 #define IDirectMusicGraph_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1406 #define IDirectMusicGraph_AddRef(p)             (p)->lpVtbl->AddRef(p)
1407 #define IDirectMusicGraph_Release(p)            (p)->lpVtbl->Release(p)
1408 /*** IDirectMusicGraph methods ***/
1409 #define IDirectMusicGraph_StampPMsg(p,a)        (p)->lpVtbl->StampPMsg(p,a)
1410 #define IDirectMusicGraph_InsertTool(p,a,b,c,d) (p)->lpVtbl->InsertTool(p,a,b,c,d)
1411 #define IDirectMusicGraph_GetTool(p,a,b)        (p)->lpVtbl->GetTool(p,a,b)
1412 #define IDirectMusicGraph_RemoveTool(p,a)       (p)->lpVtbl->RemoveTool(p,a)
1413 #endif
1414
1415
1416 /*****************************************************************************
1417  * IDirectMusicStyle interface
1418  */
1419 #undef INTERFACE
1420 #define INTERFACE IDirectMusicStyle
1421 #define IDirectMusicStyle_METHODS \
1422     /*** IDirectMusicStyle methods ***/ \
1423     STDMETHOD(GetBand)(THIS_ WCHAR *pwszName, IDirectMusicBand **ppBand) PURE; \
1424     STDMETHOD(EnumBand)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; \
1425     STDMETHOD(GetDefaultBand)(THIS_ IDirectMusicBand **ppBand) PURE; \
1426     STDMETHOD(EnumMotif)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; \
1427     STDMETHOD(GetMotif)(THIS_ WCHAR *pwszName, IDirectMusicSegment **ppSegment) PURE; \
1428     STDMETHOD(GetDefaultChordMap)(THIS_ IDirectMusicChordMap **ppChordMap) PURE; \
1429     STDMETHOD(EnumChordMap)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; \
1430     STDMETHOD(GetChordMap)(THIS_ WCHAR *pwszName, IDirectMusicChordMap **ppChordMap) PURE; \
1431     STDMETHOD(GetTimeSignature)(THIS_ DMUS_TIMESIGNATURE *pTimeSig) PURE; \
1432     STDMETHOD(GetEmbellishmentLength)(THIS_ DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax) PURE; \
1433     STDMETHOD(GetTempo)(THIS_ double *pTempo) PURE;
1434
1435     /*** IDirectMusicStyle methods ***/
1436 #define IDirectMusicStyle_IMETHODS \
1437     IUnknown_IMETHODS \
1438     IDirectMusicStyle_METHODS
1439 ICOM_DEFINE(IDirectMusicStyle,IUnknown)
1440 #undef INTERFACE
1441
1442 #ifdef COBJMACROS
1443 /*** IUnknown methods ***/
1444 #define IDirectMusicStyle_QueryInterface(p,a,b)                 (p)->lpVtbl->QueryInterface(p,a,b)
1445 #define IDirectMusicStyle_AddRef(p)                             (p)->lpVtbl->AddRef(p)
1446 #define IDirectMusicStyle_Release(p)                            (p)->lpVtbl->Release(p)
1447 /*** IDirectMusicStyle methods ***/
1448 #define IDirectMusicStyle_GetBand(p,a,b)                        (p)->lpVtbl->GetBand(p,a,b)
1449 #define IDirectMusicStyle_EnumBand(p,a,b)                       (p)->lpVtbl->EnumBand(p,a,b)
1450 #define IDirectMusicStyle_GetDefaultBand(p,a)                   (p)->lpVtbl->GetDefaultBand(p,a)
1451 #define IDirectMusicStyle_EnumMotif(p,a,b)                      (p)->lpVtbl->EnumMotif(p,a,b)
1452 #define IDirectMusicStyle_GetMotif(p,a,b)                       (p)->lpVtbl->GetMotif(p,a,b)
1453 #define IDirectMusicStyle_GetDefaultChordMap(p,a)               (p)->lpVtbl->GetDefaultChordMap(p,a)
1454 #define IDirectMusicStyle_EnumChordMap(p,a,b)                   (p)->lpVtbl->EnumChordMap(p,a,b)
1455 #define IDirectMusicStyle_GetChordMap(p,a,b)                    (p)->lpVtbl->GetChordMap(p,a,b)
1456 #define IDirectMusicStyle_GetTimeSignature(p,a)                 (p)->lpVtbl->GetTimeSignature(p,a)
1457 #define IDirectMusicStyle_GetEmbellishmentLength(p,a,b,c,d)     (p)->lpVtbl->GetEmbellishmentLength(p,a,b,c,d)
1458 #define IDirectMusicStyle_GetTempo(p,a)                         (p)->lpVtbl->GetTempo(p,a)
1459 #endif
1460
1461
1462 /*****************************************************************************
1463  * IDirectMusicStyle8 interface
1464  */
1465 #undef INTERFACE
1466 #define INTERFACE IDirectMusicStyle8
1467 #define IDirectMusicStyle8_METHODS \
1468     /*** IDirectMusicStyle8 methods ***/ \
1469     STDMETHOD(EnumPattern)(THIS_ DWORD dwIndex, DWORD dwPatternType, WCHAR *pwszName) PURE;
1470
1471     /*** IDirectMusicStyle8 methods ***/
1472 #define IDirectMusicStyle8_IMETHODS \
1473     IUnknown_IMETHODS \
1474     IDirectMusicStyle_METHODS \
1475     IDirectMusicStyle8_METHODS
1476 ICOM_DEFINE(IDirectMusicStyle8,IDirectMusicStyle)
1477 #undef INTERFACE
1478
1479 #ifdef COBJMACROS
1480 /*** IUnknown methods ***/
1481 #define IDirectMusicStyle8_QueryInterface(p,a,b)                (p)->lpVtbl->QueryInterface(p,a,b)
1482 #define IDirectMusicStyle8_AddRef(p)                            (p)->lpVtbl->AddRef(p)
1483 #define IDirectMusicStyle8_Release(p)                           (p)->lpVtbl->Release(p)
1484 /*** IDirectMusicStyle methods ***/
1485 #define IDirectMusicStyle8_GetBand(p,a,b)                       (p)->lpVtbl->GetBand(p,a,b)
1486 #define IDirectMusicStyle8_EnumBand(p,a,b)                      (p)->lpVtbl->EnumBand(p,a,b)
1487 #define IDirectMusicStyle8_GetDefaultBand(p,a)                  (p)->lpVtbl->GetDefaultBand(p,a)
1488 #define IDirectMusicStyle8_EnumMotif(p,a,b)                     (p)->lpVtbl->EnumMotif(p,a,b)
1489 #define IDirectMusicStyle8_GetMotif(p,a,b)                      (p)->lpVtbl->GetMotif(p,a,b)
1490 #define IDirectMusicStyle8_GetDefaultChordMap(p,a)              (p)->lpVtbl->GetDefaultChordMap(p,a)
1491 #define IDirectMusicStyle8_EnumChordMap(p,a,b)                  (p)->lpVtbl->EnumChordMap(p,a,b)
1492 #define IDirectMusicStyle8_GetChordMap(p,a,b)                   (p)->lpVtbl->GetChordMap(p,a,b)
1493 #define IDirectMusicStyle8_GetTimeSignature(p,a)                (p)->lpVtbl->GetTimeSignature(p,a)
1494 #define IDirectMusicStyle8_GetEmbellishmentLength(p,a,b,c,d)    (p)->lpVtbl->GetEmbellishmentLength(p,a,b,c,d)
1495 #define IDirectMusicStyle8_GetTempo(p,a)                        (p)->lpVtbl->GetTempo(p,a)
1496 /*** IDirectMusicStyle8 methods ***/
1497 #define IDirectMusicStyle8_EnumPattern(p,a,b,c)                 (p)->lpVtbl->EnumPattern(p,a,b,c)
1498 #endif
1499
1500
1501 /*****************************************************************************
1502  * IDirectMusicChordMap interface
1503  */
1504 #undef INTERFACE
1505 #define INTERFACE IDirectMusicChordMap
1506 #define IDirectMusicChordMap_METHODS \
1507     /*** IDirectMusicChordMap methods ***/ \
1508     STDMETHOD(GetScale)(THIS_ DWORD *pdwScale) PURE;
1509
1510     /*** IDirectMusicChordMap methods ***/
1511 #define IDirectMusicChordMap_IMETHODS \
1512     IUnknown_IMETHODS \
1513     IDirectMusicChordMap_METHODS
1514 ICOM_DEFINE(IDirectMusicChordMap,IUnknown)
1515 #undef INTERFACE
1516
1517 #ifdef COBJMACROS
1518 /*** IUnknown methods ***/
1519 #define IDirectMusicChordMap_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1520 #define IDirectMusicChordMap_AddRef(p)             (p)->lpVtbl->AddRef(p)
1521 #define IDirectMusicChordMap_Release(p)            (p)->lpVtbl->Release(p)
1522 /*** IDirectMusicChordMap methods ***/
1523 #define IDirectMusicChordMap_GetScale(p,a)         (p)->lpVtbl->GetScale(p,a)
1524 #endif
1525
1526
1527 /*****************************************************************************
1528  * IDirectMusicComposer interface
1529  */
1530 #undef INTERFACE
1531 #define INTERFACE IDirectMusicComposer
1532 #define IDirectMusicComposer_METHODS \
1533     /*** IDirectMusicComposer methods ***/ \
1534     STDMETHOD(ComposeSegmentFromTemplate)(THIS_ IDirectMusicStyle *pStyle, IDirectMusicSegment *pTemplate, WORD wActivity, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppSegment) PURE; \
1535     STDMETHOD(ComposeSegmentFromShape)(THIS_ IDirectMusicStyle *pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppSegment) PURE; \
1536     STDMETHOD(ComposeTransition)(THIS_ IDirectMusicSegment *pFromSeg, IDirectMusicSegment *pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppTransSeg) PURE; \
1537     STDMETHOD(AutoTransition)(THIS_ IDirectMusicPerformance *pPerformance, IDirectMusicSegment *pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppTransSeg, IDirectMusicSegmentState **ppToSegState, IDirectMusicSegmentState **ppTransSegState) PURE; \
1538     STDMETHOD(ComposeTemplateFromShape)(THIS_ WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment **ppTemplate) PURE; \
1539     STDMETHOD(ChangeChordMap)(THIS_ IDirectMusicSegment *pSegment, BOOL fTrackScale, IDirectMusicChordMap *pChordMap) PURE;
1540
1541     /*** IDirectMusicComposer methods ***/
1542 #define IDirectMusicComposer_IMETHODS \
1543     IUnknown_IMETHODS \
1544     IDirectMusicComposer_METHODS
1545 ICOM_DEFINE(IDirectMusicComposer,IUnknown)
1546 #undef INTERFACE
1547
1548 #ifdef COBJMACROS
1549 /*** IUnknown methods ***/
1550 #define IDirectMusicComposer_QueryInterface(p,a,b)                      (p)->lpVtbl->QueryInterface(p,a,b)
1551 #define IDirectMusicComposer_AddRef(p)                                  (p)->lpVtbl->AddRef(p)
1552 #define IDirectMusicComposer_Release(p)                                 (p)->lpVtbl->Release(p)
1553 /*** IDirectMusicComposer methods ***/
1554 #define IDirectMusicComposer_ComposeSegmentFromTemplate(p,a,b,c,d,e)    (p)->lpVtbl->ComposeSegmentFromTemplate(p,a,b,c,d,e)
1555 #define IDirectMusicComposer_ComposeSegmentFromShape(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->ComposeSegmentFromShape(p,a,b,c,d,e,f,g,h)
1556 #define IDirectMusicComposer_ComposeTransition(p,a,b,c,d,e,f,g)         (p)->lpVtbl->ComposeTransition(p,a,b,c,d,e,f,g)
1557 #define IDirectMusicComposer_AutoTransition(p,a,b,c,d,e,f,g,h)          (p)->lpVtbl->AutoTransition(p,a,b,c,d,e,f,g,h)
1558 #define IDirectMusicComposer_ComposeTemplateFromShape(p,a,b,c,d,e,f)    (p)->lpVtbl->ComposeTemplateFromShape(p,a,b,c,d,e,f)
1559 #define IDirectMusicComposer_ChangeChordMap(p,a,b,c)                    (p)->lpVtbl->ChangeChordMap(p,a,b,c)
1560 #endif
1561
1562
1563 /*****************************************************************************
1564  * IDirectMusicPatternTrack interface
1565  */
1566 #undef INTERFACE
1567 #define INTERFACE IDirectMusicPatternTrack
1568 #define IDirectMusicPatternTrack_METHODS \
1569     /*** IDirectMusicPatternTrack methods ***/ \
1570     STDMETHOD(CreateSegment)(THIS_ IDirectMusicStyle *pStyle, IDirectMusicSegment **ppSegment) PURE; \
1571     STDMETHOD(SetVariation)(THIS_ IDirectMusicSegmentState *pSegState, DWORD dwVariationFlags, DWORD dwPart) PURE; \
1572     STDMETHOD(SetPatternByName)(THIS_ IDirectMusicSegmentState *pSegState, WCHAR *wszName, IDirectMusicStyle *pStyle, DWORD dwPatternType, DWORD *pdwLength) PURE;
1573
1574     /*** IDirectMusicPatternTrack methods ***/
1575 #define IDirectMusicPatternTrack_IMETHODS \
1576     IUnknown_IMETHODS \
1577     IDirectMusicPatternTrack_METHODS
1578 ICOM_DEFINE(IDirectMusicPatternTrack,IUnknown)
1579 #undef INTERFACE
1580
1581 #ifdef COBJMACROS
1582 /*** IUnknown methods ***/
1583 #define IDirectMusicPatternTrack_QueryInterface(p,a,b)          (p)->lpVtbl->QueryInterface(p,a,b)
1584 #define IDirectMusicPatternTrack_AddRef(p)                      (p)->lpVtbl->AddRef(p)
1585 #define IDirectMusicPatternTrack_Release(p)                     (p)->lpVtbl->Release(p)
1586 /*** IDirectMusicPatternTrack methods ***/
1587 #define IDirectMusicPatternTrack_CreateSegment(p,a,b)           (p)->lpVtbl->CreateSegment(p,a,b)
1588 #define IDirectMusicPatternTrack_SetVariation(p,a,b,c)          (p)->lpVtbl->SetVariation(p,a,b,c)
1589 #define IDirectMusicPatternTrack_SetPatternByName(p,a,b,c,d,e)  (p)->lpVtbl->SetPatternByName(p,a,b,c,d,e)
1590 #endif
1591
1592
1593 /*****************************************************************************
1594  * IDirectMusicScript interface
1595  */
1596 #undef INTERFACE
1597 #define INTERFACE IDirectMusicScript
1598 #define IDirectMusicScript_METHODS \
1599     /*** IDirectMusicScript methods ***/ \
1600     STDMETHOD(Init)(THIS_ IDirectMusicPerformance *pPerformance, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1601     STDMETHOD(CallRoutine)(THIS_ WCHAR *pwszRoutineName, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1602     STDMETHOD(SetVariableVariant)(THIS_ WCHAR *pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1603     STDMETHOD(GetVariableVariant)(THIS_ WCHAR *pwszVariableName, VARIANT *pvarValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1604     STDMETHOD(SetVariableNumber)(THIS_ WCHAR *pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1605     STDMETHOD(GetVariableNumber)(THIS_ WCHAR *pwszVariableName, LONG *plValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1606     STDMETHOD(SetVariableObject)(THIS_ WCHAR *pwszVariableName, IUnknown *punkValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1607     STDMETHOD(GetVariableObject)(THIS_ WCHAR *pwszVariableName, REFIID riid, LPVOID *ppv, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; \
1608     STDMETHOD(EnumRoutine)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; \
1609     STDMETHOD(EnumVariable)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE;
1610
1611     /*** IDirectMusicScript methods ***/
1612 #define IDirectMusicScript_IMETHODS \
1613     IUnknown_IMETHODS \
1614     IDirectMusicScript_METHODS
1615 ICOM_DEFINE(IDirectMusicScript,IUnknown)
1616 #undef INTERFACE
1617
1618 #ifdef COBJMACROS
1619 /*** IUnknown methods ***/
1620 #define IDirectMusicScript_QueryInterface(p,a,b)                (p)->lpVtbl->QueryInterface(p,a,b)
1621 #define IDirectMusicScript_AddRef(p)                            (p)->lpVtbl->AddRef(p)
1622 #define IDirectMusicScript_Release(p)                           (p)->lpVtbl->Release(p)
1623 /*** IDirectMusicScript methods ***/
1624 #define IDirectMusicPatternTrack_Init(p,a,b)                    (p)->lpVtbl->Init(p,a,b)
1625 #define IDirectMusicPatternTrack_CallRoutine(p,a,b)             (p)->lpVtbl->CallRoutine(p,a,b)
1626 #define IDirectMusicPatternTrack_SetVariableVariant(p,a,b,c,d)  (p)->lpVtbl->SetVariableVariant(p,a,b,c,d)
1627 #define IDirectMusicPatternTrack_GetVariableVariant(p,a,b,c)    (p)->lpVtbl->GetVariableVariant(p,a,b,c)
1628 #define IDirectMusicPatternTrack_SetVariableNumber(p,a,b,c)     (p)->lpVtbl->SetVariableNumber(p,a,b,c)
1629 #define IDirectMusicPatternTrack_GetVariableNumber(p,a,b,c)     (p)->lpVtbl->GetVariableNumber(p,a,b,c)
1630 #define IDirectMusicPatternTrack_SetVariableObject(p,a,b,c)     (p)->lpVtbl->SetVariableObject(p,a,b,c)
1631 #define IDirectMusicPatternTrack_GetVariableObject(p,a,b,c,d)   (p)->lpVtbl->GetVariableObject(p,a,b,c,d)
1632 #define IDirectMusicPatternTrack_EnumRoutine(p,a,b)             (p)->lpVtbl->EnumRoutine(p,a,b)
1633 #define IDirectMusicPatternTrack_EnumVariable(p,a,b)            (p)->lpVtbl->EnumVariable(p,a,b)
1634 #endif
1635
1636
1637 /*****************************************************************************
1638  * IDirectMusicContainer interface
1639  */
1640 #undef INTERFACE
1641 #define INTERFACE IDirectMusicContainer
1642 #define IDirectMusicContainer_METHODS \
1643     /*** IDirectMusicContainer methods ***/ \
1644     STDMETHOD(EnumObject)(THIS_ REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR *pwszAlias) PURE;
1645
1646     /*** IDirectMusicContainer methods ***/
1647 #define IDirectMusicContainer_IMETHODS \
1648     IUnknown_IMETHODS \
1649     IDirectMusicContainer_METHODS
1650 ICOM_DEFINE(IDirectMusicContainer,IUnknown)
1651 #undef INTERFACE
1652
1653 #ifdef COBJMACROS
1654 /*** IUnknown methods ***/
1655 #define IDirectMusicContainer_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
1656 #define IDirectMusicContainer_AddRef(p)              (p)->lpVtbl->AddRef(p)
1657 #define IDirectMusicContainer_Release(p)             (p)->lpVtbl->Release(p)
1658 /*** IDirectMusicContainer methods ***/
1659 #define IDirectMusicContainer_EnumObject(p,a,b,c,d)  (p)->lpVtbl->EnumObject(p,a,b,c,d)
1660 #endif
1661
1662
1663 /*****************************************************************************
1664  * IDirectMusicSong interface
1665  */
1666 #undef INTERFACE
1667 #define INTERFACE IDirectMusicSong
1668 #define IDirectMusicSong_METHODS \
1669     /*** IDirectMusicSong methods ***/ \
1670     STDMETHOD(Compose)(THIS) PURE; \
1671     STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; \
1672     STDMETHOD(GetSegment)(THIS_ WCHAR *pwzName, IDirectMusicSegment **ppSegment) PURE; \
1673     STDMETHOD(GetAudioPathConfig)(THIS_ IUnknown **ppAudioPathConfig) PURE; \
1674     STDMETHOD(Download)(THIS_ IUnknown *pAudioPath) PURE; \
1675     STDMETHOD(Unload)(THIS_ IUnknown *pAudioPath) PURE; \
1676     STDMETHOD(EnumSegment)(THIS_ DWORD dwIndex, IDirectMusicSegment **ppSegment) PURE;
1677
1678     /*** IDirectMusicSong methods ***/
1679 #define IDirectMusicSong_IMETHODS \
1680     IUnknown_IMETHODS \
1681     IDirectMusicSong_METHODS
1682 ICOM_DEFINE(IDirectMusicSong,IUnknown)
1683 #undef INTERFACE
1684
1685 #ifdef COBJMACROS
1686 /*** IUnknown methods ***/
1687 #define IDirectMusicSong_QueryInterface(p,a,b)   (p)->lpVtbl->QueryInterface(p,a,b)
1688 #define IDirectMusicSong_AddRef(p)               (p)->lpVtbl->AddRef(p)
1689 #define IDirectMusicSong_Release(p)              (p)->lpVtbl->Release(p)
1690 /*** IDirectMusicSong methods ***/
1691 #define IDirectMusicSong_Compose(p)              (p)->lpVtbl->Compose(p)
1692 #define IDirectMusicSong_GetParam(p,a,b,c,d,e,f) (p)->lpVtbl->GetParam(p,a,b,c,d,e,f)
1693 #define IDirectMusicSong_GetSegment(p,a,b)       (p)->lpVtbl->GetSegment(p,a,b)
1694 #define IDirectMusicSong_GetAudioPathConfig(p,a) (p)->lpVtbl->GetAudioPathConfig(p,a)
1695 #define IDirectMusicSong_Download(p,a)           (p)->lpVtbl->Download(p,a)
1696 #define IDirectMusicSong_Unload(p,a)             (p)->lpVtbl->Unload(p,a)
1697 #define IDirectMusicSong_EnumSegment(p,a,b)      (p)->lpVtbl->EnumSegment(p,a,b)
1698 #endif
1699
1700 #ifdef __cplusplus
1701 }
1702 #endif
1703
1704 #endif /* __WINE_DMUSIC_PERFORMANCE_H */