1 | /* DirectMusic DLS Download Definitions
|
---|
2 | *
|
---|
3 | * Copyright (C) 2003-2004 Rok Mandeljc
|
---|
4 | *
|
---|
5 | * This program is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU Lesser General Public
|
---|
7 | * License as published by the Free Software Foundation; either
|
---|
8 | * version 2.1 of the License, or (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This program is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
13 | * Lesser General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU Lesser General Public
|
---|
16 | * License along with this program; if not, write to the Free Software
|
---|
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
18 | */
|
---|
19 |
|
---|
20 | /*
|
---|
21 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
22 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
23 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
24 | * a choice of LGPL license versions is made available with the language indicating
|
---|
25 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
26 | * of the LGPL is applied is otherwise unspecified.
|
---|
27 | */
|
---|
28 |
|
---|
29 | #ifndef __WINE_DMUSIC_DLS_H
|
---|
30 | #define __WINE_DMUSIC_DLS_H
|
---|
31 |
|
---|
32 | #include <dls1.h>
|
---|
33 |
|
---|
34 | /*****************************************************************************
|
---|
35 | * Typedef definitions
|
---|
36 | */
|
---|
37 | typedef LONG GCENT;
|
---|
38 | typedef LONG PCENT;
|
---|
39 | typedef LONG PERCENT;
|
---|
40 | typedef LONG TCENT;
|
---|
41 |
|
---|
42 | typedef LONGLONG REFERENCE_TIME, *LPREFERENCE_TIME;
|
---|
43 |
|
---|
44 | /*****************************************************************************
|
---|
45 | * FOURCC definition
|
---|
46 | */
|
---|
47 | #ifndef mmioFOURCC
|
---|
48 | typedef DWORD FOURCC;
|
---|
49 | #define mmioFOURCC(ch0,ch1,ch2,ch3) \
|
---|
50 | ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
|
---|
51 | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | /*****************************************************************************
|
---|
55 | * Flags
|
---|
56 | */
|
---|
57 | #define DMUS_DEFAULT_SIZE_OFFSETTABLE 0x1
|
---|
58 |
|
---|
59 | #define DMUS_DOWNLOADINFO_INSTRUMENT 0x1
|
---|
60 | #define DMUS_DOWNLOADINFO_WAVE 0x2
|
---|
61 | #define DMUS_DOWNLOADINFO_INSTRUMENT2 0x3
|
---|
62 | #define DMUS_DOWNLOADINFO_WAVEARTICULATION 0x4
|
---|
63 | #define DMUS_DOWNLOADINFO_STREAMINGWAVE 0x5
|
---|
64 | #define DMUS_DOWNLOADINFO_ONESHOTWAVE 0x6
|
---|
65 |
|
---|
66 | #define DMUS_INSTRUMENT_GM_INSTRUMENT 0x1
|
---|
67 |
|
---|
68 | #define DMUS_MIN_DATA_SIZE 0x4
|
---|
69 |
|
---|
70 | /*****************************************************************************
|
---|
71 | * Structures
|
---|
72 | */
|
---|
73 | /* typedef definitions */
|
---|
74 | typedef struct _DMUS_DOWNLOADINFO DMUS_DOWNLOADINFO, *LPDMUS_DOWNLOADINFO;
|
---|
75 | typedef struct _DMUS_OFFSETTABLE DMUS_OFFSETTABLE, *LPDMUS_OFFSETTABLE;
|
---|
76 | typedef struct _DMUS_INSTRUMENT DMUS_INSTRUMENT, *LPDMUS_INSTRUMENT;
|
---|
77 | typedef struct _DMUS_REGION DMUS_REGION, *LPDMUS_REGION;
|
---|
78 | typedef struct _DMUS_LFOPARAMS DMUS_LFOPARAMS, *LPDMUS_LFOPARAMS;
|
---|
79 | typedef struct _DMUS_VEGPARAMS DMUS_VEGPARAMS, *LPDMUS_VEGPARAMS;
|
---|
80 | typedef struct _DMUS_PEGPARAMS DMUS_PEGPARAMS, *LPDMUS_PEGPARAMS;
|
---|
81 | typedef struct _DMUS_MSCPARAMS DMUS_MSCPARAMS, *LPDMUS_MSCPARAMS;
|
---|
82 | typedef struct _DMUS_ARTICPARAMS DMUS_ARTICPARAMS, *LPDMUS_ARTICPARAMS;
|
---|
83 | typedef struct _DMUS_ARTICULATION DMUS_ARTICULATION, *LPDMUS_ARTICULATION;
|
---|
84 | typedef struct _DMUS_ARTICULATION2 DMUS_ARTICULATION2, *LPDMUS_ARTICULATION2;
|
---|
85 | typedef struct _DMUS_EXTENSIONCHUNK DMUS_EXTENSIONCHUNK, *LPDMUS_EXTENSIONCHUNK;
|
---|
86 | typedef struct _DMUS_COPYRIGHT DMUS_COPYRIGHT, *LPDMUS_COPYRIGHT;
|
---|
87 | typedef struct _DMUS_WAVEDATA DMUS_WAVEDATA, *LPDMUS_WAVEDATA;
|
---|
88 | typedef struct _DMUS_WAVE DMUS_WAVE, *LPDMUS_WAVE;
|
---|
89 | typedef struct _DMUS_NOTERANGE DMUS_NOTERANGE, *LPDMUS_NOTERANGE;
|
---|
90 | typedef struct _DMUS_WAVEARTDL DMUS_WAVEARTDL, *LPDMUS_WAVEARTDL;
|
---|
91 | typedef struct _DMUS_WAVEDL DMUS_WAVEDL, *LPDMUS_WAVEDL;
|
---|
92 |
|
---|
93 | /* actual structures */
|
---|
94 | struct _DMUS_DOWNLOADINFO {
|
---|
95 | DWORD dwDLType;
|
---|
96 | DWORD dwDLId;
|
---|
97 | DWORD dwNumOffsetTableEntries;
|
---|
98 | DWORD cbSize;
|
---|
99 | };
|
---|
100 |
|
---|
101 | struct _DMUS_OFFSETTABLE {
|
---|
102 | ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
|
---|
103 | };
|
---|
104 |
|
---|
105 | struct _DMUS_INSTRUMENT {
|
---|
106 | ULONG ulPatch;
|
---|
107 | ULONG ulFirstRegionIdx;
|
---|
108 | ULONG ulGlobalArtIdx;
|
---|
109 | ULONG ulFirstExtCkIdx;
|
---|
110 | ULONG ulCopyrightIdx;
|
---|
111 | ULONG ulFlags;
|
---|
112 | };
|
---|
113 |
|
---|
114 | struct _DMUS_REGION {
|
---|
115 | RGNRANGE RangeKey;
|
---|
116 | RGNRANGE RangeVelocity;
|
---|
117 | USHORT fusOptions;
|
---|
118 | USHORT usKeyGroup;
|
---|
119 | ULONG ulRegionArtIdx;
|
---|
120 | ULONG ulNextRegionIdx;
|
---|
121 | ULONG ulFirstExtCkIdx;
|
---|
122 | WAVELINK WaveLink;
|
---|
123 | WSMPL WSMP;
|
---|
124 | WLOOP WLOOP[1];
|
---|
125 | };
|
---|
126 |
|
---|
127 | struct _DMUS_LFOPARAMS {
|
---|
128 | PCENT pcFrequency;
|
---|
129 | TCENT tcDelay;
|
---|
130 | GCENT gcVolumeScale;
|
---|
131 | PCENT pcPitchScale;
|
---|
132 | GCENT gcMWToVolume;
|
---|
133 | PCENT pcMWToPitch;
|
---|
134 | };
|
---|
135 |
|
---|
136 | struct _DMUS_VEGPARAMS {
|
---|
137 | TCENT tcAttack;
|
---|
138 | TCENT tcDecay;
|
---|
139 | PERCENT ptSustain;
|
---|
140 | TCENT tcRelease;
|
---|
141 | TCENT tcVel2Attack;
|
---|
142 | TCENT tcKey2Decay;
|
---|
143 | };
|
---|
144 |
|
---|
145 | struct _DMUS_PEGPARAMS {
|
---|
146 | TCENT tcAttack;
|
---|
147 | TCENT tcDecay;
|
---|
148 | PERCENT ptSustain;
|
---|
149 | TCENT tcRelease;
|
---|
150 | TCENT tcVel2Attack;
|
---|
151 | TCENT tcKey2Decay;
|
---|
152 | PCENT pcRange;
|
---|
153 | };
|
---|
154 |
|
---|
155 | struct _DMUS_MSCPARAMS {
|
---|
156 | PERCENT ptDefaultPan;
|
---|
157 | };
|
---|
158 |
|
---|
159 | struct _DMUS_ARTICPARAMS {
|
---|
160 | DMUS_LFOPARAMS LFO;
|
---|
161 | DMUS_VEGPARAMS VolEG;
|
---|
162 | DMUS_PEGPARAMS PitchEG;
|
---|
163 | DMUS_MSCPARAMS Misc;
|
---|
164 | };
|
---|
165 |
|
---|
166 | struct _DMUS_ARTICULATION {
|
---|
167 | ULONG ulArt1Idx;
|
---|
168 | ULONG ulFirstExtCkIdx;
|
---|
169 | };
|
---|
170 |
|
---|
171 | struct _DMUS_ARTICULATION2 {
|
---|
172 | ULONG ulArtIdx;
|
---|
173 | ULONG ulFirstExtCkIdx;
|
---|
174 | ULONG ulNextArtIdx;
|
---|
175 | };
|
---|
176 |
|
---|
177 | struct _DMUS_EXTENSIONCHUNK {
|
---|
178 | ULONG cbSize;
|
---|
179 | ULONG ulNextExtCkIdx;
|
---|
180 | FOURCC ExtCkID;
|
---|
181 | BYTE byExtCk[DMUS_MIN_DATA_SIZE];
|
---|
182 | };
|
---|
183 |
|
---|
184 | struct _DMUS_COPYRIGHT {
|
---|
185 | ULONG cbSize;
|
---|
186 | BYTE byCopyright[DMUS_MIN_DATA_SIZE];
|
---|
187 | };
|
---|
188 |
|
---|
189 | struct _DMUS_WAVEDATA {
|
---|
190 | ULONG cbSize;
|
---|
191 | BYTE byData[DMUS_MIN_DATA_SIZE];
|
---|
192 | };
|
---|
193 |
|
---|
194 | struct _DMUS_WAVE {
|
---|
195 | ULONG ulFirstExtCkIdx;
|
---|
196 | ULONG ulCopyrightIdx;
|
---|
197 | ULONG ulWaveDataIdx;
|
---|
198 | WAVEFORMATEX WaveformatEx;
|
---|
199 | };
|
---|
200 |
|
---|
201 | struct _DMUS_NOTERANGE {
|
---|
202 | DWORD dwLowNote;
|
---|
203 | DWORD dwHighNote;
|
---|
204 | };
|
---|
205 |
|
---|
206 | struct _DMUS_WAVEARTDL {
|
---|
207 | ULONG ulDownloadIdIdx;
|
---|
208 | ULONG ulBus;
|
---|
209 | ULONG ulBuffers;
|
---|
210 | ULONG ulMasterDLId;
|
---|
211 | USHORT usOptions;
|
---|
212 | };
|
---|
213 |
|
---|
214 | struct _DMUS_WAVEDL {
|
---|
215 | ULONG cbWaveData;
|
---|
216 | };
|
---|
217 |
|
---|
218 | #endif /* __WINE_DMUSIC_DLS_H */
|
---|