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
21 #include <endpointvolume.h>
22 #include <spatialaudioclient.h>
25 #include <wine/list.h>
26 #include <wine/unixlib.h>
31 extern HRESULT
MMDevEnum_Create(REFIID riid
, void **ppv
);
32 extern void MMDevEnum_Free(void);
34 typedef struct _DriverFuncs
{
36 unixlib_handle_t module_unixlib
;
37 WCHAR module_name
[64];
39 /* Highest priority wins.
40 * If multiple drivers think they are valid, they will return a
41 * priority value reflecting the likelihood that they are actually
42 * valid. See enum _DriverPriority. */
45 void (WINAPI
*pget_device_guid
)(EDataFlow flow
, const char *name
, GUID
*guid
);
46 BOOL (WINAPI
*pget_device_name_from_guid
)(GUID
*guid
, char **name
, EDataFlow
*flow
);
49 extern DriverFuncs drvs
;
51 typedef struct MMDevice
{
52 IMMDevice IMMDevice_iface
;
53 IMMEndpoint IMMEndpoint_iface
;
56 CRITICAL_SECTION crst
;
66 static inline void wine_unix_call(const unsigned int code
, void *args
)
68 const NTSTATUS status
= __wine_unix_call(drvs
.module_unixlib
, code
, args
);
72 extern HRESULT
AudioClient_Create(GUID
*guid
, IMMDevice
*device
, IAudioClient
**out
);
73 extern HRESULT
AudioEndpointVolume_Create(MMDevice
*parent
, IAudioEndpointVolumeEx
**ppv
);
74 extern HRESULT
AudioSessionManager_Create(IMMDevice
*device
, IAudioSessionManager2
**ppv
);
75 extern HRESULT
SpatialAudioClient_Create(IMMDevice
*device
, ISpatialAudioClient
**out
);
77 extern HRESULT
load_devices_from_reg(void);
78 extern HRESULT
load_driver_devices(EDataFlow flow
);
80 extern void main_loop_stop(void);
82 extern const WCHAR drv_keyW
[];