annotate lib/legacy_dx/dmdls.h @ 7:1200e31f08e5

10.10.12
author Серик@ПончиК
date Wed, 10 Oct 2012 21:05:53 +0600
parents 8b8875f5b359
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 /************************************************************************
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 * *
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 * dmdls.h -- DLS download definitions for DirectMusic API's *
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 * *
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 * Copyright (c) Microsoft Corporation. All rights reserved. *
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6 * *
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 ************************************************************************/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 #ifndef _DMDLS_
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 #define _DMDLS_
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 #include "dls1.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 typedef long PCENT; /* Pitch cents */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 typedef long GCENT; /* Gain cents */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 typedef long TCENT; /* Time cents */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 typedef long PERCENT; /* Per.. cent! */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 typedef LONGLONG REFERENCE_TIME;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 typedef REFERENCE_TIME *LPREFERENCE_TIME;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 #ifndef MAKE_FOURCC
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 typedef DWORD FOURCC; /* a four character code */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 #endif
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 typedef struct _DMUS_DOWNLOADINFO
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 DWORD dwDLType; /* Instrument or Wave */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 DWORD dwDLId; /* Unique identifier to tag this download. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 DWORD dwNumOffsetTableEntries; /* Number of index in the offset address table. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 DWORD cbSize; /* Total size of this memory chunk. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 } DMUS_DOWNLOADINFO;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 #define DMUS_DOWNLOADINFO_INSTRUMENT 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 #define DMUS_DOWNLOADINFO_WAVE 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 #define DMUS_DOWNLOADINFO_INSTRUMENT2 3 /* New version for better DLS2 support. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 /* Support for oneshot and streaming wave data
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 #define DMUS_DOWNLOADINFO_WAVEARTICULATION 4 /* Wave articulation data */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 #define DMUS_DOWNLOADINFO_STREAMINGWAVE 5 /* One chunk of a streaming */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 #define DMUS_DOWNLOADINFO_ONESHOTWAVE 6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 #define DMUS_DEFAULT_SIZE_OFFSETTABLE 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 /* Flags for DMUS_INSTRUMENT's ulFlags member */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 #define DMUS_INSTRUMENT_GM_INSTRUMENT (1 << 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 typedef struct _DMUS_OFFSETTABLE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 } DMUS_OFFSETTABLE;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 typedef struct _DMUS_INSTRUMENT
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 ULONG ulPatch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 ULONG ulFirstRegionIdx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 ULONG ulGlobalArtIdx; /* If zero the instrument does not have an articulation */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the instrument */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the instrument */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 ULONG ulFlags;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 } DMUS_INSTRUMENT;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 typedef struct _DMUS_REGION
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 RGNRANGE RangeKey;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 RGNRANGE RangeVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 USHORT fusOptions;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 USHORT usKeyGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 ULONG ulRegionArtIdx; /* If zero the region does not have an articulation */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 ULONG ulNextRegionIdx; /* If zero no more regions */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the region */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 WAVELINK WaveLink;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 WSMPL WSMP; /* If WSMP.cSampleLoops > 1 then a WLOOP is included */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 WLOOP WLOOP[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 } DMUS_REGION;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 typedef struct _DMUS_LFOPARAMS
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 PCENT pcFrequency;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 TCENT tcDelay;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 GCENT gcVolumeScale;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 PCENT pcPitchScale;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 GCENT gcMWToVolume;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 PCENT pcMWToPitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 } DMUS_LFOPARAMS;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 typedef struct _DMUS_VEGPARAMS
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 TCENT tcAttack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 TCENT tcDecay;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 PERCENT ptSustain;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 TCENT tcRelease;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 TCENT tcVel2Attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 TCENT tcKey2Decay;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 } DMUS_VEGPARAMS;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 typedef struct _DMUS_PEGPARAMS
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 TCENT tcAttack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 TCENT tcDecay;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 PERCENT ptSustain;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 TCENT tcRelease;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 TCENT tcVel2Attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 TCENT tcKey2Decay;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 PCENT pcRange;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 } DMUS_PEGPARAMS;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 typedef struct _DMUS_MSCPARAMS
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 PERCENT ptDefaultPan;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 } DMUS_MSCPARAMS;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 typedef struct _DMUS_ARTICPARAMS
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 DMUS_LFOPARAMS LFO;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 DMUS_VEGPARAMS VolEG;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 DMUS_PEGPARAMS PitchEG;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 DMUS_MSCPARAMS Misc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 } DMUS_ARTICPARAMS;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 typedef struct _DMUS_ARTICULATION /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT format. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 ULONG ulArt1Idx; /* DLS Level 1 articulation chunk */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 } DMUS_ARTICULATION;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 typedef struct _DMUS_ARTICULATION2 /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT2 format. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 ULONG ulArtIdx; /* DLS Level 1/2 articulation chunk */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 ULONG ulNextArtIdx; /* Additional articulation chunks */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 } DMUS_ARTICULATION2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 #define DMUS_MIN_DATA_SIZE 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 /* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 typedef struct _DMUS_EXTENSIONCHUNK
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 ULONG cbSize; /* Size of extension chunk */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 ULONG ulNextExtCkIdx; /* If zero no more 3rd party entenstion chunks */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 FOURCC ExtCkID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 BYTE byExtCk[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 } DMUS_EXTENSIONCHUNK;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 /* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 typedef struct _DMUS_COPYRIGHT
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 ULONG cbSize; /* Size of copyright information */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 BYTE byCopyright[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 } DMUS_COPYRIGHT;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 typedef struct _DMUS_WAVEDATA
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 ULONG cbSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 BYTE byData[DMUS_MIN_DATA_SIZE];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 } DMUS_WAVEDATA;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 typedef struct _DMUS_WAVE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the wave */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the wave */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 ULONG ulWaveDataIdx; /* Location of actual wave data. */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 WAVEFORMATEX WaveformatEx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 } DMUS_WAVE;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 typedef struct _DMUS_NOTERANGE *LPDMUS_NOTERANGE;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 typedef struct _DMUS_NOTERANGE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 DWORD dwLowNote; /* Sets the low note for the range of MIDI note events to which the instrument responds.*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 DWORD dwHighNote; /* Sets the high note for the range of MIDI note events to which the instrument responds.*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 } DMUS_NOTERANGE;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 typedef struct _DMUS_WAVEARTDL
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 ULONG ulDownloadIdIdx; /* Download ID's of each buffer */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 ULONG ulBus; /* Playback bus */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 ULONG ulBuffers; /* Buffers */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 ULONG ulMasterDLId; /* Download ID of master voice of slave group */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 USHORT usOptions; /* Same as DLS2 region options */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 } DMUS_WAVEARTDL,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 *LPDMUS_WAVEARTDL;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 typedef struct _DMUS_WAVEDL
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 ULONG cbWaveData; /* Bytes of wave data */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 } DMUS_WAVEDL,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 *LPDMUS_WAVEDL;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 #endif
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199