audiopolicy.h 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156
  1. /*** Autogenerated by WIDL 7.7 from include/audiopolicy.idl - Do not edit ***/
  2. #ifdef _WIN32
  3. #ifndef __REQUIRED_RPCNDR_H_VERSION__
  4. #define __REQUIRED_RPCNDR_H_VERSION__ 475
  5. #endif
  6. #include <rpc.h>
  7. #include <rpcndr.h>
  8. #endif
  9. #ifndef COM_NO_WINDOWS_H
  10. #include <windows.h>
  11. #include <ole2.h>
  12. #endif
  13. #ifndef __audiopolicy_h__
  14. #define __audiopolicy_h__
  15. /* Forward declarations */
  16. #ifndef __IAudioSessionEvents_FWD_DEFINED__
  17. #define __IAudioSessionEvents_FWD_DEFINED__
  18. typedef interface IAudioSessionEvents IAudioSessionEvents;
  19. #ifdef __cplusplus
  20. interface IAudioSessionEvents;
  21. #endif /* __cplusplus */
  22. #endif
  23. #ifndef __IAudioSessionControl_FWD_DEFINED__
  24. #define __IAudioSessionControl_FWD_DEFINED__
  25. typedef interface IAudioSessionControl IAudioSessionControl;
  26. #ifdef __cplusplus
  27. interface IAudioSessionControl;
  28. #endif /* __cplusplus */
  29. #endif
  30. #ifndef __IAudioSessionControl2_FWD_DEFINED__
  31. #define __IAudioSessionControl2_FWD_DEFINED__
  32. typedef interface IAudioSessionControl2 IAudioSessionControl2;
  33. #ifdef __cplusplus
  34. interface IAudioSessionControl2;
  35. #endif /* __cplusplus */
  36. #endif
  37. #ifndef __IAudioSessionManager_FWD_DEFINED__
  38. #define __IAudioSessionManager_FWD_DEFINED__
  39. typedef interface IAudioSessionManager IAudioSessionManager;
  40. #ifdef __cplusplus
  41. interface IAudioSessionManager;
  42. #endif /* __cplusplus */
  43. #endif
  44. #ifndef __IAudioVolumeDuckNotification_FWD_DEFINED__
  45. #define __IAudioVolumeDuckNotification_FWD_DEFINED__
  46. typedef interface IAudioVolumeDuckNotification IAudioVolumeDuckNotification;
  47. #ifdef __cplusplus
  48. interface IAudioVolumeDuckNotification;
  49. #endif /* __cplusplus */
  50. #endif
  51. #ifndef __IAudioSessionNotification_FWD_DEFINED__
  52. #define __IAudioSessionNotification_FWD_DEFINED__
  53. typedef interface IAudioSessionNotification IAudioSessionNotification;
  54. #ifdef __cplusplus
  55. interface IAudioSessionNotification;
  56. #endif /* __cplusplus */
  57. #endif
  58. #ifndef __IAudioSessionEnumerator_FWD_DEFINED__
  59. #define __IAudioSessionEnumerator_FWD_DEFINED__
  60. typedef interface IAudioSessionEnumerator IAudioSessionEnumerator;
  61. #ifdef __cplusplus
  62. interface IAudioSessionEnumerator;
  63. #endif /* __cplusplus */
  64. #endif
  65. #ifndef __IAudioSessionManager2_FWD_DEFINED__
  66. #define __IAudioSessionManager2_FWD_DEFINED__
  67. typedef interface IAudioSessionManager2 IAudioSessionManager2;
  68. #ifdef __cplusplus
  69. interface IAudioSessionManager2;
  70. #endif /* __cplusplus */
  71. #endif
  72. /* Headers for imported files */
  73. #include <oaidl.h>
  74. #include <ocidl.h>
  75. #include <propidl.h>
  76. #include <audiosessiontypes.h>
  77. #include <audioclient.h>
  78. #ifdef __cplusplus
  79. extern "C" {
  80. #endif
  81. #include <winapifamily.h>
  82. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
  83. typedef enum AudioSessionDisconnectReason {
  84. DisconnectReasonDeviceRemoval = 0,
  85. DisconnectReasonServerShutdown = 1,
  86. DisconnectReasonFormatChanged = 2,
  87. DisconnectReasonSessionLogoff = 3,
  88. DisconnectReasonSessionDisconnected = 4,
  89. DisconnectReasonExclusiveModeOverride = 5
  90. } AudioSessionDisconnectReason;
  91. /*****************************************************************************
  92. * IAudioSessionEvents interface
  93. */
  94. #ifndef __IAudioSessionEvents_INTERFACE_DEFINED__
  95. #define __IAudioSessionEvents_INTERFACE_DEFINED__
  96. DEFINE_GUID(IID_IAudioSessionEvents, 0x24918acc, 0x64b3, 0x37c1, 0x8c,0xa9, 0x74,0xa6,0x6e,0x99,0x57,0xa8);
  97. #if defined(__cplusplus) && !defined(CINTERFACE)
  98. MIDL_INTERFACE("24918acc-64b3-37c1-8ca9-74a66e9957a8")
  99. IAudioSessionEvents : public IUnknown
  100. {
  101. virtual HRESULT STDMETHODCALLTYPE OnDisplayNameChanged(
  102. LPCWSTR NewDisplayName,
  103. LPCGUID EventContext) = 0;
  104. virtual HRESULT STDMETHODCALLTYPE OnIconPathChanged(
  105. LPCWSTR NewIconPath,
  106. LPCGUID EventContext) = 0;
  107. virtual HRESULT STDMETHODCALLTYPE OnSimpleVolumeChanged(
  108. float NewVolume,
  109. WINBOOL NewMute,
  110. LPCGUID EventContext) = 0;
  111. virtual HRESULT STDMETHODCALLTYPE OnChannelVolumeChanged(
  112. DWORD ChannelCount,
  113. float NewChannelVolumeArray[],
  114. DWORD ChangedChannel,
  115. LPCGUID EventContext) = 0;
  116. virtual HRESULT STDMETHODCALLTYPE OnGroupingParamChanged(
  117. LPCGUID NewGroupingParam,
  118. LPCGUID EventContext) = 0;
  119. virtual HRESULT STDMETHODCALLTYPE OnStateChanged(
  120. AudioSessionState NewState) = 0;
  121. virtual HRESULT STDMETHODCALLTYPE OnSessionDisconnected(
  122. AudioSessionDisconnectReason DisconnectReason) = 0;
  123. };
  124. #ifdef __CRT_UUID_DECL
  125. __CRT_UUID_DECL(IAudioSessionEvents, 0x24918acc, 0x64b3, 0x37c1, 0x8c,0xa9, 0x74,0xa6,0x6e,0x99,0x57,0xa8)
  126. #endif
  127. #else
  128. typedef struct IAudioSessionEventsVtbl {
  129. BEGIN_INTERFACE
  130. /*** IUnknown methods ***/
  131. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  132. IAudioSessionEvents *This,
  133. REFIID riid,
  134. void **ppvObject);
  135. ULONG (STDMETHODCALLTYPE *AddRef)(
  136. IAudioSessionEvents *This);
  137. ULONG (STDMETHODCALLTYPE *Release)(
  138. IAudioSessionEvents *This);
  139. /*** IAudioSessionEvents methods ***/
  140. HRESULT (STDMETHODCALLTYPE *OnDisplayNameChanged)(
  141. IAudioSessionEvents *This,
  142. LPCWSTR NewDisplayName,
  143. LPCGUID EventContext);
  144. HRESULT (STDMETHODCALLTYPE *OnIconPathChanged)(
  145. IAudioSessionEvents *This,
  146. LPCWSTR NewIconPath,
  147. LPCGUID EventContext);
  148. HRESULT (STDMETHODCALLTYPE *OnSimpleVolumeChanged)(
  149. IAudioSessionEvents *This,
  150. float NewVolume,
  151. WINBOOL NewMute,
  152. LPCGUID EventContext);
  153. HRESULT (STDMETHODCALLTYPE *OnChannelVolumeChanged)(
  154. IAudioSessionEvents *This,
  155. DWORD ChannelCount,
  156. float NewChannelVolumeArray[],
  157. DWORD ChangedChannel,
  158. LPCGUID EventContext);
  159. HRESULT (STDMETHODCALLTYPE *OnGroupingParamChanged)(
  160. IAudioSessionEvents *This,
  161. LPCGUID NewGroupingParam,
  162. LPCGUID EventContext);
  163. HRESULT (STDMETHODCALLTYPE *OnStateChanged)(
  164. IAudioSessionEvents *This,
  165. AudioSessionState NewState);
  166. HRESULT (STDMETHODCALLTYPE *OnSessionDisconnected)(
  167. IAudioSessionEvents *This,
  168. AudioSessionDisconnectReason DisconnectReason);
  169. END_INTERFACE
  170. } IAudioSessionEventsVtbl;
  171. interface IAudioSessionEvents {
  172. CONST_VTBL IAudioSessionEventsVtbl* lpVtbl;
  173. };
  174. #ifdef COBJMACROS
  175. #ifndef WIDL_C_INLINE_WRAPPERS
  176. /*** IUnknown methods ***/
  177. #define IAudioSessionEvents_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  178. #define IAudioSessionEvents_AddRef(This) (This)->lpVtbl->AddRef(This)
  179. #define IAudioSessionEvents_Release(This) (This)->lpVtbl->Release(This)
  180. /*** IAudioSessionEvents methods ***/
  181. #define IAudioSessionEvents_OnDisplayNameChanged(This,NewDisplayName,EventContext) (This)->lpVtbl->OnDisplayNameChanged(This,NewDisplayName,EventContext)
  182. #define IAudioSessionEvents_OnIconPathChanged(This,NewIconPath,EventContext) (This)->lpVtbl->OnIconPathChanged(This,NewIconPath,EventContext)
  183. #define IAudioSessionEvents_OnSimpleVolumeChanged(This,NewVolume,NewMute,EventContext) (This)->lpVtbl->OnSimpleVolumeChanged(This,NewVolume,NewMute,EventContext)
  184. #define IAudioSessionEvents_OnChannelVolumeChanged(This,ChannelCount,NewChannelVolumeArray,ChangedChannel,EventContext) (This)->lpVtbl->OnChannelVolumeChanged(This,ChannelCount,NewChannelVolumeArray,ChangedChannel,EventContext)
  185. #define IAudioSessionEvents_OnGroupingParamChanged(This,NewGroupingParam,EventContext) (This)->lpVtbl->OnGroupingParamChanged(This,NewGroupingParam,EventContext)
  186. #define IAudioSessionEvents_OnStateChanged(This,NewState) (This)->lpVtbl->OnStateChanged(This,NewState)
  187. #define IAudioSessionEvents_OnSessionDisconnected(This,DisconnectReason) (This)->lpVtbl->OnSessionDisconnected(This,DisconnectReason)
  188. #else
  189. /*** IUnknown methods ***/
  190. static FORCEINLINE HRESULT IAudioSessionEvents_QueryInterface(IAudioSessionEvents* This,REFIID riid,void **ppvObject) {
  191. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  192. }
  193. static FORCEINLINE ULONG IAudioSessionEvents_AddRef(IAudioSessionEvents* This) {
  194. return This->lpVtbl->AddRef(This);
  195. }
  196. static FORCEINLINE ULONG IAudioSessionEvents_Release(IAudioSessionEvents* This) {
  197. return This->lpVtbl->Release(This);
  198. }
  199. /*** IAudioSessionEvents methods ***/
  200. static FORCEINLINE HRESULT IAudioSessionEvents_OnDisplayNameChanged(IAudioSessionEvents* This,LPCWSTR NewDisplayName,LPCGUID EventContext) {
  201. return This->lpVtbl->OnDisplayNameChanged(This,NewDisplayName,EventContext);
  202. }
  203. static FORCEINLINE HRESULT IAudioSessionEvents_OnIconPathChanged(IAudioSessionEvents* This,LPCWSTR NewIconPath,LPCGUID EventContext) {
  204. return This->lpVtbl->OnIconPathChanged(This,NewIconPath,EventContext);
  205. }
  206. static FORCEINLINE HRESULT IAudioSessionEvents_OnSimpleVolumeChanged(IAudioSessionEvents* This,float NewVolume,WINBOOL NewMute,LPCGUID EventContext) {
  207. return This->lpVtbl->OnSimpleVolumeChanged(This,NewVolume,NewMute,EventContext);
  208. }
  209. static FORCEINLINE HRESULT IAudioSessionEvents_OnChannelVolumeChanged(IAudioSessionEvents* This,DWORD ChannelCount,float NewChannelVolumeArray[],DWORD ChangedChannel,LPCGUID EventContext) {
  210. return This->lpVtbl->OnChannelVolumeChanged(This,ChannelCount,NewChannelVolumeArray,ChangedChannel,EventContext);
  211. }
  212. static FORCEINLINE HRESULT IAudioSessionEvents_OnGroupingParamChanged(IAudioSessionEvents* This,LPCGUID NewGroupingParam,LPCGUID EventContext) {
  213. return This->lpVtbl->OnGroupingParamChanged(This,NewGroupingParam,EventContext);
  214. }
  215. static FORCEINLINE HRESULT IAudioSessionEvents_OnStateChanged(IAudioSessionEvents* This,AudioSessionState NewState) {
  216. return This->lpVtbl->OnStateChanged(This,NewState);
  217. }
  218. static FORCEINLINE HRESULT IAudioSessionEvents_OnSessionDisconnected(IAudioSessionEvents* This,AudioSessionDisconnectReason DisconnectReason) {
  219. return This->lpVtbl->OnSessionDisconnected(This,DisconnectReason);
  220. }
  221. #endif
  222. #endif
  223. #endif
  224. #endif /* __IAudioSessionEvents_INTERFACE_DEFINED__ */
  225. /*****************************************************************************
  226. * IAudioSessionControl interface
  227. */
  228. #ifndef __IAudioSessionControl_INTERFACE_DEFINED__
  229. #define __IAudioSessionControl_INTERFACE_DEFINED__
  230. DEFINE_GUID(IID_IAudioSessionControl, 0xf4b1a599, 0x7266, 0x4319, 0xa8,0xca, 0xe7,0x0a,0xcb,0x11,0xe8,0xcd);
  231. #if defined(__cplusplus) && !defined(CINTERFACE)
  232. MIDL_INTERFACE("f4b1a599-7266-4319-a8ca-e70acb11e8cd")
  233. IAudioSessionControl : public IUnknown
  234. {
  235. virtual HRESULT STDMETHODCALLTYPE GetState(
  236. AudioSessionState *pRetVal) = 0;
  237. virtual HRESULT STDMETHODCALLTYPE GetDisplayName(
  238. LPWSTR *pRetVal) = 0;
  239. virtual HRESULT STDMETHODCALLTYPE SetDisplayName(
  240. LPCWSTR Value,
  241. LPCGUID EventContext) = 0;
  242. virtual HRESULT STDMETHODCALLTYPE GetIconPath(
  243. LPWSTR *pRetVal) = 0;
  244. virtual HRESULT STDMETHODCALLTYPE SetIconPath(
  245. LPCWSTR Value,
  246. LPCGUID EventContext) = 0;
  247. virtual HRESULT STDMETHODCALLTYPE GetGroupingParam(
  248. GUID *pRetVal) = 0;
  249. virtual HRESULT STDMETHODCALLTYPE SetGroupingParam(
  250. LPCGUID Override,
  251. LPCGUID EventContext) = 0;
  252. virtual HRESULT STDMETHODCALLTYPE RegisterAudioSessionNotification(
  253. IAudioSessionEvents *NewNotifications) = 0;
  254. virtual HRESULT STDMETHODCALLTYPE UnregisterAudioSessionNotification(
  255. IAudioSessionEvents *NewNotifications) = 0;
  256. };
  257. #ifdef __CRT_UUID_DECL
  258. __CRT_UUID_DECL(IAudioSessionControl, 0xf4b1a599, 0x7266, 0x4319, 0xa8,0xca, 0xe7,0x0a,0xcb,0x11,0xe8,0xcd)
  259. #endif
  260. #else
  261. typedef struct IAudioSessionControlVtbl {
  262. BEGIN_INTERFACE
  263. /*** IUnknown methods ***/
  264. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  265. IAudioSessionControl *This,
  266. REFIID riid,
  267. void **ppvObject);
  268. ULONG (STDMETHODCALLTYPE *AddRef)(
  269. IAudioSessionControl *This);
  270. ULONG (STDMETHODCALLTYPE *Release)(
  271. IAudioSessionControl *This);
  272. /*** IAudioSessionControl methods ***/
  273. HRESULT (STDMETHODCALLTYPE *GetState)(
  274. IAudioSessionControl *This,
  275. AudioSessionState *pRetVal);
  276. HRESULT (STDMETHODCALLTYPE *GetDisplayName)(
  277. IAudioSessionControl *This,
  278. LPWSTR *pRetVal);
  279. HRESULT (STDMETHODCALLTYPE *SetDisplayName)(
  280. IAudioSessionControl *This,
  281. LPCWSTR Value,
  282. LPCGUID EventContext);
  283. HRESULT (STDMETHODCALLTYPE *GetIconPath)(
  284. IAudioSessionControl *This,
  285. LPWSTR *pRetVal);
  286. HRESULT (STDMETHODCALLTYPE *SetIconPath)(
  287. IAudioSessionControl *This,
  288. LPCWSTR Value,
  289. LPCGUID EventContext);
  290. HRESULT (STDMETHODCALLTYPE *GetGroupingParam)(
  291. IAudioSessionControl *This,
  292. GUID *pRetVal);
  293. HRESULT (STDMETHODCALLTYPE *SetGroupingParam)(
  294. IAudioSessionControl *This,
  295. LPCGUID Override,
  296. LPCGUID EventContext);
  297. HRESULT (STDMETHODCALLTYPE *RegisterAudioSessionNotification)(
  298. IAudioSessionControl *This,
  299. IAudioSessionEvents *NewNotifications);
  300. HRESULT (STDMETHODCALLTYPE *UnregisterAudioSessionNotification)(
  301. IAudioSessionControl *This,
  302. IAudioSessionEvents *NewNotifications);
  303. END_INTERFACE
  304. } IAudioSessionControlVtbl;
  305. interface IAudioSessionControl {
  306. CONST_VTBL IAudioSessionControlVtbl* lpVtbl;
  307. };
  308. #ifdef COBJMACROS
  309. #ifndef WIDL_C_INLINE_WRAPPERS
  310. /*** IUnknown methods ***/
  311. #define IAudioSessionControl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  312. #define IAudioSessionControl_AddRef(This) (This)->lpVtbl->AddRef(This)
  313. #define IAudioSessionControl_Release(This) (This)->lpVtbl->Release(This)
  314. /*** IAudioSessionControl methods ***/
  315. #define IAudioSessionControl_GetState(This,pRetVal) (This)->lpVtbl->GetState(This,pRetVal)
  316. #define IAudioSessionControl_GetDisplayName(This,pRetVal) (This)->lpVtbl->GetDisplayName(This,pRetVal)
  317. #define IAudioSessionControl_SetDisplayName(This,Value,EventContext) (This)->lpVtbl->SetDisplayName(This,Value,EventContext)
  318. #define IAudioSessionControl_GetIconPath(This,pRetVal) (This)->lpVtbl->GetIconPath(This,pRetVal)
  319. #define IAudioSessionControl_SetIconPath(This,Value,EventContext) (This)->lpVtbl->SetIconPath(This,Value,EventContext)
  320. #define IAudioSessionControl_GetGroupingParam(This,pRetVal) (This)->lpVtbl->GetGroupingParam(This,pRetVal)
  321. #define IAudioSessionControl_SetGroupingParam(This,Override,EventContext) (This)->lpVtbl->SetGroupingParam(This,Override,EventContext)
  322. #define IAudioSessionControl_RegisterAudioSessionNotification(This,NewNotifications) (This)->lpVtbl->RegisterAudioSessionNotification(This,NewNotifications)
  323. #define IAudioSessionControl_UnregisterAudioSessionNotification(This,NewNotifications) (This)->lpVtbl->UnregisterAudioSessionNotification(This,NewNotifications)
  324. #else
  325. /*** IUnknown methods ***/
  326. static FORCEINLINE HRESULT IAudioSessionControl_QueryInterface(IAudioSessionControl* This,REFIID riid,void **ppvObject) {
  327. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  328. }
  329. static FORCEINLINE ULONG IAudioSessionControl_AddRef(IAudioSessionControl* This) {
  330. return This->lpVtbl->AddRef(This);
  331. }
  332. static FORCEINLINE ULONG IAudioSessionControl_Release(IAudioSessionControl* This) {
  333. return This->lpVtbl->Release(This);
  334. }
  335. /*** IAudioSessionControl methods ***/
  336. static FORCEINLINE HRESULT IAudioSessionControl_GetState(IAudioSessionControl* This,AudioSessionState *pRetVal) {
  337. return This->lpVtbl->GetState(This,pRetVal);
  338. }
  339. static FORCEINLINE HRESULT IAudioSessionControl_GetDisplayName(IAudioSessionControl* This,LPWSTR *pRetVal) {
  340. return This->lpVtbl->GetDisplayName(This,pRetVal);
  341. }
  342. static FORCEINLINE HRESULT IAudioSessionControl_SetDisplayName(IAudioSessionControl* This,LPCWSTR Value,LPCGUID EventContext) {
  343. return This->lpVtbl->SetDisplayName(This,Value,EventContext);
  344. }
  345. static FORCEINLINE HRESULT IAudioSessionControl_GetIconPath(IAudioSessionControl* This,LPWSTR *pRetVal) {
  346. return This->lpVtbl->GetIconPath(This,pRetVal);
  347. }
  348. static FORCEINLINE HRESULT IAudioSessionControl_SetIconPath(IAudioSessionControl* This,LPCWSTR Value,LPCGUID EventContext) {
  349. return This->lpVtbl->SetIconPath(This,Value,EventContext);
  350. }
  351. static FORCEINLINE HRESULT IAudioSessionControl_GetGroupingParam(IAudioSessionControl* This,GUID *pRetVal) {
  352. return This->lpVtbl->GetGroupingParam(This,pRetVal);
  353. }
  354. static FORCEINLINE HRESULT IAudioSessionControl_SetGroupingParam(IAudioSessionControl* This,LPCGUID Override,LPCGUID EventContext) {
  355. return This->lpVtbl->SetGroupingParam(This,Override,EventContext);
  356. }
  357. static FORCEINLINE HRESULT IAudioSessionControl_RegisterAudioSessionNotification(IAudioSessionControl* This,IAudioSessionEvents *NewNotifications) {
  358. return This->lpVtbl->RegisterAudioSessionNotification(This,NewNotifications);
  359. }
  360. static FORCEINLINE HRESULT IAudioSessionControl_UnregisterAudioSessionNotification(IAudioSessionControl* This,IAudioSessionEvents *NewNotifications) {
  361. return This->lpVtbl->UnregisterAudioSessionNotification(This,NewNotifications);
  362. }
  363. #endif
  364. #endif
  365. #endif
  366. #endif /* __IAudioSessionControl_INTERFACE_DEFINED__ */
  367. #endif
  368. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  369. /*****************************************************************************
  370. * IAudioSessionControl2 interface
  371. */
  372. #ifndef __IAudioSessionControl2_INTERFACE_DEFINED__
  373. #define __IAudioSessionControl2_INTERFACE_DEFINED__
  374. DEFINE_GUID(IID_IAudioSessionControl2, 0xbfb7ff88, 0x7239, 0x4fc9, 0x8f,0xa2, 0x07,0xc9,0x50,0xbe,0x9c,0x6d);
  375. #if defined(__cplusplus) && !defined(CINTERFACE)
  376. MIDL_INTERFACE("bfb7ff88-7239-4fc9-8fa2-07c950be9c6d")
  377. IAudioSessionControl2 : public IAudioSessionControl
  378. {
  379. virtual HRESULT STDMETHODCALLTYPE GetSessionIdentifier(
  380. LPWSTR *pRetVal) = 0;
  381. virtual HRESULT STDMETHODCALLTYPE GetSessionInstanceIdentifier(
  382. LPWSTR *pRetVal) = 0;
  383. virtual HRESULT STDMETHODCALLTYPE GetProcessId(
  384. DWORD *pRetVal) = 0;
  385. virtual HRESULT STDMETHODCALLTYPE IsSystemSoundsSession(
  386. ) = 0;
  387. virtual HRESULT STDMETHODCALLTYPE SetDuckingPreference(
  388. WINBOOL optOut) = 0;
  389. };
  390. #ifdef __CRT_UUID_DECL
  391. __CRT_UUID_DECL(IAudioSessionControl2, 0xbfb7ff88, 0x7239, 0x4fc9, 0x8f,0xa2, 0x07,0xc9,0x50,0xbe,0x9c,0x6d)
  392. #endif
  393. #else
  394. typedef struct IAudioSessionControl2Vtbl {
  395. BEGIN_INTERFACE
  396. /*** IUnknown methods ***/
  397. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  398. IAudioSessionControl2 *This,
  399. REFIID riid,
  400. void **ppvObject);
  401. ULONG (STDMETHODCALLTYPE *AddRef)(
  402. IAudioSessionControl2 *This);
  403. ULONG (STDMETHODCALLTYPE *Release)(
  404. IAudioSessionControl2 *This);
  405. /*** IAudioSessionControl methods ***/
  406. HRESULT (STDMETHODCALLTYPE *GetState)(
  407. IAudioSessionControl2 *This,
  408. AudioSessionState *pRetVal);
  409. HRESULT (STDMETHODCALLTYPE *GetDisplayName)(
  410. IAudioSessionControl2 *This,
  411. LPWSTR *pRetVal);
  412. HRESULT (STDMETHODCALLTYPE *SetDisplayName)(
  413. IAudioSessionControl2 *This,
  414. LPCWSTR Value,
  415. LPCGUID EventContext);
  416. HRESULT (STDMETHODCALLTYPE *GetIconPath)(
  417. IAudioSessionControl2 *This,
  418. LPWSTR *pRetVal);
  419. HRESULT (STDMETHODCALLTYPE *SetIconPath)(
  420. IAudioSessionControl2 *This,
  421. LPCWSTR Value,
  422. LPCGUID EventContext);
  423. HRESULT (STDMETHODCALLTYPE *GetGroupingParam)(
  424. IAudioSessionControl2 *This,
  425. GUID *pRetVal);
  426. HRESULT (STDMETHODCALLTYPE *SetGroupingParam)(
  427. IAudioSessionControl2 *This,
  428. LPCGUID Override,
  429. LPCGUID EventContext);
  430. HRESULT (STDMETHODCALLTYPE *RegisterAudioSessionNotification)(
  431. IAudioSessionControl2 *This,
  432. IAudioSessionEvents *NewNotifications);
  433. HRESULT (STDMETHODCALLTYPE *UnregisterAudioSessionNotification)(
  434. IAudioSessionControl2 *This,
  435. IAudioSessionEvents *NewNotifications);
  436. /*** IAudioSessionControl2 methods ***/
  437. HRESULT (STDMETHODCALLTYPE *GetSessionIdentifier)(
  438. IAudioSessionControl2 *This,
  439. LPWSTR *pRetVal);
  440. HRESULT (STDMETHODCALLTYPE *GetSessionInstanceIdentifier)(
  441. IAudioSessionControl2 *This,
  442. LPWSTR *pRetVal);
  443. HRESULT (STDMETHODCALLTYPE *GetProcessId)(
  444. IAudioSessionControl2 *This,
  445. DWORD *pRetVal);
  446. HRESULT (STDMETHODCALLTYPE *IsSystemSoundsSession)(
  447. IAudioSessionControl2 *This);
  448. HRESULT (STDMETHODCALLTYPE *SetDuckingPreference)(
  449. IAudioSessionControl2 *This,
  450. WINBOOL optOut);
  451. END_INTERFACE
  452. } IAudioSessionControl2Vtbl;
  453. interface IAudioSessionControl2 {
  454. CONST_VTBL IAudioSessionControl2Vtbl* lpVtbl;
  455. };
  456. #ifdef COBJMACROS
  457. #ifndef WIDL_C_INLINE_WRAPPERS
  458. /*** IUnknown methods ***/
  459. #define IAudioSessionControl2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  460. #define IAudioSessionControl2_AddRef(This) (This)->lpVtbl->AddRef(This)
  461. #define IAudioSessionControl2_Release(This) (This)->lpVtbl->Release(This)
  462. /*** IAudioSessionControl methods ***/
  463. #define IAudioSessionControl2_GetState(This,pRetVal) (This)->lpVtbl->GetState(This,pRetVal)
  464. #define IAudioSessionControl2_GetDisplayName(This,pRetVal) (This)->lpVtbl->GetDisplayName(This,pRetVal)
  465. #define IAudioSessionControl2_SetDisplayName(This,Value,EventContext) (This)->lpVtbl->SetDisplayName(This,Value,EventContext)
  466. #define IAudioSessionControl2_GetIconPath(This,pRetVal) (This)->lpVtbl->GetIconPath(This,pRetVal)
  467. #define IAudioSessionControl2_SetIconPath(This,Value,EventContext) (This)->lpVtbl->SetIconPath(This,Value,EventContext)
  468. #define IAudioSessionControl2_GetGroupingParam(This,pRetVal) (This)->lpVtbl->GetGroupingParam(This,pRetVal)
  469. #define IAudioSessionControl2_SetGroupingParam(This,Override,EventContext) (This)->lpVtbl->SetGroupingParam(This,Override,EventContext)
  470. #define IAudioSessionControl2_RegisterAudioSessionNotification(This,NewNotifications) (This)->lpVtbl->RegisterAudioSessionNotification(This,NewNotifications)
  471. #define IAudioSessionControl2_UnregisterAudioSessionNotification(This,NewNotifications) (This)->lpVtbl->UnregisterAudioSessionNotification(This,NewNotifications)
  472. /*** IAudioSessionControl2 methods ***/
  473. #define IAudioSessionControl2_GetSessionIdentifier(This,pRetVal) (This)->lpVtbl->GetSessionIdentifier(This,pRetVal)
  474. #define IAudioSessionControl2_GetSessionInstanceIdentifier(This,pRetVal) (This)->lpVtbl->GetSessionInstanceIdentifier(This,pRetVal)
  475. #define IAudioSessionControl2_GetProcessId(This,pRetVal) (This)->lpVtbl->GetProcessId(This,pRetVal)
  476. #define IAudioSessionControl2_IsSystemSoundsSession(This) (This)->lpVtbl->IsSystemSoundsSession(This)
  477. #define IAudioSessionControl2_SetDuckingPreference(This,optOut) (This)->lpVtbl->SetDuckingPreference(This,optOut)
  478. #else
  479. /*** IUnknown methods ***/
  480. static FORCEINLINE HRESULT IAudioSessionControl2_QueryInterface(IAudioSessionControl2* This,REFIID riid,void **ppvObject) {
  481. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  482. }
  483. static FORCEINLINE ULONG IAudioSessionControl2_AddRef(IAudioSessionControl2* This) {
  484. return This->lpVtbl->AddRef(This);
  485. }
  486. static FORCEINLINE ULONG IAudioSessionControl2_Release(IAudioSessionControl2* This) {
  487. return This->lpVtbl->Release(This);
  488. }
  489. /*** IAudioSessionControl methods ***/
  490. static FORCEINLINE HRESULT IAudioSessionControl2_GetState(IAudioSessionControl2* This,AudioSessionState *pRetVal) {
  491. return This->lpVtbl->GetState(This,pRetVal);
  492. }
  493. static FORCEINLINE HRESULT IAudioSessionControl2_GetDisplayName(IAudioSessionControl2* This,LPWSTR *pRetVal) {
  494. return This->lpVtbl->GetDisplayName(This,pRetVal);
  495. }
  496. static FORCEINLINE HRESULT IAudioSessionControl2_SetDisplayName(IAudioSessionControl2* This,LPCWSTR Value,LPCGUID EventContext) {
  497. return This->lpVtbl->SetDisplayName(This,Value,EventContext);
  498. }
  499. static FORCEINLINE HRESULT IAudioSessionControl2_GetIconPath(IAudioSessionControl2* This,LPWSTR *pRetVal) {
  500. return This->lpVtbl->GetIconPath(This,pRetVal);
  501. }
  502. static FORCEINLINE HRESULT IAudioSessionControl2_SetIconPath(IAudioSessionControl2* This,LPCWSTR Value,LPCGUID EventContext) {
  503. return This->lpVtbl->SetIconPath(This,Value,EventContext);
  504. }
  505. static FORCEINLINE HRESULT IAudioSessionControl2_GetGroupingParam(IAudioSessionControl2* This,GUID *pRetVal) {
  506. return This->lpVtbl->GetGroupingParam(This,pRetVal);
  507. }
  508. static FORCEINLINE HRESULT IAudioSessionControl2_SetGroupingParam(IAudioSessionControl2* This,LPCGUID Override,LPCGUID EventContext) {
  509. return This->lpVtbl->SetGroupingParam(This,Override,EventContext);
  510. }
  511. static FORCEINLINE HRESULT IAudioSessionControl2_RegisterAudioSessionNotification(IAudioSessionControl2* This,IAudioSessionEvents *NewNotifications) {
  512. return This->lpVtbl->RegisterAudioSessionNotification(This,NewNotifications);
  513. }
  514. static FORCEINLINE HRESULT IAudioSessionControl2_UnregisterAudioSessionNotification(IAudioSessionControl2* This,IAudioSessionEvents *NewNotifications) {
  515. return This->lpVtbl->UnregisterAudioSessionNotification(This,NewNotifications);
  516. }
  517. /*** IAudioSessionControl2 methods ***/
  518. static FORCEINLINE HRESULT IAudioSessionControl2_GetSessionIdentifier(IAudioSessionControl2* This,LPWSTR *pRetVal) {
  519. return This->lpVtbl->GetSessionIdentifier(This,pRetVal);
  520. }
  521. static FORCEINLINE HRESULT IAudioSessionControl2_GetSessionInstanceIdentifier(IAudioSessionControl2* This,LPWSTR *pRetVal) {
  522. return This->lpVtbl->GetSessionInstanceIdentifier(This,pRetVal);
  523. }
  524. static FORCEINLINE HRESULT IAudioSessionControl2_GetProcessId(IAudioSessionControl2* This,DWORD *pRetVal) {
  525. return This->lpVtbl->GetProcessId(This,pRetVal);
  526. }
  527. static FORCEINLINE HRESULT IAudioSessionControl2_IsSystemSoundsSession(IAudioSessionControl2* This) {
  528. return This->lpVtbl->IsSystemSoundsSession(This);
  529. }
  530. static FORCEINLINE HRESULT IAudioSessionControl2_SetDuckingPreference(IAudioSessionControl2* This,WINBOOL optOut) {
  531. return This->lpVtbl->SetDuckingPreference(This,optOut);
  532. }
  533. #endif
  534. #endif
  535. #endif
  536. #endif /* __IAudioSessionControl2_INTERFACE_DEFINED__ */
  537. /*****************************************************************************
  538. * IAudioSessionManager interface
  539. */
  540. #ifndef __IAudioSessionManager_INTERFACE_DEFINED__
  541. #define __IAudioSessionManager_INTERFACE_DEFINED__
  542. DEFINE_GUID(IID_IAudioSessionManager, 0xbfa971f1, 0x4d5e, 0x40bb, 0x93,0x5e, 0x96,0x70,0x39,0xbf,0xbe,0xe4);
  543. #if defined(__cplusplus) && !defined(CINTERFACE)
  544. MIDL_INTERFACE("bfa971f1-4d5e-40bb-935e-967039bfbee4")
  545. IAudioSessionManager : public IUnknown
  546. {
  547. virtual HRESULT STDMETHODCALLTYPE GetAudioSessionControl(
  548. LPCGUID AudioSessionGuid,
  549. DWORD StreamFlags,
  550. IAudioSessionControl **SessionControl) = 0;
  551. virtual HRESULT STDMETHODCALLTYPE GetSimpleAudioVolume(
  552. LPCGUID AudioSessionGuid,
  553. DWORD StreamFlags,
  554. ISimpleAudioVolume **AudioVolume) = 0;
  555. };
  556. #ifdef __CRT_UUID_DECL
  557. __CRT_UUID_DECL(IAudioSessionManager, 0xbfa971f1, 0x4d5e, 0x40bb, 0x93,0x5e, 0x96,0x70,0x39,0xbf,0xbe,0xe4)
  558. #endif
  559. #else
  560. typedef struct IAudioSessionManagerVtbl {
  561. BEGIN_INTERFACE
  562. /*** IUnknown methods ***/
  563. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  564. IAudioSessionManager *This,
  565. REFIID riid,
  566. void **ppvObject);
  567. ULONG (STDMETHODCALLTYPE *AddRef)(
  568. IAudioSessionManager *This);
  569. ULONG (STDMETHODCALLTYPE *Release)(
  570. IAudioSessionManager *This);
  571. /*** IAudioSessionManager methods ***/
  572. HRESULT (STDMETHODCALLTYPE *GetAudioSessionControl)(
  573. IAudioSessionManager *This,
  574. LPCGUID AudioSessionGuid,
  575. DWORD StreamFlags,
  576. IAudioSessionControl **SessionControl);
  577. HRESULT (STDMETHODCALLTYPE *GetSimpleAudioVolume)(
  578. IAudioSessionManager *This,
  579. LPCGUID AudioSessionGuid,
  580. DWORD StreamFlags,
  581. ISimpleAudioVolume **AudioVolume);
  582. END_INTERFACE
  583. } IAudioSessionManagerVtbl;
  584. interface IAudioSessionManager {
  585. CONST_VTBL IAudioSessionManagerVtbl* lpVtbl;
  586. };
  587. #ifdef COBJMACROS
  588. #ifndef WIDL_C_INLINE_WRAPPERS
  589. /*** IUnknown methods ***/
  590. #define IAudioSessionManager_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  591. #define IAudioSessionManager_AddRef(This) (This)->lpVtbl->AddRef(This)
  592. #define IAudioSessionManager_Release(This) (This)->lpVtbl->Release(This)
  593. /*** IAudioSessionManager methods ***/
  594. #define IAudioSessionManager_GetAudioSessionControl(This,AudioSessionGuid,StreamFlags,SessionControl) (This)->lpVtbl->GetAudioSessionControl(This,AudioSessionGuid,StreamFlags,SessionControl)
  595. #define IAudioSessionManager_GetSimpleAudioVolume(This,AudioSessionGuid,StreamFlags,AudioVolume) (This)->lpVtbl->GetSimpleAudioVolume(This,AudioSessionGuid,StreamFlags,AudioVolume)
  596. #else
  597. /*** IUnknown methods ***/
  598. static FORCEINLINE HRESULT IAudioSessionManager_QueryInterface(IAudioSessionManager* This,REFIID riid,void **ppvObject) {
  599. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  600. }
  601. static FORCEINLINE ULONG IAudioSessionManager_AddRef(IAudioSessionManager* This) {
  602. return This->lpVtbl->AddRef(This);
  603. }
  604. static FORCEINLINE ULONG IAudioSessionManager_Release(IAudioSessionManager* This) {
  605. return This->lpVtbl->Release(This);
  606. }
  607. /*** IAudioSessionManager methods ***/
  608. static FORCEINLINE HRESULT IAudioSessionManager_GetAudioSessionControl(IAudioSessionManager* This,LPCGUID AudioSessionGuid,DWORD StreamFlags,IAudioSessionControl **SessionControl) {
  609. return This->lpVtbl->GetAudioSessionControl(This,AudioSessionGuid,StreamFlags,SessionControl);
  610. }
  611. static FORCEINLINE HRESULT IAudioSessionManager_GetSimpleAudioVolume(IAudioSessionManager* This,LPCGUID AudioSessionGuid,DWORD StreamFlags,ISimpleAudioVolume **AudioVolume) {
  612. return This->lpVtbl->GetSimpleAudioVolume(This,AudioSessionGuid,StreamFlags,AudioVolume);
  613. }
  614. #endif
  615. #endif
  616. #endif
  617. #endif /* __IAudioSessionManager_INTERFACE_DEFINED__ */
  618. /*****************************************************************************
  619. * IAudioVolumeDuckNotification interface
  620. */
  621. #ifndef __IAudioVolumeDuckNotification_INTERFACE_DEFINED__
  622. #define __IAudioVolumeDuckNotification_INTERFACE_DEFINED__
  623. DEFINE_GUID(IID_IAudioVolumeDuckNotification, 0xc3b284d4, 0x6d39, 0x4359, 0xb3,0xcf, 0xb5,0x6d,0xdb,0x3b,0xb3,0x9c);
  624. #if defined(__cplusplus) && !defined(CINTERFACE)
  625. MIDL_INTERFACE("c3b284d4-6d39-4359-b3cf-b56ddb3bb39c")
  626. IAudioVolumeDuckNotification : public IUnknown
  627. {
  628. virtual HRESULT STDMETHODCALLTYPE OnVolumeDuckNotification(
  629. LPCWSTR sessionID,
  630. UINT32 countCommunicationSessions) = 0;
  631. virtual HRESULT STDMETHODCALLTYPE OnVolumeUnduckNotification(
  632. LPCWSTR sessionID) = 0;
  633. };
  634. #ifdef __CRT_UUID_DECL
  635. __CRT_UUID_DECL(IAudioVolumeDuckNotification, 0xc3b284d4, 0x6d39, 0x4359, 0xb3,0xcf, 0xb5,0x6d,0xdb,0x3b,0xb3,0x9c)
  636. #endif
  637. #else
  638. typedef struct IAudioVolumeDuckNotificationVtbl {
  639. BEGIN_INTERFACE
  640. /*** IUnknown methods ***/
  641. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  642. IAudioVolumeDuckNotification *This,
  643. REFIID riid,
  644. void **ppvObject);
  645. ULONG (STDMETHODCALLTYPE *AddRef)(
  646. IAudioVolumeDuckNotification *This);
  647. ULONG (STDMETHODCALLTYPE *Release)(
  648. IAudioVolumeDuckNotification *This);
  649. /*** IAudioVolumeDuckNotification methods ***/
  650. HRESULT (STDMETHODCALLTYPE *OnVolumeDuckNotification)(
  651. IAudioVolumeDuckNotification *This,
  652. LPCWSTR sessionID,
  653. UINT32 countCommunicationSessions);
  654. HRESULT (STDMETHODCALLTYPE *OnVolumeUnduckNotification)(
  655. IAudioVolumeDuckNotification *This,
  656. LPCWSTR sessionID);
  657. END_INTERFACE
  658. } IAudioVolumeDuckNotificationVtbl;
  659. interface IAudioVolumeDuckNotification {
  660. CONST_VTBL IAudioVolumeDuckNotificationVtbl* lpVtbl;
  661. };
  662. #ifdef COBJMACROS
  663. #ifndef WIDL_C_INLINE_WRAPPERS
  664. /*** IUnknown methods ***/
  665. #define IAudioVolumeDuckNotification_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  666. #define IAudioVolumeDuckNotification_AddRef(This) (This)->lpVtbl->AddRef(This)
  667. #define IAudioVolumeDuckNotification_Release(This) (This)->lpVtbl->Release(This)
  668. /*** IAudioVolumeDuckNotification methods ***/
  669. #define IAudioVolumeDuckNotification_OnVolumeDuckNotification(This,sessionID,countCommunicationSessions) (This)->lpVtbl->OnVolumeDuckNotification(This,sessionID,countCommunicationSessions)
  670. #define IAudioVolumeDuckNotification_OnVolumeUnduckNotification(This,sessionID) (This)->lpVtbl->OnVolumeUnduckNotification(This,sessionID)
  671. #else
  672. /*** IUnknown methods ***/
  673. static FORCEINLINE HRESULT IAudioVolumeDuckNotification_QueryInterface(IAudioVolumeDuckNotification* This,REFIID riid,void **ppvObject) {
  674. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  675. }
  676. static FORCEINLINE ULONG IAudioVolumeDuckNotification_AddRef(IAudioVolumeDuckNotification* This) {
  677. return This->lpVtbl->AddRef(This);
  678. }
  679. static FORCEINLINE ULONG IAudioVolumeDuckNotification_Release(IAudioVolumeDuckNotification* This) {
  680. return This->lpVtbl->Release(This);
  681. }
  682. /*** IAudioVolumeDuckNotification methods ***/
  683. static FORCEINLINE HRESULT IAudioVolumeDuckNotification_OnVolumeDuckNotification(IAudioVolumeDuckNotification* This,LPCWSTR sessionID,UINT32 countCommunicationSessions) {
  684. return This->lpVtbl->OnVolumeDuckNotification(This,sessionID,countCommunicationSessions);
  685. }
  686. static FORCEINLINE HRESULT IAudioVolumeDuckNotification_OnVolumeUnduckNotification(IAudioVolumeDuckNotification* This,LPCWSTR sessionID) {
  687. return This->lpVtbl->OnVolumeUnduckNotification(This,sessionID);
  688. }
  689. #endif
  690. #endif
  691. #endif
  692. #endif /* __IAudioVolumeDuckNotification_INTERFACE_DEFINED__ */
  693. /*****************************************************************************
  694. * IAudioSessionNotification interface
  695. */
  696. #ifndef __IAudioSessionNotification_INTERFACE_DEFINED__
  697. #define __IAudioSessionNotification_INTERFACE_DEFINED__
  698. DEFINE_GUID(IID_IAudioSessionNotification, 0x641dd20b, 0x4d41, 0x49cc, 0xab,0xa3, 0x17,0x4b,0x94,0x77,0xbb,0x08);
  699. #if defined(__cplusplus) && !defined(CINTERFACE)
  700. MIDL_INTERFACE("641dd20b-4d41-49cc-aba3-174b9477bb08")
  701. IAudioSessionNotification : public IUnknown
  702. {
  703. virtual HRESULT STDMETHODCALLTYPE OnSessionCreated(
  704. IAudioSessionControl *NewSession) = 0;
  705. };
  706. #ifdef __CRT_UUID_DECL
  707. __CRT_UUID_DECL(IAudioSessionNotification, 0x641dd20b, 0x4d41, 0x49cc, 0xab,0xa3, 0x17,0x4b,0x94,0x77,0xbb,0x08)
  708. #endif
  709. #else
  710. typedef struct IAudioSessionNotificationVtbl {
  711. BEGIN_INTERFACE
  712. /*** IUnknown methods ***/
  713. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  714. IAudioSessionNotification *This,
  715. REFIID riid,
  716. void **ppvObject);
  717. ULONG (STDMETHODCALLTYPE *AddRef)(
  718. IAudioSessionNotification *This);
  719. ULONG (STDMETHODCALLTYPE *Release)(
  720. IAudioSessionNotification *This);
  721. /*** IAudioSessionNotification methods ***/
  722. HRESULT (STDMETHODCALLTYPE *OnSessionCreated)(
  723. IAudioSessionNotification *This,
  724. IAudioSessionControl *NewSession);
  725. END_INTERFACE
  726. } IAudioSessionNotificationVtbl;
  727. interface IAudioSessionNotification {
  728. CONST_VTBL IAudioSessionNotificationVtbl* lpVtbl;
  729. };
  730. #ifdef COBJMACROS
  731. #ifndef WIDL_C_INLINE_WRAPPERS
  732. /*** IUnknown methods ***/
  733. #define IAudioSessionNotification_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  734. #define IAudioSessionNotification_AddRef(This) (This)->lpVtbl->AddRef(This)
  735. #define IAudioSessionNotification_Release(This) (This)->lpVtbl->Release(This)
  736. /*** IAudioSessionNotification methods ***/
  737. #define IAudioSessionNotification_OnSessionCreated(This,NewSession) (This)->lpVtbl->OnSessionCreated(This,NewSession)
  738. #else
  739. /*** IUnknown methods ***/
  740. static FORCEINLINE HRESULT IAudioSessionNotification_QueryInterface(IAudioSessionNotification* This,REFIID riid,void **ppvObject) {
  741. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  742. }
  743. static FORCEINLINE ULONG IAudioSessionNotification_AddRef(IAudioSessionNotification* This) {
  744. return This->lpVtbl->AddRef(This);
  745. }
  746. static FORCEINLINE ULONG IAudioSessionNotification_Release(IAudioSessionNotification* This) {
  747. return This->lpVtbl->Release(This);
  748. }
  749. /*** IAudioSessionNotification methods ***/
  750. static FORCEINLINE HRESULT IAudioSessionNotification_OnSessionCreated(IAudioSessionNotification* This,IAudioSessionControl *NewSession) {
  751. return This->lpVtbl->OnSessionCreated(This,NewSession);
  752. }
  753. #endif
  754. #endif
  755. #endif
  756. #endif /* __IAudioSessionNotification_INTERFACE_DEFINED__ */
  757. /*****************************************************************************
  758. * IAudioSessionEnumerator interface
  759. */
  760. #ifndef __IAudioSessionEnumerator_INTERFACE_DEFINED__
  761. #define __IAudioSessionEnumerator_INTERFACE_DEFINED__
  762. DEFINE_GUID(IID_IAudioSessionEnumerator, 0xe2f5bb11, 0x0570, 0x40ca, 0xac,0xdd, 0x3a,0xa0,0x12,0x77,0xde,0xe8);
  763. #if defined(__cplusplus) && !defined(CINTERFACE)
  764. MIDL_INTERFACE("e2f5bb11-0570-40ca-acdd-3aa01277dee8")
  765. IAudioSessionEnumerator : public IUnknown
  766. {
  767. virtual HRESULT STDMETHODCALLTYPE GetCount(
  768. int *SessionCount) = 0;
  769. virtual HRESULT STDMETHODCALLTYPE GetSession(
  770. int SessionCount,
  771. IAudioSessionControl **Session) = 0;
  772. };
  773. #ifdef __CRT_UUID_DECL
  774. __CRT_UUID_DECL(IAudioSessionEnumerator, 0xe2f5bb11, 0x0570, 0x40ca, 0xac,0xdd, 0x3a,0xa0,0x12,0x77,0xde,0xe8)
  775. #endif
  776. #else
  777. typedef struct IAudioSessionEnumeratorVtbl {
  778. BEGIN_INTERFACE
  779. /*** IUnknown methods ***/
  780. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  781. IAudioSessionEnumerator *This,
  782. REFIID riid,
  783. void **ppvObject);
  784. ULONG (STDMETHODCALLTYPE *AddRef)(
  785. IAudioSessionEnumerator *This);
  786. ULONG (STDMETHODCALLTYPE *Release)(
  787. IAudioSessionEnumerator *This);
  788. /*** IAudioSessionEnumerator methods ***/
  789. HRESULT (STDMETHODCALLTYPE *GetCount)(
  790. IAudioSessionEnumerator *This,
  791. int *SessionCount);
  792. HRESULT (STDMETHODCALLTYPE *GetSession)(
  793. IAudioSessionEnumerator *This,
  794. int SessionCount,
  795. IAudioSessionControl **Session);
  796. END_INTERFACE
  797. } IAudioSessionEnumeratorVtbl;
  798. interface IAudioSessionEnumerator {
  799. CONST_VTBL IAudioSessionEnumeratorVtbl* lpVtbl;
  800. };
  801. #ifdef COBJMACROS
  802. #ifndef WIDL_C_INLINE_WRAPPERS
  803. /*** IUnknown methods ***/
  804. #define IAudioSessionEnumerator_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  805. #define IAudioSessionEnumerator_AddRef(This) (This)->lpVtbl->AddRef(This)
  806. #define IAudioSessionEnumerator_Release(This) (This)->lpVtbl->Release(This)
  807. /*** IAudioSessionEnumerator methods ***/
  808. #define IAudioSessionEnumerator_GetCount(This,SessionCount) (This)->lpVtbl->GetCount(This,SessionCount)
  809. #define IAudioSessionEnumerator_GetSession(This,SessionCount,Session) (This)->lpVtbl->GetSession(This,SessionCount,Session)
  810. #else
  811. /*** IUnknown methods ***/
  812. static FORCEINLINE HRESULT IAudioSessionEnumerator_QueryInterface(IAudioSessionEnumerator* This,REFIID riid,void **ppvObject) {
  813. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  814. }
  815. static FORCEINLINE ULONG IAudioSessionEnumerator_AddRef(IAudioSessionEnumerator* This) {
  816. return This->lpVtbl->AddRef(This);
  817. }
  818. static FORCEINLINE ULONG IAudioSessionEnumerator_Release(IAudioSessionEnumerator* This) {
  819. return This->lpVtbl->Release(This);
  820. }
  821. /*** IAudioSessionEnumerator methods ***/
  822. static FORCEINLINE HRESULT IAudioSessionEnumerator_GetCount(IAudioSessionEnumerator* This,int *SessionCount) {
  823. return This->lpVtbl->GetCount(This,SessionCount);
  824. }
  825. static FORCEINLINE HRESULT IAudioSessionEnumerator_GetSession(IAudioSessionEnumerator* This,int SessionCount,IAudioSessionControl **Session) {
  826. return This->lpVtbl->GetSession(This,SessionCount,Session);
  827. }
  828. #endif
  829. #endif
  830. #endif
  831. #endif /* __IAudioSessionEnumerator_INTERFACE_DEFINED__ */
  832. /*****************************************************************************
  833. * IAudioSessionManager2 interface
  834. */
  835. #ifndef __IAudioSessionManager2_INTERFACE_DEFINED__
  836. #define __IAudioSessionManager2_INTERFACE_DEFINED__
  837. DEFINE_GUID(IID_IAudioSessionManager2, 0x77aa99a0, 0x1bd6, 0x484f, 0x8b,0xc7, 0x2c,0x65,0x4c,0x9a,0x9b,0x6f);
  838. #if defined(__cplusplus) && !defined(CINTERFACE)
  839. MIDL_INTERFACE("77aa99a0-1bd6-484f-8bc7-2c654c9a9b6f")
  840. IAudioSessionManager2 : public IAudioSessionManager
  841. {
  842. virtual HRESULT STDMETHODCALLTYPE GetSessionEnumerator(
  843. IAudioSessionEnumerator **SessionEnum) = 0;
  844. virtual HRESULT STDMETHODCALLTYPE RegisterSessionNotification(
  845. IAudioSessionNotification *SessionNotification) = 0;
  846. virtual HRESULT STDMETHODCALLTYPE UnregisterSessionNotification(
  847. IAudioSessionNotification *SessionNotification) = 0;
  848. virtual HRESULT STDMETHODCALLTYPE RegisterDuckNotification(
  849. LPCWSTR sessionID,
  850. IAudioVolumeDuckNotification *duckNotification) = 0;
  851. virtual HRESULT STDMETHODCALLTYPE UnregisterDuckNotification(
  852. IAudioVolumeDuckNotification *duckNotification) = 0;
  853. };
  854. #ifdef __CRT_UUID_DECL
  855. __CRT_UUID_DECL(IAudioSessionManager2, 0x77aa99a0, 0x1bd6, 0x484f, 0x8b,0xc7, 0x2c,0x65,0x4c,0x9a,0x9b,0x6f)
  856. #endif
  857. #else
  858. typedef struct IAudioSessionManager2Vtbl {
  859. BEGIN_INTERFACE
  860. /*** IUnknown methods ***/
  861. HRESULT (STDMETHODCALLTYPE *QueryInterface)(
  862. IAudioSessionManager2 *This,
  863. REFIID riid,
  864. void **ppvObject);
  865. ULONG (STDMETHODCALLTYPE *AddRef)(
  866. IAudioSessionManager2 *This);
  867. ULONG (STDMETHODCALLTYPE *Release)(
  868. IAudioSessionManager2 *This);
  869. /*** IAudioSessionManager methods ***/
  870. HRESULT (STDMETHODCALLTYPE *GetAudioSessionControl)(
  871. IAudioSessionManager2 *This,
  872. LPCGUID AudioSessionGuid,
  873. DWORD StreamFlags,
  874. IAudioSessionControl **SessionControl);
  875. HRESULT (STDMETHODCALLTYPE *GetSimpleAudioVolume)(
  876. IAudioSessionManager2 *This,
  877. LPCGUID AudioSessionGuid,
  878. DWORD StreamFlags,
  879. ISimpleAudioVolume **AudioVolume);
  880. /*** IAudioSessionManager2 methods ***/
  881. HRESULT (STDMETHODCALLTYPE *GetSessionEnumerator)(
  882. IAudioSessionManager2 *This,
  883. IAudioSessionEnumerator **SessionEnum);
  884. HRESULT (STDMETHODCALLTYPE *RegisterSessionNotification)(
  885. IAudioSessionManager2 *This,
  886. IAudioSessionNotification *SessionNotification);
  887. HRESULT (STDMETHODCALLTYPE *UnregisterSessionNotification)(
  888. IAudioSessionManager2 *This,
  889. IAudioSessionNotification *SessionNotification);
  890. HRESULT (STDMETHODCALLTYPE *RegisterDuckNotification)(
  891. IAudioSessionManager2 *This,
  892. LPCWSTR sessionID,
  893. IAudioVolumeDuckNotification *duckNotification);
  894. HRESULT (STDMETHODCALLTYPE *UnregisterDuckNotification)(
  895. IAudioSessionManager2 *This,
  896. IAudioVolumeDuckNotification *duckNotification);
  897. END_INTERFACE
  898. } IAudioSessionManager2Vtbl;
  899. interface IAudioSessionManager2 {
  900. CONST_VTBL IAudioSessionManager2Vtbl* lpVtbl;
  901. };
  902. #ifdef COBJMACROS
  903. #ifndef WIDL_C_INLINE_WRAPPERS
  904. /*** IUnknown methods ***/
  905. #define IAudioSessionManager2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  906. #define IAudioSessionManager2_AddRef(This) (This)->lpVtbl->AddRef(This)
  907. #define IAudioSessionManager2_Release(This) (This)->lpVtbl->Release(This)
  908. /*** IAudioSessionManager methods ***/
  909. #define IAudioSessionManager2_GetAudioSessionControl(This,AudioSessionGuid,StreamFlags,SessionControl) (This)->lpVtbl->GetAudioSessionControl(This,AudioSessionGuid,StreamFlags,SessionControl)
  910. #define IAudioSessionManager2_GetSimpleAudioVolume(This,AudioSessionGuid,StreamFlags,AudioVolume) (This)->lpVtbl->GetSimpleAudioVolume(This,AudioSessionGuid,StreamFlags,AudioVolume)
  911. /*** IAudioSessionManager2 methods ***/
  912. #define IAudioSessionManager2_GetSessionEnumerator(This,SessionEnum) (This)->lpVtbl->GetSessionEnumerator(This,SessionEnum)
  913. #define IAudioSessionManager2_RegisterSessionNotification(This,SessionNotification) (This)->lpVtbl->RegisterSessionNotification(This,SessionNotification)
  914. #define IAudioSessionManager2_UnregisterSessionNotification(This,SessionNotification) (This)->lpVtbl->UnregisterSessionNotification(This,SessionNotification)
  915. #define IAudioSessionManager2_RegisterDuckNotification(This,sessionID,duckNotification) (This)->lpVtbl->RegisterDuckNotification(This,sessionID,duckNotification)
  916. #define IAudioSessionManager2_UnregisterDuckNotification(This,duckNotification) (This)->lpVtbl->UnregisterDuckNotification(This,duckNotification)
  917. #else
  918. /*** IUnknown methods ***/
  919. static FORCEINLINE HRESULT IAudioSessionManager2_QueryInterface(IAudioSessionManager2* This,REFIID riid,void **ppvObject) {
  920. return This->lpVtbl->QueryInterface(This,riid,ppvObject);
  921. }
  922. static FORCEINLINE ULONG IAudioSessionManager2_AddRef(IAudioSessionManager2* This) {
  923. return This->lpVtbl->AddRef(This);
  924. }
  925. static FORCEINLINE ULONG IAudioSessionManager2_Release(IAudioSessionManager2* This) {
  926. return This->lpVtbl->Release(This);
  927. }
  928. /*** IAudioSessionManager methods ***/
  929. static FORCEINLINE HRESULT IAudioSessionManager2_GetAudioSessionControl(IAudioSessionManager2* This,LPCGUID AudioSessionGuid,DWORD StreamFlags,IAudioSessionControl **SessionControl) {
  930. return This->lpVtbl->GetAudioSessionControl(This,AudioSessionGuid,StreamFlags,SessionControl);
  931. }
  932. static FORCEINLINE HRESULT IAudioSessionManager2_GetSimpleAudioVolume(IAudioSessionManager2* This,LPCGUID AudioSessionGuid,DWORD StreamFlags,ISimpleAudioVolume **AudioVolume) {
  933. return This->lpVtbl->GetSimpleAudioVolume(This,AudioSessionGuid,StreamFlags,AudioVolume);
  934. }
  935. /*** IAudioSessionManager2 methods ***/
  936. static FORCEINLINE HRESULT IAudioSessionManager2_GetSessionEnumerator(IAudioSessionManager2* This,IAudioSessionEnumerator **SessionEnum) {
  937. return This->lpVtbl->GetSessionEnumerator(This,SessionEnum);
  938. }
  939. static FORCEINLINE HRESULT IAudioSessionManager2_RegisterSessionNotification(IAudioSessionManager2* This,IAudioSessionNotification *SessionNotification) {
  940. return This->lpVtbl->RegisterSessionNotification(This,SessionNotification);
  941. }
  942. static FORCEINLINE HRESULT IAudioSessionManager2_UnregisterSessionNotification(IAudioSessionManager2* This,IAudioSessionNotification *SessionNotification) {
  943. return This->lpVtbl->UnregisterSessionNotification(This,SessionNotification);
  944. }
  945. static FORCEINLINE HRESULT IAudioSessionManager2_RegisterDuckNotification(IAudioSessionManager2* This,LPCWSTR sessionID,IAudioVolumeDuckNotification *duckNotification) {
  946. return This->lpVtbl->RegisterDuckNotification(This,sessionID,duckNotification);
  947. }
  948. static FORCEINLINE HRESULT IAudioSessionManager2_UnregisterDuckNotification(IAudioSessionManager2* This,IAudioVolumeDuckNotification *duckNotification) {
  949. return This->lpVtbl->UnregisterDuckNotification(This,duckNotification);
  950. }
  951. #endif
  952. #endif
  953. #endif
  954. #endif /* __IAudioSessionManager2_INTERFACE_DEFINED__ */
  955. #endif
  956. /* Begin additional prototypes for all interfaces */
  957. /* End additional prototypes */
  958. #ifdef __cplusplus
  959. }
  960. #endif
  961. #endif /* __audiopolicy_h__ */