1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
3 * Copyright 2000 Eric Pouech
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
20 #ifndef __WINE_WINEACM_H
21 #define __WINE_WINEACM_H
23 #include "wine/windef16.h"
24 #include "wine/mmsystem16.h"
26 /***********************************************************************
29 typedef BOOL16 (CALLBACK *ACMDRIVERENUMCB16)(
30 HACMDRIVERID16 hadid, DWORD dwInstance, DWORD fdwSupport
32 typedef UINT (CALLBACK *ACMFILTERCHOOSEHOOKPROC16)(
33 HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
35 typedef UINT16 (CALLBACK *ACMFORMATCHOOSEHOOKPROC16)(
36 HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam
39 typedef struct _ACMDRIVERDETAILS16
58 CHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
59 CHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
60 CHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
61 CHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
62 CHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
63 } ACMDRIVERDETAILS16, *NPACMDRIVERDETAILS16, *LPACMDRIVERDETAILS16;
65 typedef struct _ACMFILTERCHOOSE16
77 char szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
78 char szFilter[ACMFILTERDETAILS_FILTER_CHARS];
83 LPWAVEFILTER pwfltrEnum;
85 HINSTANCE16 hInstance;
86 LPCSTR pszTemplateName;
88 ACMFILTERCHOOSEHOOKPROC16 pfnHook;
89 } ACMFILTERCHOOSE16, *NPACMFILTERCHOOSE16, *LPACMFILTERCHOOSE16;
91 typedef struct _ACMFILTERDETAILS16
99 CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS];
100 } ACMFILTERDETAILS16, *NPACMFILTERDETAILS16, *LPACMFILTERDETAILS16;
102 typedef struct _ACMFILTERTAGDETAILS16
105 DWORD dwFilterTagIndex;
109 DWORD cStandardFilters;
110 CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS];
111 } ACMFILTERTAGDETAILS16, *NPACMFILTERTAGDETAILS16, *LPACMFILTERTAGDETAILS16;
113 typedef struct _ACMFORMATCHOOSE16
124 CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
125 CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
131 LPWAVEFORMATEX pwfxEnum;
133 HINSTANCE16 hInstance;
134 LPCSTR pszTemplateName;
136 ACMFORMATCHOOSEHOOKPROC16 pfnHook;
137 } ACMFORMATCHOOSE16, *NPACMFORMATCHOOSE16, *LPACMFORMATCHOOSE16;
139 typedef struct _ACMFORMATDETAILS16
147 CHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
148 } ACMFORMATDETAILS16, *NPACMFORMATDETAILS16, *LPACMFORMATDETAILS16;
150 typedef struct _ACMFORMATTAGDETAILS16
153 DWORD dwFormatTagIndex;
157 DWORD cStandardFormats;
158 CHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
159 } ACMFORMATTAGDETAILS16, *NPACMFORMATTAGDETAILS16, *LPACMFORMATTAGDETAILS16;
161 typedef ACMSTREAMHEADER ACMSTREAMHEADER16, *NPACMSTREAMHEADER16, *LPACMSTREAMHEADER16;
163 typedef BOOL16 (CALLBACK *ACMFILTERENUMCB16)(
164 HACMDRIVERID16 hadid, LPACMFILTERDETAILS16 pafd,
165 DWORD dwInstance, DWORD fdwSupport
168 typedef BOOL16 (CALLBACK *ACMFILTERTAGENUMCB16)(
169 HACMDRIVERID16 hadid, LPACMFILTERTAGDETAILS16 paftd,
170 DWORD dwInstance, DWORD fdwSupport
173 typedef BOOL16 (CALLBACK *ACMFORMATENUMCB16)(
174 HACMDRIVERID16 hadid, LPACMFORMATDETAILS16 pafd,
175 DWORD dwInstance, DWORD fdwSupport
178 typedef BOOL16 (CALLBACK *ACMFORMATTAGENUMCB16)(
179 HACMDRIVERID16 hadid, LPACMFORMATTAGDETAILS16 paftd,
180 DWORD dwInstance, DWORD fdwSupport
183 /***********************************************************************
187 DWORD WINAPI acmGetVersion16(void);
188 MMRESULT16 WINAPI acmMetrics16(
189 HACMOBJ16 hao, UINT16 uMetric, LPVOID pMetric
191 MMRESULT16 WINAPI acmDriverEnum16(
192 ACMDRIVERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
194 MMRESULT16 WINAPI acmDriverDetails16(
195 HACMDRIVERID16 hadid, LPACMDRIVERDETAILS16 padd, DWORD fdwDetails
197 MMRESULT16 WINAPI acmDriverAdd16(
198 LPHACMDRIVERID16 phadid, HINSTANCE16 hinstModule,
199 LPARAM lParam, DWORD dwPriority, DWORD fdwAdd
201 MMRESULT16 WINAPI acmDriverRemove16(
202 HACMDRIVERID16 hadid, DWORD fdwRemove
204 MMRESULT16 WINAPI acmDriverOpen16(
205 LPHACMDRIVER16 phad, HACMDRIVERID16 hadid, DWORD fdwOpen
207 MMRESULT16 WINAPI acmDriverClose16(
208 HACMDRIVER16 had, DWORD fdwClose
210 LRESULT WINAPI acmDriverMessage16(
211 HACMDRIVER16 had, UINT16 uMsg, LPARAM lParam1, LPARAM lParam2
213 MMRESULT16 WINAPI acmDriverID16(
214 HACMOBJ16 hao, LPHACMDRIVERID16 phadid, DWORD fdwDriverID
216 MMRESULT16 WINAPI acmDriverPriority16(
217 HACMDRIVERID16 hadid, DWORD dwPriority, DWORD fdwPriority
219 MMRESULT16 WINAPI acmFormatTagDetails16(
220 HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd, DWORD fdwDetails
222 MMRESULT16 WINAPI acmFormatTagEnum16(
223 HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd,
224 ACMFORMATTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
226 MMRESULT16 WINAPI acmFormatChoose16(
227 LPACMFORMATCHOOSE16 pafmtc
229 MMRESULT16 WINAPI acmFormatDetails16(
230 HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd, DWORD fdwDetails
232 MMRESULT16 WINAPI acmFormatEnum16(
233 HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd,
234 ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
236 MMRESULT16 WINAPI acmFormatSuggest16(
237 HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
238 LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest
240 MMRESULT16 WINAPI acmFilterTagDetails16(
241 HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd, DWORD fdwDetails
243 MMRESULT16 WINAPI acmFilterTagEnum16(
244 HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd,
245 ACMFILTERTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
247 MMRESULT16 WINAPI acmFilterChoose16(
248 LPACMFILTERCHOOSE16 pafltrc
250 MMRESULT16 WINAPI acmFilterDetails16(
251 HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd, DWORD fdwDetails
253 MMRESULT16 WINAPI acmFilterEnum16(
254 HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd,
255 ACMFILTERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum
257 MMRESULT16 WINAPI acmStreamOpen16(
258 LPHACMSTREAM16 phas, HACMDRIVER16 had,
259 LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst,
260 LPWAVEFILTER pwfltr, DWORD dwCallback,
261 DWORD dwInstance, DWORD fdwOpen
263 MMRESULT16 WINAPI acmStreamClose16(
264 HACMSTREAM16 has, DWORD fdwClose
266 MMRESULT16 WINAPI acmStreamSize16(
267 HACMSTREAM16 has, DWORD cbInput,
268 LPDWORD pdwOutputBytes, DWORD fdwSize
270 MMRESULT16 WINAPI acmStreamConvert16(
271 HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwConvert
273 MMRESULT16 WINAPI acmStreamReset16(
274 HACMSTREAM16 has, DWORD fdwReset
276 MMRESULT16 WINAPI acmStreamPrepareHeader16(
277 HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwPrepare
279 MMRESULT16 WINAPI acmStreamUnprepareHeader16(
280 HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwUnprepare
284 /***********************************************************************
285 * Wine specific - Win32
287 typedef struct _WINE_ACMDRIVERID *PWINE_ACMDRIVERID;
288 typedef struct _WINE_ACMDRIVER *PWINE_ACMDRIVER;
290 #define WINE_ACMOBJ_DONTCARE 0x5EED0000
291 #define WINE_ACMOBJ_DRIVERID 0x5EED0001
292 #define WINE_ACMOBJ_DRIVER 0x5EED0002
293 #define WINE_ACMOBJ_STREAM 0x5EED0003
294 #define WINE_ACMOBJ_NOTIFYWND 0x5EED0004
295 #define WINE_ACMOBJ_LOCALDRIVER 0x5EED0005
297 typedef struct _WINE_ACMOBJ
300 PWINE_ACMDRIVERID pACMDriverID;
301 } WINE_ACMOBJ, *PWINE_ACMOBJ;
303 typedef struct _WINE_ACMLOCALDRIVER * PWINE_ACMLOCALDRIVER;
304 typedef struct _WINE_ACMLOCALDRIVERINST * PWINE_ACMLOCALDRIVERINST;
305 typedef struct _WINE_ACMLOCALDRIVER
309 DRIVERPROC lpDrvProc;
310 PWINE_ACMLOCALDRIVERINST pACMInstList;
311 PWINE_ACMLOCALDRIVER pNextACMLocalDrv;
312 PWINE_ACMLOCALDRIVER pPrevACMLocalDrv;
313 } WINE_ACMLOCALDRIVER;
315 typedef struct _WINE_ACMLOCALDRIVERINST
317 PWINE_ACMLOCALDRIVER pLocalDriver;
320 PWINE_ACMLOCALDRIVERINST pNextACMInst;
321 } WINE_ACMLOCALDRIVERINST;
323 typedef struct _WINE_ACMDRIVER
327 PWINE_ACMLOCALDRIVERINST pLocalDrvrInst;
329 PWINE_ACMDRIVER pNextACMDriver;
332 typedef struct _WINE_ACMSTREAM
335 PWINE_ACMDRIVER pDrv;
336 ACMDRVSTREAMINSTANCE drvInst;
337 HACMDRIVER hAcmDriver;
338 } WINE_ACMSTREAM, *PWINE_ACMSTREAM;
340 typedef struct _WINE_ACMDRIVERID
343 LPWSTR pszDriverAlias;
345 PWINE_ACMLOCALDRIVER pLocalDriver; /* NULL if global */
346 PWINE_ACMDRIVER pACMDriverList;
347 PWINE_ACMDRIVERID pNextACMDriverID;
348 PWINE_ACMDRIVERID pPrevACMDriverID;
349 /* information about the driver itself, either gotten from registry or driver itself */
359 typedef struct _WINE_ACMNOTIFYWND * PWINE_ACMNOTIFYWND;
360 typedef struct _WINE_ACMNOTIFYWND
363 HWND hNotifyWnd; /* Window to notify on ACM events: driver add, driver removal, priority change */
364 DWORD dwNotifyMsg; /* Notification message to send to window */
366 PWINE_ACMNOTIFYWND pNextACMNotifyWnd;
367 PWINE_ACMNOTIFYWND pPrevACMNotifyWnd;
370 /* From internal.c */
371 extern HANDLE MSACM_hHeap;
372 extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID;
373 extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID;
374 extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
375 PWINE_ACMLOCALDRIVER pLocalDriver);
376 extern void MSACM_RegisterAllDrivers(void);
377 extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);
378 extern void MSACM_UnregisterAllDrivers(void);
379 extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID);
380 extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver);
381 extern PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver);
382 extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type);
384 extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM);
385 extern BOOL MSACM_FindFormatTagInCache(WINE_ACMDRIVERID*, DWORD, LPDWORD);
387 extern void MSACM_RePositionDriver(PWINE_ACMDRIVERID, DWORD);
388 extern void MSACM_WriteCurrentPriorities(void);
389 extern void MSACM_BroadcastNotification(void);
390 extern void MSACM_DisableNotifications(void);
391 extern void MSACM_EnableNotifications(void);
392 extern PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg);
393 extern PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(PWINE_ACMNOTIFYWND);
395 extern PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry);
397 extern PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc);
398 extern PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER, LPARAM);
399 extern LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST);
400 extern PWINE_ACMLOCALDRIVER MSACM_UnregisterLocalDriver(PWINE_ACMLOCALDRIVER);
402 extern PWINE_ACMLOCALDRIVER MSACM_GetLocalDriver(HACMDRIVER hDriver);
405 extern HINSTANCE MSACM_hInstance32;
407 /* From pcmcnvtr.c */
408 LRESULT CALLBACK PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
409 LPARAM dwParam1, LPARAM dwParam2);
411 /* Dialog box templates */
412 #include "msacmdlg.h"
414 #endif /* __WINE_WINEACM_H */