audiopolicy.idl 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /**
  2. * Core Audio audio policy definitions
  3. *
  4. * (c) 2013 Extended by mingw-w64 team
  5. * base on version Copyright 2009 Maarten Lankhorst
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  20. *
  21. */
  22. cpp_quote("#include <winapifamily.h>")
  23. cpp_quote("")
  24. import "oaidl.idl";
  25. import "ocidl.idl";
  26. import "propidl.idl";
  27. import "audiosessiontypes.h";
  28. import "audioclient.idl";
  29. cpp_quote("")
  30. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  31. typedef enum AudioSessionDisconnectReason {
  32. DisconnectReasonDeviceRemoval,
  33. DisconnectReasonServerShutdown,
  34. DisconnectReasonFormatChanged,
  35. DisconnectReasonSessionLogoff,
  36. DisconnectReasonSessionDisconnected,
  37. DisconnectReasonExclusiveModeOverride
  38. } AudioSessionDisconnectReason;
  39. cpp_quote("")
  40. [object, local, pointer_default (unique), uuid (24918acc-64b3-37c1-8ca9-74a66e9957a8)]
  41. interface IAudioSessionEvents : IUnknown {
  42. HRESULT OnDisplayNameChanged ([in, string]LPCWSTR NewDisplayName,[in] LPCGUID EventContext);
  43. HRESULT OnIconPathChanged ([in, string]LPCWSTR NewIconPath,[in] LPCGUID EventContext);
  44. HRESULT OnSimpleVolumeChanged ([in] float NewVolume,[in] BOOL NewMute,[in] LPCGUID EventContext);
  45. HRESULT OnChannelVolumeChanged ([in] DWORD ChannelCount,[in, size_is (ChannelCount)]float NewChannelVolumeArray[*],[in]DWORD ChangedChannel,[in] LPCGUID EventContext);
  46. HRESULT OnGroupingParamChanged ([in] LPCGUID NewGroupingParam,[in] LPCGUID EventContext);
  47. HRESULT OnStateChanged ([in] AudioSessionState NewState);
  48. HRESULT OnSessionDisconnected ([in] AudioSessionDisconnectReason DisconnectReason);
  49. };
  50. cpp_quote("")
  51. [object, local, uuid (F4B1A599-7266-4319-A8CA-E70ACB11E8CD), helpstring ("AudioSession Control Interface"), pointer_default (unique)]
  52. interface IAudioSessionControl : IUnknown {
  53. HRESULT GetState ([out] AudioSessionState *pRetVal);
  54. HRESULT GetDisplayName ([out, string] LPWSTR *pRetVal);
  55. HRESULT SetDisplayName ([in, string] LPCWSTR Value,[in, unique] LPCGUID EventContext);
  56. HRESULT GetIconPath ([out, string] LPWSTR *pRetVal);
  57. HRESULT SetIconPath ([in, string] LPCWSTR Value,[in, unique] LPCGUID EventContext);
  58. HRESULT GetGroupingParam ([out] GUID *pRetVal);
  59. HRESULT SetGroupingParam ([in] LPCGUID Override,[in, unique] LPCGUID EventContext);
  60. HRESULT RegisterAudioSessionNotification ([in]IAudioSessionEvents *NewNotifications);
  61. HRESULT UnregisterAudioSessionNotification ([in]IAudioSessionEvents *NewNotifications);
  62. }
  63. cpp_quote("#endif")
  64. cpp_quote("")
  65. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  66. [object, local, uuid (bfb7ff88-7239-4fc9-8fa2-07c950be9c6d), helpstring ("AudioSession Control Extended Interface"), pointer_default (unique)]
  67. interface IAudioSessionControl2 : IAudioSessionControl {
  68. HRESULT GetSessionIdentifier ([out, string] LPWSTR *pRetVal);
  69. HRESULT GetSessionInstanceIdentifier ([out, string] LPWSTR *pRetVal);
  70. HRESULT GetProcessId ([out] DWORD *pRetVal);
  71. HRESULT IsSystemSoundsSession ();
  72. HRESULT SetDuckingPreference ([in] BOOL optOut);
  73. }
  74. cpp_quote("")
  75. [object, local, uuid (BFA971F1-4d5e-40bb-935e-967039bfbee4), helpstring ("Audio Session Manager Interface"), pointer_default (unique)]
  76. interface IAudioSessionManager : IUnknown {
  77. HRESULT GetAudioSessionControl ([in]LPCGUID AudioSessionGuid,[in] DWORD StreamFlags,[out] IAudioSessionControl **SessionControl);
  78. HRESULT GetSimpleAudioVolume ([in]LPCGUID AudioSessionGuid,[in] DWORD StreamFlags,[out] ISimpleAudioVolume **AudioVolume);
  79. }
  80. cpp_quote("")
  81. [object, local, uuid (C3B284D4-6d39-4359-B3CF-B56DDB3BB39C), helpstring ("Audio Session Notification Interface"), pointer_default (unique)]
  82. interface IAudioVolumeDuckNotification : IUnknown {
  83. HRESULT OnVolumeDuckNotification ([in] LPCWSTR sessionID,[in] UINT32 countCommunicationSessions);
  84. HRESULT OnVolumeUnduckNotification ([in] LPCWSTR sessionID);
  85. }
  86. cpp_quote("")
  87. [object, local, uuid (641dd20b-4d41-49cc-ABA3-174b9477bb08), helpstring ("Audio Session Notification Interface"), pointer_default (unique)]
  88. interface IAudioSessionNotification : IUnknown {
  89. HRESULT OnSessionCreated ([in] IAudioSessionControl *NewSession);
  90. }
  91. cpp_quote("")
  92. [object, local, uuid (E2F5BB11-0570-40ca-ACDD-3aa01277dee8), helpstring ("Audio Session Enumerator Interface"), pointer_default (unique)]
  93. interface IAudioSessionEnumerator : IUnknown {
  94. HRESULT GetCount ([out] int *SessionCount);
  95. HRESULT GetSession ([in] int SessionCount,[out] IAudioSessionControl **Session);
  96. }
  97. cpp_quote("")
  98. [object, local, uuid (77aa99a0-1bd6-484f-8bc7-2c654c9a9b6f), helpstring ("Audio Session Manager Extended Interface"), pointer_default (unique)]
  99. interface IAudioSessionManager2 : IAudioSessionManager {
  100. HRESULT GetSessionEnumerator ([out, retval]IAudioSessionEnumerator **SessionEnum);
  101. HRESULT RegisterSessionNotification (IAudioSessionNotification *SessionNotification);
  102. HRESULT UnregisterSessionNotification (IAudioSessionNotification *SessionNotification);
  103. HRESULT RegisterDuckNotification ([in, string] LPCWSTR sessionID,[in]IAudioVolumeDuckNotification *duckNotification);
  104. HRESULT UnregisterDuckNotification ([in]IAudioVolumeDuckNotification *duckNotification);
  105. }
  106. cpp_quote("#endif")