ReactOS 0.4.15-dev-7788-g1ad9096
mmdevapi.h
Go to the documentation of this file.
1/*
2 * Copyright 2009 Maarten Lankhorst
3 *
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.
8 *
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.
13 *
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
17 */
18
19#pragma once
20
22extern void MMDevEnum_Free(void) DECLSPEC_HIDDEN;
23
24
25/* Changes to this enum must be synced in drivers. */
27 Priority_Unavailable = 0, /* driver won't work */
28 Priority_Low, /* driver may work, but unlikely */
29 Priority_Neutral, /* driver makes no judgment */
30 Priority_Preferred /* driver thinks it's correct */
31};
32
33typedef struct _DriverFuncs {
37
38 /* Returns a "priority" value for the driver. Highest priority wins.
39 * If multiple drivers think they are valid, they will return a
40 * priority value reflecting the likelihood that they are actually
41 * valid. See enum _DriverPriority. */
42 int (WINAPI *pGetPriority)(void);
43
44 /* ids gets an array of human-friendly endpoint names
45 * keys gets an array of driver-specific stuff that is used
46 * in GetAudioEndpoint to identify the endpoint
47 * it is the caller's responsibility to free both arrays, and
48 * all of the elements in both arrays with HeapFree() */
49 HRESULT (WINAPI *pGetEndpointIDs)(EDataFlow flow, WCHAR ***ids,
51 HRESULT (WINAPI *pGetAudioEndpoint)(void *key, IMMDevice *dev,
53 HRESULT (WINAPI *pGetAudioSessionManager)(IMMDevice *device,
55 HRESULT (WINAPI *pGetPropValue)(GUID *guid,
56 const PROPERTYKEY *prop, PROPVARIANT *out);
58
60
61typedef struct MMDevice {
65
67
73
76
const WCHAR drv_keyW[]
Definition: main.c:50
DriverFuncs drvs
Definition: main.c:48
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID * guid
HRESULT MMDevEnum_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN
Definition: devenum.c:881
void MMDevEnum_Free(void) DECLSPEC_HIDDEN
Definition: devenum.c:902
HRESULT AudioClient_Create(MMDevice *parent, IAudioClient **ppv) DECLSPEC_HIDDEN
_DriverPriority
Definition: mmdevapi.h:26
@ Priority_Neutral
Definition: mmdevapi.h:29
@ Priority_Low
Definition: mmdevapi.h:28
@ Priority_Preferred
Definition: mmdevapi.h:30
@ Priority_Unavailable
Definition: mmdevapi.h:27
struct _DriverFuncs DriverFuncs
HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolumeEx **ppv) DECLSPEC_HIDDEN
Definition: audiovolume.c:305
DriverFuncs drvs DECLSPEC_HIDDEN
Definition: mmdevapi.h:77
enum _EDataFlow EDataFlow
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
WCHAR * drv_id
Definition: mmdevapi.h:71
LONG ref
Definition: mmdevapi.h:64
CRITICAL_SECTION crst
Definition: mmdevapi.h:66
DWORD state
Definition: mmdevapi.h:69
IMMDevice IMMDevice_iface
Definition: mmdevapi.h:62
EDataFlow flow
Definition: mmdevapi.h:68
IMMEndpoint IMMEndpoint_iface
Definition: mmdevapi.h:63
GUID devguid
Definition: mmdevapi.h:70
int(WINAPI *pGetPriority)(void)
WCHAR GUID UINT UINT * default_index
Definition: mmdevapi.h:50
int priority
Definition: mmdevapi.h:36
HMODULE module
Definition: mmdevapi.h:34
HRESULT(WINAPI *pGetPropValue)(GUID *guid
const PROPERTYKEY PROPVARIANT * out
Definition: mmdevapi.h:56
IMMDevice IAudioClient ** out
Definition: mmdevapi.h:52
const PROPERTYKEY * prop
Definition: mmdevapi.h:56
IAudioSessionManager2 ** out
Definition: mmdevapi.h:54
WCHAR module_name[64]
Definition: mmdevapi.h:35
HRESULT(WINAPI *pGetAudioSessionManager)(IMMDevice *device
HRESULT(WINAPI *pGetEndpointIDs)(EDataFlow flow
WCHAR GUID UINT * num
Definition: mmdevapi.h:50
WCHAR *** ids
Definition: mmdevapi.h:49
WCHAR GUID ** guids
Definition: mmdevapi.h:50
IMMDevice * dev
Definition: mmdevapi.h:51
Definition: devices.h:37
Definition: copy.c:22
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180