source: Daodan/MinGW/include/msacm.h@ 1089

Last change on this file since 1089 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 9.3 KB
Line 
1/*author: Adrian Sandor
2 written for MinGW*/
3#ifndef _MSACM_H
4#define _MSACM_H
5
6#if __GNUC__ >= 3
7#pragma GCC system_header
8#endif
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14DECLARE_HANDLE(HACMDRIVERID);
15typedef HACMDRIVERID *PHACMDRIVERID;
16typedef HACMDRIVERID *LPHACMDRIVERID;
17DECLARE_HANDLE(HACMDRIVER);
18typedef HACMDRIVER *PHACMDRIVER;
19typedef HACMDRIVER *LPHACMDRIVER;
20DECLARE_HANDLE(HACMSTREAM);
21typedef HACMSTREAM *PHACMSTREAM;
22typedef HACMSTREAM *LPHACMSTREAM;
23DECLARE_HANDLE(HACMOBJ);
24typedef HACMOBJ *PHACMOBJ;
25typedef HACMOBJ *LPHACMOBJ;
26
27/*found through experimentation*/
28#define ACMDRIVERDETAILS_SHORTNAME_CHARS 32
29#define ACMDRIVERDETAILS_LONGNAME_CHARS 128
30#define ACMDRIVERDETAILS_COPYRIGHT_CHARS 80
31#define ACMDRIVERDETAILS_LICENSING_CHARS 128
32
33/*I don't know the right values for these macros*/
34#define ACMFORMATDETAILS_FORMAT_CHARS 256
35#define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 256
36#define ACMDRIVERDETAILS_FEATURES_CHARS 256
37
38/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformatdetails_str.asp*/
39typedef struct {
40 DWORD cbStruct;
41 DWORD dwFormatIndex;
42 DWORD dwFormatTag;
43 DWORD fdwSupport;
44 LPWAVEFORMATEX pwfx;
45 DWORD cbwfx;
46 char szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
47} ACMFORMATDETAILSA, *LPACMFORMATDETAILSA;
48typedef struct {
49 DWORD cbStruct;
50 DWORD dwFormatIndex;
51 DWORD dwFormatTag;
52 DWORD fdwSupport;
53 LPWAVEFORMATEX pwfx;
54 DWORD cbwfx;
55 WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
56} ACMFORMATDETAILSW, *LPACMFORMATDETAILSW;
57
58/*msdn.microsoft.com/en-us/library/dd742926%28VS.85%29.aspx*/
59typedef struct {
60 DWORD cbStruct;
61 DWORD fdwStatus;
62 DWORD_PTR dwUser;
63 LPBYTE pbSrc;
64 DWORD cbSrcLength;
65 DWORD cbSrcLengthUsed;
66 DWORD_PTR dwSrcUser;
67 LPBYTE pbDst;
68 DWORD cbDstLength;
69 DWORD cbDstLengthUsed;
70 DWORD_PTR dwDstUser;
71 DWORD dwReservedDriver[10];
72} ACMSTREAMHEADER, *LPACMSTREAMHEADER;
73
74/*msdn.microsoft.com/en-us/library/dd757711%28v=VS.85%29.aspx*/
75typedef struct {
76 DWORD cbStruct;
77 DWORD dwFilterTag;
78 DWORD fdwFilter;
79 DWORD dwReserved[5];
80} WAVEFILTER, *LPWAVEFILTER;
81
82/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformattagdetails_str.asp*/
83typedef struct {
84 DWORD cbStruct;
85 DWORD dwFormatTagIndex;
86 DWORD dwFormatTag;
87 DWORD cbFormatSize;
88 DWORD fdwSupport;
89 DWORD cStandardFormats;
90 char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
91} ACMFORMATTAGDETAILSA, *LPACMFORMATTAGDETAILSA;
92typedef struct {
93 DWORD cbStruct;
94 DWORD dwFormatTagIndex;
95 DWORD dwFormatTag;
96 DWORD cbFormatSize;
97 DWORD fdwSupport;
98 DWORD cStandardFormats;
99 WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
100} ACMFORMATTAGDETAILSW, *LPACMFORMATTAGDETAILSW;
101
102/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverdetails_str.asp*/
103typedef struct {
104 DWORD cbStruct;
105 FOURCC fccType;
106 FOURCC fccComp;
107 WORD wMid;
108 WORD wPid;
109 DWORD vdwACM;
110 DWORD vdwDriver;
111 DWORD fdwSupport;
112 DWORD cFormatTags;
113 DWORD cFilterTags;
114 HICON hicon;
115 char szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
116 char szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
117 char szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
118 char szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
119 char szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
120} ACMDRIVERDETAILSA, *LPACMDRIVERDETAILSA;
121typedef struct {
122 DWORD cbStruct;
123 FOURCC fccType;
124 FOURCC fccComp;
125 WORD wMid;
126 WORD wPid;
127 DWORD vdwACM;
128 DWORD vdwDriver;
129 DWORD fdwSupport;
130 DWORD cFormatTags;
131 DWORD cFilterTags;
132 HICON hicon;
133 WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
134 WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
135 WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
136 WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
137 WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
138} ACMDRIVERDETAILSW, *LPACMDRIVERDETAILSW;
139
140/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformatenumcallback.asp*/
141typedef BOOL (CALLBACK *ACMFORMATENUMCBA) (
142 HACMDRIVERID hadid,
143 LPACMFORMATDETAILSA pafd,
144 DWORD_PTR dwInstance,
145 DWORD fdwSupport
146);
147typedef BOOL (CALLBACK *ACMFORMATENUMCBW) (
148 HACMDRIVERID hadid,
149 LPACMFORMATDETAILSW pafd,
150 DWORD_PTR dwInstance,
151 DWORD fdwSupport
152);
153
154/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformattagenumcallback.asp*/
155typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA) (
156 HACMDRIVERID hadid,
157 LPACMFORMATTAGDETAILSA paftd,
158 DWORD_PTR dwInstance,
159 DWORD fdwSupport
160);
161typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW) (
162 HACMDRIVERID hadid,
163 LPACMFORMATTAGDETAILSW paftd,
164 DWORD_PTR dwInstance,
165 DWORD fdwSupport
166);
167
168/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverenumcallback.asp*/
169typedef BOOL (CALLBACK *ACMDRIVERENUMCB) (
170 HACMDRIVERID hadid,
171 DWORD_PTR dwInstance,
172 DWORD fdwSupport
173);
174
175/*and now the functions...*/
176
177/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriveropen.asp*/
178MMRESULT WINAPI acmDriverOpen(LPHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen);
179/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverenum.asp*/
180MMRESULT WINAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
181/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformatenum.asp*/
182MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, LPACMFORMATDETAILSA pafd, ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
183MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, LPACMFORMATDETAILSW pafd, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
184
185/*msdn.microsoft.com/en-us/library/dd742885%28VS.85%29.aspx*/
186MMRESULT WINAPI acmDriverAddA(LPHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd);
187MMRESULT WINAPI acmDriverAddW(LPHACMDRIVERID phadid, HINSTANCE hinstModule, LPARAM lParam, DWORD dwPriority, DWORD fdwAdd);
188
189/*msdn.microsoft.com/en-us/library/dd742897%28v=VS.85%29.aspx*/
190MMRESULT WINAPI acmDriverRemove(HACMDRIVERID hadid, DWORD fdwRemove);
191
192/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverclose.asp*/
193MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose);
194/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverdetails.asp*/
195MMRESULT WINAPI acmDriverDetailsA(HACMDRIVERID hadid, LPACMDRIVERDETAILSA padd, DWORD fdwDetails);
196MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, LPACMDRIVERDETAILSW padd, DWORD fdwDetails);
197/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformattagenum.asp*/
198MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, LPACMFORMATTAGDETAILSA paftd, ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
199MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, LPACMFORMATTAGDETAILSW paftd, ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
200
201/*msdn.microsoft.com/en-us/library/dd742922(VS.85).aspx*/
202MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric);
203
204/*msdn.microsoft.com/en-us/library/dd742928%28VS.85%29.aspx*/
205MMRESULT WINAPI acmStreamOpen(LPHACMSTREAM phas, HACMDRIVER had, LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst, LPWAVEFILTER pwfltr, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
206
207/*msdn.microsoft.com/en-us/library/dd742931%28VS.85%29.aspx*/
208MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput, LPDWORD pdwOutputBytes, DWORD fdwSize);
209
210/*msdn.microsoft.com/en-us/library/dd742929%28VS.85%29.aspx*/
211MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, LPACMSTREAMHEADER pash, DWORD fdwPrepare);
212
213/*msdn.microsoft.com/en-us/library/dd742932%28VS.85%29.aspx*/
214MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, LPACMSTREAMHEADER pash, DWORD fdwUnprepare);
215
216/*msdn.microsoft.com/en-us/library/dd742930%28VS.85%29.aspx*/
217MMRESULT WINAPI acmStreamReset(HACMSTREAM has, DWORD fdwReset);
218
219/*msdn.microsoft.com/en-us/library/dd742923%28VS.85%29.aspx*/
220MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose);
221
222/*msdn.microsoft.com/en-us/library/dd742924%28VS.85%29.aspx*/
223MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, LPACMSTREAMHEADER pash, DWORD fdwConvert);
224
225#ifdef UNICODE
226
227typedef ACMFORMATDETAILSW ACMFORMATDETAILS, *LPACMFORMATDETAILS;
228typedef ACMFORMATTAGDETAILSW ACMFORMATTAGDETAILS, *LPACMFORMATTAGDETAILS;
229typedef ACMDRIVERDETAILSW ACMDRIVERDETAILS, *LPACMDRIVERDETAILS;
230typedef ACMFORMATENUMCBW ACMFORMATENUMCB;
231typedef ACMFORMATTAGENUMCBW ACMFORMATTAGENUMCB;
232#define acmFormatEnum acmFormatEnumW
233#define acmDriverDetails acmDriverDetailsW
234#define acmFormatTagEnum acmFormatTagEnumW
235#define acmDriverAdd acmDriverAddW
236
237#else /*ifdef UNICODE*/
238
239typedef ACMFORMATDETAILSA ACMFORMATDETAILS, *LPACMFORMATDETAILS;
240typedef ACMFORMATTAGDETAILSA ACMFORMATTAGDETAILS, *LPACMFORMATTAGDETAILS;
241typedef ACMDRIVERDETAILSA ACMDRIVERDETAILS, *LPACMDRIVERDETAILS;
242typedef ACMFORMATENUMCBA ACMFORMATENUMCB;
243typedef ACMFORMATTAGENUMCBA ACMFORMATTAGENUMCB;
244#define acmFormatEnum acmFormatEnumA
245#define acmDriverDetails acmDriverDetailsA
246#define acmFormatTagEnum acmFormatTagEnumA
247#define acmDriverAdd acmDriverAddA
248
249#endif /*ifdef UNICODE*/
250
251#ifdef __cplusplus
252}
253#endif
254
255#endif
Note: See TracBrowser for help on using the repository browser.