23cpp_quote("
#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
25cpp_quote("#ifndef E_UNSUPPORTED_TYPE")
26cpp_quote("#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)")
30cpp_quote("#define DEVICE_STATE_ACTIVE 0x1")
31cpp_quote("#define DEVICE_STATE_DISABLED 0x2")
32cpp_quote("#define DEVICE_STATE_NOTPRESENT 0x4")
33cpp_quote("#define DEVICE_STATE_UNPLUGGED 0x8")
34cpp_quote("#define DEVICE_STATEMASK_ALL 0xf")
36/* Generic PKEY_AudioEndPoint ID for grepping: {1da5d803-d492-4edd-8c23-e0c0ffee7f0e} */
37cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,0);")
38cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,1);")
39cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,2);")
40cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,3);")
41cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,4);")
42cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,5);")
44cpp_quote("#define ENDPOINT_SYSFX_ENABLED 0")
45cpp_quote("#define ENDPOINT_SYSFX_DISABLED 1")
47cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,6);")
48cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Supports_EventDriven_Mode,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,7);")
49cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_JackSubType,0x1da5d803,0xd492,0x4edd,0x8c,0x23,0xe0,0xc0,0xff,0xee,0x7f,0x0e,8);")
51cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat,0xf19f064d,0x082c,0x4e27,0xbc,0x73,0x68,0x82,0xa1,0xbb,0x8e,0x4c,0);")
52cpp_quote("DEFINE_PROPERTYKEY(PKEY_AudioEngine_OEMFormat,0xe4870e26,0x3cc5,0x4cd2,0xba,0x46,0xca,0x0a,0x9a,0x70,0xed,0x04,3);")
54typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS
56 DWORD cbDirectXAudioActivationParams;
57 GUID guidAudioSession;
58 DWORD dwAudioStreamFlags;
59} DIRECTX_AUDIO_ACTIVATION_PARAMS, *PDIRECTX_AUDIO_ACTIVATION_PARAMS;
61typedef enum _EDataFlow
77typedef enum _EndpointFormFactor
86 UnknownDigitalPassthrough,
88 DigitalAudioDisplayDevice,
90 EndpointFormFactor_enum_count
93cpp_quote("#define HDMI DigitalAudioDisplayDevice")
98 uuid(7991eec9-7e89-4d85-8390-6c703cec60c0),
100 pointer_default(unique)
102interface IMMNotificationClient : IUnknown
104 [id(1)] HRESULT OnDeviceStateChanged(
105 [in] LPCWSTR pwstrDeviceId,
106 [in] DWORD dwNewState
108 [id(2)] HRESULT OnDeviceAdded(
109 [in] LPCWSTR pwstrDeviceId
111 [id(3)] HRESULT OnDeviceRemoved(
112 [in] LPCWSTR pwstrDeviceId
114 [id(4)] HRESULT OnDefaultDeviceChanged(
117 [in] LPCWSTR pwstrDeviceId
119 [id(5)] HRESULT OnPropertyValueChanged(
120 [in] LPCWSTR pwstrDeviceId,
121 [in] const PROPERTYKEY key
128 uuid(d666063f-1587-4e43-81f1-b948e807363f),
130 pointer_default(unique)
132interface IMMDevice : IUnknown
134 [id(1)] HRESULT Activate(
137 [in,unique] PROPVARIANT *pActivationParams,
138 [out,iid_is(iid)] void **ppv
140 [id(2)] HRESULT OpenPropertyStore(
141 [in] DWORD stgmAccess,
142 [out] IPropertyStore **ppProperties
144 [id(3)] HRESULT GetId(
145 [out] LPWSTR *ppstrId
147 [id(4)] HRESULT GetState(
148 [out] DWORD *pdwState
155 uuid(0bd7a1be-7a1a-44db-8397-cc5392387b5e),
157 pointer_default(unique)
159interface IMMDeviceCollection : IUnknown
161 [id(1)] HRESULT GetCount(
162 [out] UINT *pcDevices
164 [id(2)] HRESULT Item(
166 [out] IMMDevice **ppdevice
173 uuid(1be09788-6894-4089-8586-9a2a6c265ac5),
175 pointer_default(unique)
177interface IMMEndpoint : IUnknown
179 [id(1)] HRESULT GetDataFlow(
180 [out] EDataFlow *pDataFlow
187 uuid(a95664d2-9614-4f35-a746-de8db63617e6),
189 pointer_default(unique)
191interface IMMDeviceEnumerator : IUnknown
193 [id(1)] HRESULT EnumAudioEndpoints(
194 [in] EDataFlow dataFlow,
195 [in] DWORD dwStateMask,
196 [out] IMMDeviceCollection **ppDevices
198 [id(2)] HRESULT GetDefaultAudioEndpoint(
199 [in] EDataFlow dataFlow,
201 [out] IMMDevice **ppEndpoint
203 [id(3)] HRESULT GetDevice(
204 [in] LPCWSTR pwstrId,
205 [out] IMMDevice **ppDevice
207 [id(4)] HRESULT RegisterEndpointNotificationCallback(
208 [in] IMMNotificationClient *pClient
210 [id(5)] HRESULT UnregisterEndpointNotificationCallback(
211 [in] IMMNotificationClient *pClient
218 uuid(3b0d0ea4-d0a9-4b0e-935b-09516746fac0),
220 pointer_default(unique)
222interface IMMDeviceActivator : IUnknown
224 [id(1)] HRESULT Activate(
226 [in] IMMDevice *pDevice,
227 [in] PROPVARIANT *pActivationParams,
228 [out,iid_is(iid)] void **ppv
232typedef struct _AudioExtensionParams
235 IMMDevice *pEndPoint;
236 IMMDevice *pPnpInterface;
237 IMMDevice *pPnpDevnode;
238} AudioExtensionParams;
241 uuid(2fdaafa3-7523-4f66-9957-9d5e7fe698f6),
244library MMDeviceAPILib
246 [ uuid(bcde0395-e52f-467c-8e3d-c4579291692e) ] coclass MMDeviceEnumerator
248 [default] interface IMMDeviceEnumerator;
CD3D10_BUFFER_DESC D3D10_BUFFER_DESC cpp_quote(" ~CD3D10_BUFFER_DESC() {}") operator const D3D10_BUFFER_DESC &() const