mmdevapi: Integrate wineoss's additions in unixlib.h.
[wine.git] / dlls / mmdevapi / mmdevapi.h
blobd694a3930aabfce71ac616bf902f4d8e1c310480
1 /*
2 * Copyright 2009 Maarten Lankhorst
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 #include "unixlib.h"
21 #include <wine/list.h>
23 extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN;
24 extern void MMDevEnum_Free(void) DECLSPEC_HIDDEN;
26 typedef struct _DriverFuncs {
27 HMODULE module;
28 WCHAR module_name[64];
29 int priority;
31 /* Returns a "priority" value for the driver. Highest priority wins.
32 * If multiple drivers think they are valid, they will return a
33 * priority value reflecting the likelihood that they are actually
34 * valid. See enum _DriverPriority. */
35 int (WINAPI *pGetPriority)(void);
37 /* ids gets an array of human-friendly endpoint names
38 * keys gets an array of driver-specific stuff that is used
39 * in GetAudioEndpoint to identify the endpoint
40 * it is the caller's responsibility to free both arrays, and
41 * all of the elements in both arrays with HeapFree() */
42 HRESULT (WINAPI *pGetEndpointIDs)(EDataFlow flow, WCHAR ***ids,
43 GUID **guids, UINT *num, UINT *default_index);
44 HRESULT (WINAPI *pGetAudioEndpoint)(void *key, IMMDevice *dev,
45 IAudioClient **out);
46 HRESULT (WINAPI *pGetAudioSessionManager)(IMMDevice *device,
47 IAudioSessionManager2 **out);
48 HRESULT (WINAPI *pGetPropValue)(GUID *guid,
49 const PROPERTYKEY *prop, PROPVARIANT *out);
50 } DriverFuncs;
52 extern DriverFuncs drvs DECLSPEC_HIDDEN;
54 typedef struct MMDevice {
55 IMMDevice IMMDevice_iface;
56 IMMEndpoint IMMEndpoint_iface;
57 LONG ref;
59 CRITICAL_SECTION crst;
61 EDataFlow flow;
62 DWORD state;
63 GUID devguid;
64 WCHAR *drv_id;
66 struct list entry;
67 } MMDevice;
69 extern HRESULT AudioClient_Create(MMDevice *parent, IAudioClient **ppv) DECLSPEC_HIDDEN;
70 extern HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolumeEx **ppv) DECLSPEC_HIDDEN;
71 extern HRESULT SpatialAudioClient_Create(IMMDevice *device, ISpatialAudioClient **out) DECLSPEC_HIDDEN;
73 extern HRESULT load_devices_from_reg(void) DECLSPEC_HIDDEN;
74 extern HRESULT load_driver_devices(EDataFlow flow) DECLSPEC_HIDDEN;
76 extern const WCHAR drv_keyW[] DECLSPEC_HIDDEN;