dls1.h 4.97 KB
Newer Older
1
/* Defines and Structures for Instrument Collection Form RIFF DLS1
2
 *
3
 * Copyright (C) 2003-2004 Rok Mandeljc
4
 *
5 6 7 8
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
9 10 11
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
14
 *
15 16 17
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18
 */
19
 
20 21 22 23
#ifndef __WINE_INCLUDE_DLS1_H
#define __WINE_INCLUDE_DLS1_H

/*****************************************************************************
24
 * FOURCCs
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
 */
#define FOURCC_DLS   mmioFOURCC('D','L','S',' ')
#define FOURCC_DLID  mmioFOURCC('d','l','i','d')
#define FOURCC_COLH  mmioFOURCC('c','o','l','h')
#define FOURCC_WVPL  mmioFOURCC('w','v','p','l')
#define FOURCC_PTBL  mmioFOURCC('p','t','b','l')
#define FOURCC_PATH  mmioFOURCC('p','a','t','h')
#define FOURCC_wave  mmioFOURCC('w','a','v','e')
#define FOURCC_LINS  mmioFOURCC('l','i','n','s')
#define FOURCC_INS   mmioFOURCC('i','n','s',' ')
#define FOURCC_INSH  mmioFOURCC('i','n','s','h')
#define FOURCC_LRGN  mmioFOURCC('l','r','g','n')
#define FOURCC_RGN   mmioFOURCC('r','g','n',' ')
#define FOURCC_RGNH  mmioFOURCC('r','g','n','h')
#define FOURCC_LART  mmioFOURCC('l','a','r','t')
#define FOURCC_ART1  mmioFOURCC('a','r','t','1')
#define FOURCC_WLNK  mmioFOURCC('w','l','n','k')
#define FOURCC_WSMP  mmioFOURCC('w','s','m','p')
#define FOURCC_VERS  mmioFOURCC('v','e','r','s')

/*****************************************************************************
46
 * Flags
47
 */
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97

#define CONN_DST_NONE             0x000
#define CONN_DST_ATTENUATION      0x001
#define CONN_DST_PITCH            0x003
#define CONN_DST_PAN              0x004

#define CONN_DST_LFO_FREQUENCY    0x104
#define CONN_DST_LFO_STARTDELAY   0x105

#define CONN_DST_EG1_ATTACKTIME   0x206
#define CONN_DST_EG1_DECAYTIME    0x207
#define CONN_DST_EG1_RELEASETIME  0x209
#define CONN_DST_EG1_SUSTAINLEVEL 0x20A

#define CONN_DST_EG2_ATTACKTIME   0x30A
#define CONN_DST_EG2_DECAYTIME    0x30B
#define CONN_DST_EG2_RELEASETIME  0x30D
#define CONN_DST_EG2_SUSTAINLEVEL 0x30E

#define CONN_SRC_NONE             0x000
#define CONN_SRC_LFO              0x001
#define CONN_SRC_KEYONVELOCITY    0x002
#define CONN_SRC_KEYNUMBER        0x003
#define CONN_SRC_EG1              0x004
#define CONN_SRC_EG2              0x005
#define CONN_SRC_PITCHWHEEL       0x006

#define CONN_SRC_CC1              0x081
#define CONN_SRC_CC7              0x087
#define CONN_SRC_CC10             0x08A
#define CONN_SRC_CC11             0x08B

#define CONN_TRN_NONE             0x000
#define CONN_TRN_CONCAVE          0x001

#define F_INSTRUMENT_DRUMS 0x80000000

#define F_RGN_OPTION_SELFNONEXCLUSIVE 0x1

#define F_WAVELINK_PHASE_MASTER 0x1

#define F_WSMP_NO_TRUNCATION  0x1
#define F_WSMP_NO_COMPRESSION 0x2

#define POOL_CUE_NULL 0xFFFFFFFF

#define WAVELINK_CHANNEL_LEFT  0x1
#define WAVELINK_CHANNEL_RIGHT 0x2

#define WLOOP_TYPE_FORWARD 0x0
98 99 100 101

/*****************************************************************************
 * Structures
 */
102 103

/* actual structures */
104
typedef struct _DLSID {
105 106 107 108
	ULONG  ulData1;
	USHORT usData2;
	USHORT usData3;
	BYTE   abData4[8];
109
} DLSID, *LPDLSID;
110

111
typedef struct _DLSVERSION {
112 113
	DWORD dwVersionMS;
	DWORD dwVersionLS;
114
} DLSVERSION, *LPDLSVERSION;
115

116
typedef struct _CONNECTION {
117 118 119 120 121
	USHORT usSource;
	USHORT usControl;
	USHORT usDestination;
	USHORT usTransform;
	LONG   lScale;
122
} CONNECTION, *LPCONNECTION;
123

124
typedef struct _CONNECTIONLIST {
125 126
	ULONG cbSize;
	ULONG cConnections;
127
} CONNECTIONLIST, *LPCONNECTIONLIST;
128

129
typedef struct _RGNRANGE {
130 131
	USHORT usLow;
	USHORT usHigh;
132
} RGNRANGE, *LPRGNRANGE;
133

134
typedef struct _MIDILOCALE {
135 136
	ULONG ulBank;
	ULONG ulInstrument;
137
} MIDILOCALE, *LPMIDILOCALE;
138

139
typedef struct _RGNHEADER {
140 141 142 143
	RGNRANGE RangeKey;
	RGNRANGE RangeVelocity;
	USHORT   fusOptions;
	USHORT   usKeyGroup;
144
} RGNHEADER, *LPRGNHEADER;
145

146
typedef struct _INSTHEADER {
147 148
	ULONG      cRegions;
	MIDILOCALE Locale;
149
} INSTHEADER, *LPINSTHEADER;
150

151
typedef struct _DLSHEADER {
152
	ULONG cInstruments;
153
} DLSHEADER, *LPDLSHEADER;
154

155
typedef struct _WAVELINK {
156 157 158 159
	USHORT fusOptions;
	USHORT usPhaseGroup;
	ULONG  ulChannel;
	ULONG  ulTableIndex;
160
} WAVELINK, *LPWAVELINK;
161

162
typedef struct _POOLCUE {
163
	ULONG ulOffset;
164
} POOLCUE, *LPPOOLCUE;
165

166
typedef struct _POOLTABLE {
167 168
	ULONG cbSize;
	ULONG cCues;
169
} POOLTABLE, *LPPOOLTABLE;
170

171
typedef struct _rwsmp {
172 173 174 175 176 177
	ULONG  cbSize;
	USHORT usUnityNote;
	SHORT  sFineTune;
	LONG   lAttenuation;
	ULONG  fulOptions;
	ULONG  cSampleLoops;
178
} WSMPL, *LPWSMPL;
179

180
typedef struct _rloop {
181 182 183 184
	ULONG cbSize;
	ULONG ulType;
	ULONG ulStart;
	ULONG ulLength;
185
} WLOOP, *LPWLOOP;
186 187

#endif /* __WINE_INCLUDE_DLS1_H */