kernelbase: Reimplement Internal_EnumCalendarInfo() using the locale.nls data.
[wine.git] / include / xact2wb.h
blob5950382f5146e55b754df85d7301e82a6090c82c
1 /*
2 * Copyright (c) 2020 Vijay Kiran Kamuju
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __XACT2WB_H__
20 #define __XACT2WB_H__
22 #include <pshpack1.h>
24 typedef DWORD WAVEBANKOFFSET;
26 #define WAVEBANK_HEADER_SIGNATURE 0x444e4257 /* DNBW */
27 #define WAVEBANK_BANKNAME_LENGTH 64
28 #define WAVEBANK_ENTRYNAME_LENGTH 64
30 #define WAVEBANK_TYPE_BUFFER 0x00000000
31 #define WAVEBANK_TYPE_STREAMING 0x00000001
32 #define WAVEBANK_TYPE_MASK 0x00000001
34 #define WAVEBANK_FLAGS_ENTRYNAMES 0x00010000
35 #define WAVEBANK_FLAGS_COMPACT 0x00020000
36 #define WAVEBANK_FLAGS_SYNC_DISABLED 0x00040000
37 #define WAVEBANK_FLAGS_SEEKTABLES 0x00080000
39 #define WAVEBANK_DVD_SECTOR_SIZE 2048
40 #define WAVEBANK_DVD_BLOCK_SIZE (WAVEBANK_DVD_SECTOR_SIZE * 16)
41 #define WAVEBANK_ALIGNMENT_MIN 4
42 #define WAVEBANK_ALIGNMENT_DVD WAVEBANK_DVD_SECTOR_SIZE
44 typedef enum WAVEBANKSEGIDX
46 WAVEBANK_SEGIDX_BANKDATA = 0,
47 WAVEBANK_SEGIDX_ENTRYMETADATA,
48 WAVEBANK_SEGIDX_SEEKTABLES,
49 WAVEBANK_SEGIDX_ENTRYNAMES,
50 WAVEBANK_SEGIDX_ENTRYWAVEDATA,
51 WAVEBANK_SEGIDX_COUNT
52 } WAVEBANKSEGIDX, *LPWAVEBANKSEGIDX;
53 typedef const WAVEBANKSEGIDX *LPCWAVEBANKSEGIDX;
55 #define WAVEBANKMINIFORMAT_TAG_PCM 0x0
56 #define WAVEBANKMINIFORMAT_TAG_XMA 0x1
57 #define WAVEBANKMINIFORMAT_TAG_ADPCM 0x2
59 #define WAVEBANKMINIFORMAT_BITDEPTH_8 0x0
60 #define WAVEBANKMINIFORMAT_BITDEPTH_16 0x1
62 typedef union WAVEBANKMINIWAVEFORMAT
64 struct
66 DWORD wFormatTag : 2;
67 DWORD nChannels : 3;
68 DWORD nSamplesPerSec : 18;
69 DWORD wBlockAlign : 8;
70 DWORD wBitsPerSample : 1;
72 DWORD dwValue;
73 } WAVEBANKMINIWAVEFORMAT, *LPWAVEBANKMINIWAVEFORMAT;
74 typedef const WAVEBANKMINIWAVEFORMAT *LPCWAVEBANKMINIWAVEFORMAT;
76 typedef struct WAVEBANKREGION
78 DWORD dwOffset;
79 DWORD dwLength;
80 } WAVEBANKREGION, *LPWAVEBANKREGION;
81 typedef const WAVEBANKREGION *LPCWAVEBANKREGION;
83 typedef struct WAVEBANKSAMPLEREGION
85 DWORD dwStartSample;
86 DWORD dwTotalSamples;
87 } WAVEBANKSAMPLEREGION, *LPWAVEBANKSAMPLEREGION;
88 typedef const WAVEBANKSAMPLEREGION *LPCWAVEBANKSAMPLEREGION;
90 typedef struct WAVEBANKHEADER
92 DWORD dwSignature;
93 DWORD dwVersion;
94 #if XACT3_VER >= 0x0205
95 DWORD dwHeaderVersion;
96 #endif
97 WAVEBANKREGION Segments[WAVEBANK_SEGIDX_COUNT];
98 } WAVEBANKHEADER, *LPWAVEBANKHEADER;
99 typedef const WAVEBANKHEADER *LPCWAVEBANKHEADER;
101 #define WAVEBANKENTRY_XMASTREAMS_MAX 3
102 #define WAVEBANKENTRY_XMACHANNELS_MAX 6
104 #define WAVEBANKENTRY_FLAGS_READAHEAD 0x00000001
105 #define WAVEBANKENTRY_FLAGS_LOOPCACHE 0x00000002
106 #define WAVEBANKENTRY_FLAGS_REMOVELOOPTAIL 0x00000004
107 #define WAVEBANKENTRY_FLAGS_IGNORELOOP 0x00000008
108 #define WAVEBANKENTRY_FLAGS_MASK 0x00000008
110 typedef struct WAVEBANKENTRY
112 union
114 struct
116 DWORD dwFlags : 4;
117 DWORD Duration : 28;
119 DWORD dwFlagsAndDuration;
122 WAVEBANKMINIWAVEFORMAT Format;
123 WAVEBANKREGION PlayRegion;
124 #if XACT3_VER >= 0x0202
125 WAVEBANKSAMPLEREGION LoopRegion;
126 #else
127 union
129 WAVEBANKREGION LoopRegion;
130 struct
132 DWORD dwStartOffset;
133 DWORD nSubframeSkip : 2;
134 DWORD nSubframeEnd : 2;
135 DWORD dwEndOffset : 28;
136 } XMALoopRegion[WAVEBANKENTRY_XMASTREAMS_MAX];
137 WAVEBANKREGION LoopRegionAlias[WAVEBANKENTRY_XMASTREAMS_MAX];
139 #endif
140 } WAVEBANKENTRY, *LPWAVEBANKENTRY;
141 typedef const WAVEBANKENTRY *LPCWAVEBANKENTRY;
143 typedef struct WAVEBANKENTRYCOMPACT
145 DWORD dwOffset : 21;
146 DWORD dwLengthDeviation : 11;
147 } WAVEBANKENTRYCOMPACT, *LPWAVEBANKENTRYCOMPACT;
148 typedef const WAVEBANKENTRYCOMPACT *LPCWAVEBANKENTRYCOMPACT;
150 typedef struct WAVEBANKDATA
152 DWORD dwFlags;
153 DWORD dwEntryCount;
154 CHAR szBankName[WAVEBANK_BANKNAME_LENGTH];
155 DWORD dwEntryMetaDataElementSize;
156 DWORD dwEntryNameElementSize;
157 DWORD dwAlignment;
158 WAVEBANKMINIWAVEFORMAT CompactFormat;
159 FILETIME BuildTime;
160 } WAVEBANKDATA, *LPWAVEBANKDATA;
161 typedef const WAVEBANKDATA *LPCWAVEBANKDATA;
163 #include <poppack.h>
165 #endif /* __XACT2WB_H__ */