usp10: Fix advance width when glyph is missing.
[wine.git] / include / dmdls.h
blobea7dcf009467e0f4c6cee8a7b3dc71e1ded7b546
1 /* DirectMusic DLS Download Definitions
3 * Copyright (C) 2003-2004 Rok Mandeljc
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.
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.
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
20 #ifndef __WINE_DMUSIC_DLS_H
21 #define __WINE_DMUSIC_DLS_H
23 #include <dls1.h>
25 /*****************************************************************************
26 * Typedef definitions
28 typedef LONG GCENT;
29 typedef LONG PCENT;
30 typedef LONG PERCENT;
31 typedef LONG TCENT;
33 #ifndef REFERENCE_TIME_DEFINED
34 #define REFERENCE_TIME_DEFINED
35 typedef LONGLONG REFERENCE_TIME, *LPREFERENCE_TIME;
36 #endif
38 /*****************************************************************************
39 * FOURCC definition
41 #ifndef mmioFOURCC
42 typedef DWORD FOURCC;
43 #define mmioFOURCC(ch0,ch1,ch2,ch3) \
44 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
45 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
46 #endif
48 /*****************************************************************************
49 * Flags
51 #define DMUS_DEFAULT_SIZE_OFFSETTABLE 0x1
53 #define DMUS_DOWNLOADINFO_INSTRUMENT 0x1
54 #define DMUS_DOWNLOADINFO_WAVE 0x2
55 #define DMUS_DOWNLOADINFO_INSTRUMENT2 0x3
56 #define DMUS_DOWNLOADINFO_WAVEARTICULATION 0x4
57 #define DMUS_DOWNLOADINFO_STREAMINGWAVE 0x5
58 #define DMUS_DOWNLOADINFO_ONESHOTWAVE 0x6
60 #define DMUS_INSTRUMENT_GM_INSTRUMENT 0x1
62 #define DMUS_MIN_DATA_SIZE 0x4
64 /*****************************************************************************
65 * Structures
67 /* typedef definitions */
68 typedef struct _DMUS_DOWNLOADINFO DMUS_DOWNLOADINFO, *LPDMUS_DOWNLOADINFO;
69 typedef struct _DMUS_OFFSETTABLE DMUS_OFFSETTABLE, *LPDMUS_OFFSETTABLE;
70 typedef struct _DMUS_INSTRUMENT DMUS_INSTRUMENT, *LPDMUS_INSTRUMENT;
71 typedef struct _DMUS_REGION DMUS_REGION, *LPDMUS_REGION;
72 typedef struct _DMUS_LFOPARAMS DMUS_LFOPARAMS, *LPDMUS_LFOPARAMS;
73 typedef struct _DMUS_VEGPARAMS DMUS_VEGPARAMS, *LPDMUS_VEGPARAMS;
74 typedef struct _DMUS_PEGPARAMS DMUS_PEGPARAMS, *LPDMUS_PEGPARAMS;
75 typedef struct _DMUS_MSCPARAMS DMUS_MSCPARAMS, *LPDMUS_MSCPARAMS;
76 typedef struct _DMUS_ARTICPARAMS DMUS_ARTICPARAMS, *LPDMUS_ARTICPARAMS;
77 typedef struct _DMUS_ARTICULATION DMUS_ARTICULATION, *LPDMUS_ARTICULATION;
78 typedef struct _DMUS_ARTICULATION2 DMUS_ARTICULATION2, *LPDMUS_ARTICULATION2;
79 typedef struct _DMUS_EXTENSIONCHUNK DMUS_EXTENSIONCHUNK, *LPDMUS_EXTENSIONCHUNK;
80 typedef struct _DMUS_COPYRIGHT DMUS_COPYRIGHT, *LPDMUS_COPYRIGHT;
81 typedef struct _DMUS_WAVEDATA DMUS_WAVEDATA, *LPDMUS_WAVEDATA;
82 typedef struct _DMUS_WAVE DMUS_WAVE, *LPDMUS_WAVE;
83 typedef struct _DMUS_NOTERANGE DMUS_NOTERANGE, *LPDMUS_NOTERANGE;
84 typedef struct _DMUS_WAVEARTDL DMUS_WAVEARTDL, *LPDMUS_WAVEARTDL;
85 typedef struct _DMUS_WAVEDL DMUS_WAVEDL, *LPDMUS_WAVEDL;
87 /* actual structures */
88 struct _DMUS_DOWNLOADINFO {
89 DWORD dwDLType;
90 DWORD dwDLId;
91 DWORD dwNumOffsetTableEntries;
92 DWORD cbSize;
95 struct _DMUS_OFFSETTABLE {
96 ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
99 struct _DMUS_INSTRUMENT {
100 ULONG ulPatch;
101 ULONG ulFirstRegionIdx;
102 ULONG ulGlobalArtIdx;
103 ULONG ulFirstExtCkIdx;
104 ULONG ulCopyrightIdx;
105 ULONG ulFlags;
108 struct _DMUS_REGION {
109 RGNRANGE RangeKey;
110 RGNRANGE RangeVelocity;
111 USHORT fusOptions;
112 USHORT usKeyGroup;
113 ULONG ulRegionArtIdx;
114 ULONG ulNextRegionIdx;
115 ULONG ulFirstExtCkIdx;
116 WAVELINK WaveLink;
117 WSMPL WSMP;
118 WLOOP WLOOP[1];
121 struct _DMUS_LFOPARAMS {
122 PCENT pcFrequency;
123 TCENT tcDelay;
124 GCENT gcVolumeScale;
125 PCENT pcPitchScale;
126 GCENT gcMWToVolume;
127 PCENT pcMWToPitch;
130 struct _DMUS_VEGPARAMS {
131 TCENT tcAttack;
132 TCENT tcDecay;
133 PERCENT ptSustain;
134 TCENT tcRelease;
135 TCENT tcVel2Attack;
136 TCENT tcKey2Decay;
139 struct _DMUS_PEGPARAMS {
140 TCENT tcAttack;
141 TCENT tcDecay;
142 PERCENT ptSustain;
143 TCENT tcRelease;
144 TCENT tcVel2Attack;
145 TCENT tcKey2Decay;
146 PCENT pcRange;
149 struct _DMUS_MSCPARAMS {
150 PERCENT ptDefaultPan;
153 struct _DMUS_ARTICPARAMS {
154 DMUS_LFOPARAMS LFO;
155 DMUS_VEGPARAMS VolEG;
156 DMUS_PEGPARAMS PitchEG;
157 DMUS_MSCPARAMS Misc;
160 struct _DMUS_ARTICULATION {
161 ULONG ulArt1Idx;
162 ULONG ulFirstExtCkIdx;
165 struct _DMUS_ARTICULATION2 {
166 ULONG ulArtIdx;
167 ULONG ulFirstExtCkIdx;
168 ULONG ulNextArtIdx;
171 struct _DMUS_EXTENSIONCHUNK {
172 ULONG cbSize;
173 ULONG ulNextExtCkIdx;
174 FOURCC ExtCkID;
175 BYTE byExtCk[DMUS_MIN_DATA_SIZE];
178 struct _DMUS_COPYRIGHT {
179 ULONG cbSize;
180 BYTE byCopyright[DMUS_MIN_DATA_SIZE];
183 struct _DMUS_WAVEDATA {
184 ULONG cbSize;
185 BYTE byData[DMUS_MIN_DATA_SIZE];
188 struct _DMUS_WAVE {
189 ULONG ulFirstExtCkIdx;
190 ULONG ulCopyrightIdx;
191 ULONG ulWaveDataIdx;
192 WAVEFORMATEX WaveformatEx;
195 struct _DMUS_NOTERANGE {
196 DWORD dwLowNote;
197 DWORD dwHighNote;
200 struct _DMUS_WAVEARTDL {
201 ULONG ulDownloadIdIdx;
202 ULONG ulBus;
203 ULONG ulBuffers;
204 ULONG ulMasterDLId;
205 USHORT usOptions;
208 struct _DMUS_WAVEDL {
209 ULONG cbWaveData;
212 #endif /* __WINE_DMUSIC_DLS_H */