xref: /reactos/sdk/include/dxsdk/dmdls.h (revision c2c66aff)
1 #ifndef _DMDLS_
2 #define _DMDLS_
3 
4 #include "dls1.h"
5 
6 #define DMUS_DOWNLOADINFO_INSTRUMENT            1
7 #define DMUS_DOWNLOADINFO_WAVE                  2
8 #define DMUS_DOWNLOADINFO_INSTRUMENT2           3
9 #define DMUS_DOWNLOADINFO_WAVEARTICULATION      4
10 #define DMUS_DOWNLOADINFO_STREAMINGWAVE         5
11 #define DMUS_DOWNLOADINFO_ONESHOTWAVE           6
12 #define DMUS_DEFAULT_SIZE_OFFSETTABLE           1
13 #define DMUS_INSTRUMENT_GM_INSTRUMENT           (1 << 0)
14 #define DMUS_MIN_DATA_SIZE                      4
15 
16 typedef long PCENT;
17 typedef long GCENT;
18 typedef long TCENT;
19 typedef long PERCENT;
20 typedef LONGLONG REFERENCE_TIME;
21 typedef REFERENCE_TIME *LPREFERENCE_TIME;
22 
23 #ifndef MAKEFOURCC
24   #define MAKEFOURCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
25   typedef DWORD           FOURCC;
26 #endif
27 
28 
29 typedef struct _DMUS_LFOPARAMS
30 {
31   PCENT pcFrequency;
32   TCENT tcDelay;
33   GCENT gcVolumeScale;
34   PCENT pcPitchScale;
35   GCENT gcMWToVolume;
36   PCENT pcMWToPitch;
37 } DMUS_LFOPARAMS;
38 
39 typedef struct _DMUS_VEGPARAMS
40 {
41   TCENT tcAttack;
42   TCENT tcDecay;
43   PERCENT ptSustain;
44   TCENT tcRelease;
45   TCENT tcVel2Attack;
46   TCENT tcKey2Decay;
47 } DMUS_VEGPARAMS;
48 
49 typedef struct _DMUS_PEGPARAMS
50 {
51   TCENT tcAttack;
52   TCENT tcDecay;
53   PERCENT ptSustain;
54   TCENT tcRelease;
55   TCENT tcVel2Attack;
56   TCENT tcKey2Decay;
57   PCENT pcRange;
58 } DMUS_PEGPARAMS;
59 
60 typedef struct _DMUS_MSCPARAMS
61 {
62   PERCENT ptDefaultPan;
63 } DMUS_MSCPARAMS;
64 
65 typedef struct _DMUS_DOWNLOADINFO
66 {
67   DWORD dwDLType;
68   DWORD dwDLId;
69   DWORD dwNumOffsetTableEntries;
70   DWORD cbSize;
71 } DMUS_DOWNLOADINFO;
72 
73 typedef struct _DMUS_OFFSETTABLE
74 {
75   ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
76 } DMUS_OFFSETTABLE;
77 
78 typedef struct _DMUS_INSTRUMENT
79 {
80   ULONG ulPatch;
81   ULONG ulFirstRegionIdx;
82   ULONG ulGlobalArtIdx;
83   ULONG ulFirstExtCkIdx;
84   ULONG ulCopyrightIdx;
85   ULONG ulFlags;
86 } DMUS_INSTRUMENT;
87 
88 typedef struct _DMUS_REGION
89 {
90   RGNRANGE RangeKey;
91   RGNRANGE RangeVelocity;
92   USHORT fusOptions;
93   USHORT usKeyGroup;
94   ULONG ulRegionArtIdx;
95   ULONG ulNextRegionIdx;
96   ULONG ulFirstExtCkIdx;
97   WAVELINK WaveLink;
98   WSMPL WSMP;
99   WLOOP WLOOP[1];
100 } DMUS_REGION;
101 
102 typedef struct _DMUS_NOTERANGE
103 {
104   DWORD dwLowNote;
105   DWORD dwHighNote;
106 } DMUS_NOTERANGE, *LPDMUS_NOTERANGE;
107 
108 typedef struct _DMUS_COPYRIGHT
109 {
110     ULONG cbSize;
111     BYTE byCopyright[DMUS_MIN_DATA_SIZE];
112 } DMUS_COPYRIGHT;
113 
114 
115 typedef struct _DMUS_EXTENSIONCHUNK
116 {
117   ULONG cbSize;
118   ULONG ulNextExtCkIdx;
119   FOURCC ExtCkID;
120   BYTE byExtCk[DMUS_MIN_DATA_SIZE];
121 } DMUS_EXTENSIONCHUNK;
122 
123 
124 typedef struct _DMUS_WAVE
125 {
126   ULONG ulFirstExtCkIdx;
127   ULONG ulCopyrightIdx;
128   ULONG ulWaveDataIdx;
129   WAVEFORMATEX WaveformatEx;
130 } DMUS_WAVE;
131 
132 typedef struct _DMUS_WAVEDATA
133 {
134   ULONG cbSize;
135   BYTE byData[DMUS_MIN_DATA_SIZE];
136 } DMUS_WAVEDATA;
137 
138 typedef struct _DMUS_ARTICULATION
139 {
140   ULONG ulArt1Idx;
141   ULONG ulFirstExtCkIdx;
142 } DMUS_ARTICULATION;
143 
144 typedef struct _DMUS_ARTICULATION2
145 {
146   ULONG ulArtIdx;
147   ULONG ulFirstExtCkIdx;
148   ULONG ulNextArtIdx;
149 } DMUS_ARTICULATION2;
150 
151 typedef struct _DMUS_WAVEDL
152 {
153   ULONG cbWaveData;
154 }   DMUS_WAVEDL, *LPDMUS_WAVEDL;
155 
156 typedef struct _DMUS_ARTICPARAMS
157 {
158   DMUS_LFOPARAMS LFO;
159   DMUS_VEGPARAMS VolEG;
160   DMUS_PEGPARAMS PitchEG;
161   DMUS_MSCPARAMS Misc;
162 } DMUS_ARTICPARAMS;
163 
164 typedef struct _DMUS_WAVEARTDL
165 {
166   ULONG ulDownloadIdIdx;
167   ULONG ulBus;
168   ULONG ulBuffers;
169     ULONG ulMasterDLId;
170   USHORT usOptions;
171 } DMUS_WAVEARTDL, *LPDMUS_WAVEARTDL;
172 
173 
174 #endif
175 
176