d3d10/effect: Add a helper to read raw variable values.
[wine.git] / include / xact3wb.h
blob834b3e1ef54ebfc3eadb19c2d8f018e1e15f9e0e
1 /*
2 * Copyright (c) 2020 Alistair Leslie-Hughes
3 * Copyright (c) 2020 Vijay Kiran Kamuju
5 * This library 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 library 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 library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __XACT3WB_H__
20 #define __XACT3WB_H__
22 #include <pshpack1.h>
24 typedef DWORD WAVEBANKOFFSET;
26 #define WAVEBANK_HEADER_SIGNATURE 0x444e4257 /* DNBW */
27 #define WAVEBANK_HEADER_VERSION 44
28 #define WAVEBANK_BANKNAME_LENGTH 64
29 #define WAVEBANK_ENTRYNAME_LENGTH 64
31 #define WAVEBANK_MAX_DATA_SEGMENT_SIZE 0xffffffff
32 #define WAVEBANK_COMPACT_DATA_SEGMENT_SIZE 0x001fffff
34 #define WAVEBANK_TYPE_BUFFER 0x00000000
35 #define WAVEBANK_TYPE_STREAMING 0x00000001
36 #define WAVEBANK_TYPE_MASK 0x00000001
38 #define WAVEBANK_FLAGS_ENTRYNAMES 0x00010000
39 #define WAVEBANK_FLAGS_COMPACT 0x00020000
40 #define WAVEBANK_FLAGS_SYNC_DISABLED 0x00040000
41 #define WAVEBANK_FLAGS_SEEKTABLES 0x00080000
42 #define WAVEBANK_FLAGS_MASK 0x000F0000
44 #define WAVEBANK_DVD_SECTOR_SIZE 2048
45 #define WAVEBANK_DVD_BLOCK_SIZE (WAVEBANK_DVD_SECTOR_SIZE * 16)
46 #define WAVEBANK_ALIGNMENT_MIN 4
47 #define WAVEBANK_ALIGNMENT_DVD WAVEBANK_DVD_SECTOR_SIZE
49 typedef enum WAVEBANKSEGIDX
51 WAVEBANK_SEGIDX_BANKDATA = 0,
52 WAVEBANK_SEGIDX_ENTRYMETADATA,
53 WAVEBANK_SEGIDX_SEEKTABLES,
54 WAVEBANK_SEGIDX_ENTRYNAMES,
55 WAVEBANK_SEGIDX_ENTRYWAVEDATA,
56 WAVEBANK_SEGIDX_COUNT
57 } WAVEBANKSEGIDX, *LPWAVEBANKSEGIDX;
58 typedef const WAVEBANKSEGIDX *LPCWAVEBANKSEGIDX;
60 #define WAVEBANKMINIFORMAT_TAG_PCM 0x0
61 #define WAVEBANKMINIFORMAT_TAG_XMA 0x1
62 #define WAVEBANKMINIFORMAT_TAG_ADPCM 0x2
63 #define WAVEBANKMINIFORMAT_TAG_WMA 0x3
65 #define WAVEBANKMINIFORMAT_BITDEPTH_8 0x0
66 #define WAVEBANKMINIFORMAT_BITDEPTH_16 0x1
68 typedef union WAVEBANKMINIWAVEFORMAT
70 struct
72 DWORD wFormatTag : 2;
73 DWORD nChannels : 3;
74 DWORD nSamplesPerSec : 18;
75 DWORD wBlockAlign : 8;
76 DWORD wBitsPerSample : 1;
77 } DUMMYSTRUCTNAME;
78 DWORD dwValue;
79 } WAVEBANKMINIWAVEFORMAT, *LPWAVEBANKMINIWAVEFORMAT;
80 typedef const WAVEBANKMINIWAVEFORMAT *LPCWAVEBANKMINIWAVEFORMAT;
82 typedef struct WAVEBANKREGION
84 DWORD dwOffset;
85 DWORD dwLength;
86 } WAVEBANKREGION, *LPWAVEBANKREGION;
87 typedef const WAVEBANKREGION *LPCWAVEBANKREGION;
89 typedef struct WAVEBANKSAMPLEREGION
91 DWORD dwStartSample;
92 DWORD dwTotalSamples;
93 } WAVEBANKSAMPLEREGION, *LPWAVEBANKSAMPLEREGION;
94 typedef const WAVEBANKSAMPLEREGION *LPCWAVEBANKSAMPLEREGION;
96 typedef struct WAVEBANKHEADER
98 DWORD dwSignature;
99 DWORD dwVersion;
100 DWORD dwHeaderVersion;
101 WAVEBANKREGION Segments[WAVEBANK_SEGIDX_COUNT];
102 } WAVEBANKHEADER, *LPWAVEBANKHEADER;
103 typedef const WAVEBANKHEADER *LPCWAVEBANKHEADER;
105 #define WAVEBANKENTRY_XMASTREAMS_MAX 3
106 #define WAVEBANKENTRY_XMACHANNELS_MAX 6
108 #define WAVEBANKENTRY_FLAGS_READAHEAD 0x00000001
109 #define WAVEBANKENTRY_FLAGS_LOOPCACHE 0x00000002
110 #define WAVEBANKENTRY_FLAGS_REMOVELOOPTAIL 0x00000004
111 #define WAVEBANKENTRY_FLAGS_IGNORELOOP 0x00000008
112 #define WAVEBANKENTRY_FLAGS_MASK 0x00000008
114 typedef struct WAVEBANKENTRY
116 union
118 struct
120 DWORD dwFlags : 4;
121 DWORD Duration : 28;
122 } DUMMYSTRUCTNAME;
123 DWORD dwFlagsAndDuration;
126 WAVEBANKMINIWAVEFORMAT Format;
127 WAVEBANKREGION PlayRegion;
128 WAVEBANKSAMPLEREGION LoopRegion;
129 } WAVEBANKENTRY, *LPWAVEBANKENTRY;
130 typedef const WAVEBANKENTRY *LPCWAVEBANKENTRY;
132 typedef struct WAVEBANKENTRYCOMPACT
134 DWORD dwOffset : 21;
135 DWORD dwLengthDeviation : 11;
136 } WAVEBANKENTRYCOMPACT, *LPWAVEBANKENTRYCOMPACT;
137 typedef const WAVEBANKENTRYCOMPACT *LPCWAVEBANKENTRYCOMPACT;
139 typedef struct WAVEBANKDATA
141 DWORD dwFlags;
142 DWORD dwEntryCount;
143 CHAR szBankName[WAVEBANK_BANKNAME_LENGTH];
144 DWORD dwEntryMetaDataElementSize;
145 DWORD dwEntryNameElementSize;
146 DWORD dwAlignment;
147 WAVEBANKMINIWAVEFORMAT CompactFormat;
148 FILETIME BuildTime;
149 } WAVEBANKDATA, *LPWAVEBANKDATA;
150 typedef const WAVEBANKDATA *LPCWAVEBANKDATA;
152 #include <poppack.h>
154 #endif /* __XACT3WB_H__ */