Get rid of a W->A crosscall (ResetDCA->ResetDCW).
[wine] / include / dmdls.h
1 /* DirectMusic DLS Download Definitions
2  *
3  * Copyright (C) 2003 Rok Mandeljc
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (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
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __WINE_DMUSIC_DLS_H
21 #define __WINE_DMUSIC_DLS_H
22
23 #include <dls1.h>
24
25 typedef long PCENT, GCENT, TCENT, PERCENT;
26 typedef LONGLONG REFERENCE_TIME, *LPREFERENCE_TIME;
27 /*
28 #ifndef MAKE_FOURCC
29 #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \
30                 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |   \
31                 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
32 typedef DWORD FOURCC;
33 #endif*/
34
35 /*****************************************************************************
36  * Definitions
37  */
38 #define DMUS_DOWNLOADINFO_INSTRUMENT        1
39 #define DMUS_DOWNLOADINFO_WAVE              2
40 #define DMUS_DOWNLOADINFO_INSTRUMENT2       3
41 #define DMUS_DOWNLOADINFO_WAVEARTICULATION  4
42 #define DMUS_DOWNLOADINFO_STREAMINGWAVE     5
43 #define DMUS_DOWNLOADINFO_ONESHOTWAVE       6
44
45 #define DMUS_DEFAULT_SIZE_OFFSETTABLE   1
46  
47 #define DMUS_INSTRUMENT_GM_INSTRUMENT   (1 << 0)
48
49 #define DMUS_MIN_DATA_SIZE 4
50
51 /*****************************************************************************
52  * Structures
53  */
54 typedef struct _DMUS_DOWNLOADINFO
55 {
56     DWORD dwDLType;
57     DWORD dwDLId;
58     DWORD dwNumOffsetTableEntries;
59     DWORD cbSize;
60 } DMUS_DOWNLOADINFO;
61
62 typedef struct _DMUS_OFFSETTABLE
63 {
64     ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
65 } DMUS_OFFSETTABLE;
66
67 typedef struct _DMUS_INSTRUMENT
68 {
69     ULONG           ulPatch;
70     ULONG           ulFirstRegionIdx;
71     ULONG           ulGlobalArtIdx;
72     ULONG           ulFirstExtCkIdx;
73     ULONG           ulCopyrightIdx;
74     ULONG           ulFlags;
75 } DMUS_INSTRUMENT;
76
77 typedef struct _DMUS_REGION
78 {
79     RGNRANGE        RangeKey;
80     RGNRANGE        RangeVelocity;
81     USHORT          fusOptions;
82     USHORT          usKeyGroup;
83     ULONG           ulRegionArtIdx;
84     ULONG           ulNextRegionIdx;
85     ULONG           ulFirstExtCkIdx;
86     WAVELINK        WaveLink;
87     WSMPL           WSMP;
88     WLOOP           WLOOP[1];
89 } DMUS_REGION;
90
91 typedef struct _DMUS_LFOPARAMS
92 {
93     PCENT       pcFrequency;
94     TCENT       tcDelay;
95     GCENT       gcVolumeScale;
96     PCENT       pcPitchScale;
97     GCENT       gcMWToVolume;
98     PCENT       pcMWToPitch;
99 } DMUS_LFOPARAMS;
100
101 typedef struct _DMUS_VEGPARAMS
102 {
103     TCENT       tcAttack;
104     TCENT       tcDecay;
105     PERCENT     ptSustain;
106     TCENT       tcRelease;
107     TCENT       tcVel2Attack;
108     TCENT       tcKey2Decay;
109 } DMUS_VEGPARAMS;
110
111 typedef struct _DMUS_PEGPARAMS
112 {
113     TCENT       tcAttack;
114     TCENT       tcDecay;
115     PERCENT     ptSustain;
116     TCENT       tcRelease;
117     TCENT       tcVel2Attack;
118     TCENT       tcKey2Decay;
119     PCENT       pcRange;
120 } DMUS_PEGPARAMS;
121
122 typedef struct _DMUS_MSCPARAMS
123 {
124     PERCENT     ptDefaultPan;
125 } DMUS_MSCPARAMS;
126
127 typedef struct _DMUS_ARTICPARAMS
128 {
129     DMUS_LFOPARAMS   LFO;
130     DMUS_VEGPARAMS   VolEG;
131     DMUS_PEGPARAMS   PitchEG;
132     DMUS_MSCPARAMS   Misc;
133 } DMUS_ARTICPARAMS;
134
135 typedef struct _DMUS_ARTICULATION
136 {
137     ULONG           ulArt1Idx;
138     ULONG           ulFirstExtCkIdx;
139 } DMUS_ARTICULATION;
140
141 typedef struct _DMUS_ARTICULATION2
142 {
143     ULONG           ulArtIdx;
144     ULONG           ulFirstExtCkIdx;
145     ULONG           ulNextArtIdx;
146 } DMUS_ARTICULATION2;
147
148 typedef struct _DMUS_EXTENSIONCHUNK
149 {
150     ULONG           cbSize;
151     ULONG           ulNextExtCkIdx;
152     FOURCC          ExtCkID;
153     BYTE            byExtCk[DMUS_MIN_DATA_SIZE];
154 } DMUS_EXTENSIONCHUNK;
155
156
157 typedef struct _DMUS_COPYRIGHT
158 {
159     ULONG           cbSize;
160     BYTE            byCopyright[DMUS_MIN_DATA_SIZE];
161 } DMUS_COPYRIGHT;
162
163 typedef struct _DMUS_WAVEDATA
164 {
165     ULONG           cbSize;
166     BYTE            byData[DMUS_MIN_DATA_SIZE];
167 } DMUS_WAVEDATA;
168
169 typedef struct _DMUS_WAVE
170 {
171     ULONG           ulFirstExtCkIdx;
172     ULONG           ulCopyrightIdx;
173     ULONG           ulWaveDataIdx;
174     WAVEFORMATEX    WaveformatEx;
175 } DMUS_WAVE;
176
177 typedef struct _DMUS_NOTERANGE
178 {
179     DWORD           dwLowNote;
180     DWORD           dwHighNote;
181 } DMUS_NOTERANGE, *LPDMUS_NOTERANGE;
182
183 typedef struct _DMUS_WAVEARTDL
184 {
185     ULONG               ulDownloadIdIdx;
186     ULONG               ulBus;
187     ULONG               ulBuffers;
188     ULONG               ulMasterDLId;
189     USHORT              usOptions;
190 }   DMUS_WAVEARTDL, *LPDMUS_WAVEARTDL;
191
192 typedef struct _DMUS_WAVEDL
193 {
194     ULONG               cbWaveData;
195 }   DMUS_WAVEDL, *LPDMUS_WAVEDL;
196
197 #endif /* __WINE_DMUSIC_DLS_H */