endpointvolume.idl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * Copyright (C) 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. import "unknwn.idl";
  19. import "devicetopology.idl";
  20. typedef struct AUDIO_VOLUME_NOTIFICATION_DATA
  21. {
  22. GUID guidEventContext;
  23. BOOL bMuted;
  24. FLOAT fMasterVolume;
  25. UINT nChannels;
  26. FLOAT afChannelVolumes[1];
  27. } AUDIO_VOLUME_NOTIFICATION_DATA;
  28. cpp_quote("typedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;")
  29. cpp_quote("#define ENDPOINT_HARDWARE_SUPPORT_VOLUME 0x1")
  30. cpp_quote("#define ENDPOINT_HARDWARE_SUPPORT_MUTE 0x2")
  31. cpp_quote("#define ENDPOINT_HARDWARE_SUPPORT_METER 0x4")
  32. interface IAudioEndpointVolumeCallback;
  33. interface IAudioEndpointVolume;
  34. interface IAudioEndpointVolumeEx;
  35. interface IAudioMeterInformation;
  36. [
  37. pointer_default(unique),
  38. nonextensible,
  39. uuid(657804fa-d6ad-4496-8a60-352752af4f89),
  40. local,
  41. object
  42. ]
  43. interface IAudioEndpointVolumeCallback : IUnknown
  44. {
  45. HRESULT OnNotify(
  46. AUDIO_VOLUME_NOTIFICATION_DATA *pNotify
  47. );
  48. }
  49. [
  50. pointer_default(unique),
  51. nonextensible,
  52. uuid(5cdf2c82-841e-4546-9722-0cf74078229a),
  53. local,
  54. object
  55. ]
  56. interface IAudioEndpointVolume : IUnknown
  57. {
  58. HRESULT RegisterControlChangeNotify(
  59. [in] IAudioEndpointVolumeCallback *pNotify
  60. );
  61. HRESULT UnregisterControlChangeNotify(
  62. [in] IAudioEndpointVolumeCallback *pNotify
  63. );
  64. HRESULT GetChannelCount(
  65. [out] UINT *pnChannelCount
  66. );
  67. HRESULT SetMasterVolumeLevel(
  68. [in] FLOAT fLevelDB,
  69. [unique,in] LPCGUID pguidEventContext
  70. );
  71. HRESULT SetMasterVolumeLevelScalar(
  72. [in] FLOAT fLevel,
  73. [unique,in] LPCGUID pguidEventContext
  74. );
  75. HRESULT GetMasterVolumeLevel(
  76. [out] FLOAT *fLevelDB
  77. );
  78. HRESULT GetMasterVolumeLevelScalar(
  79. [out] FLOAT *fLevel
  80. );
  81. HRESULT SetChannelVolumeLevel(
  82. [in] UINT nChannel,
  83. [in] FLOAT fLevelDB,
  84. [unique,in] LPCGUID pguidEventContext
  85. );
  86. HRESULT SetChannelVolumeLevelScalar(
  87. [in] UINT nChannel,
  88. [in] FLOAT fLevel,
  89. [unique,in] LPCGUID pguidEventContext
  90. );
  91. HRESULT GetChannelVolumeLevel(
  92. [in] UINT nChannel,
  93. [out] FLOAT *fLevelDB
  94. );
  95. HRESULT GetChannelVolumeLevelScalar(
  96. [in] UINT nChannel,
  97. [out] FLOAT *fLevel
  98. );
  99. HRESULT SetMute(
  100. [in] BOOL bMute,
  101. [unique,in] LPCGUID pguidEventContext
  102. );
  103. HRESULT GetMute(
  104. [out] BOOL *bMute
  105. );
  106. HRESULT GetVolumeStepInfo(
  107. [out] UINT *pnStep,
  108. [out] UINT *pnStepCount
  109. );
  110. HRESULT VolumeStepUp(
  111. [unique,in] LPCGUID pguidEventContext
  112. );
  113. HRESULT VolumeStepDown(
  114. [unique,in] LPCGUID pguidEventContext
  115. );
  116. HRESULT QueryHardwareSupport(
  117. [out] DWORD *pdwHardwareSupportMask
  118. );
  119. HRESULT GetVolumeRange(
  120. [out] FLOAT *pflVolumeMindB,
  121. [out] FLOAT *pflVolumeMaxdB,
  122. [out] FLOAT *pflVolumeIncrementdB
  123. );
  124. }
  125. [
  126. pointer_default(unique),
  127. nonextensible,
  128. uuid(66e11784-f695-4f28-a505-a7080081a78f),
  129. local,
  130. object
  131. ]
  132. interface IAudioEndpointVolumeEx : IAudioEndpointVolume
  133. {
  134. HRESULT GetVolumeRangeChannel(
  135. [in] UINT iChannel,
  136. [out] FLOAT *pflVolumeMindB,
  137. [out] FLOAT *pflVolumeMaxdB,
  138. [out] FLOAT *pflVolumeIncrementdB
  139. );
  140. }