ReactOS  0.4.13-dev-235-g7373cb3
audioclient.idl
Go to the documentation of this file.
1 /*
2  * Core Audio audioclient definitions
3  *
4  * Copyright 2009 Maarten Lankhorst
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  */
21 
22 import "wtypes.idl";
23 import "unknwn.idl";
24 import "audiosessiontypes.h";
25 
26 /* Forward declarations */
27 interface IAudioClient;
28 interface IAudioRenderClient;
29 interface IAudioCaptureClient;
30 interface IAudioClock;
31 interface IAudioClock2;
32 interface IAudioClockAdjustment;
33 interface ISimpleAudioVolume;
34 interface IAudioStreamVolume;
35 interface IChannelAudioVolume;
36 
37 cpp_quote("#if 0")
38 typedef struct WAVEFORMATEX /*[hidden,restricted]*/
39 {
47 } WAVEFORMATEX;
48 cpp_quote("#else")
49 cpp_quote("#include <mmreg.h>")
50 cpp_quote("#endif")
51 
52 cpp_quote("#if 0")
53 typedef LONGLONG /*[hidden,restricted]*/ REFERENCE_TIME;
54 cpp_quote("#else")
55 cpp_quote("#define _IKsControl_")
56 cpp_quote("#include <ks.h>")
57 cpp_quote("#include <ksmedia.h>")
58 cpp_quote("#endif")
59 
61 {
65 };
66 
67 [
68  local,
70  uuid(1cb9ad4c-dbfa-4c32-b178-c2f568a703b2),
71  object,
72 ]
74 {
76  [in] AUDCLNT_SHAREMODE ShareMode,
78  [in] REFERENCE_TIME hnsBufferDuration,
79  [in] REFERENCE_TIME hnsPeriodicity,
80  [in] const WAVEFORMATEX *pFormat,
81  [in] LPCGUID AudioSessionGuid
82  );
84  [out] UINT32 *pNumBufferFrames
85  );
87  [out] REFERENCE_TIME *phnsLatency
88  );
90  [out] UINT32 *pNumPaddingFrames
91  );
93  [in] AUDCLNT_SHAREMODE ShareMode,
94  [in] const WAVEFORMATEX *pFormat,
95  [out,unique] WAVEFORMATEX **ppClosestMatch
96  );
98  [out] WAVEFORMATEX **ppDeviceFormat
99  );
101  [out] REFERENCE_TIME *phnsDefaultDevicePeriod,
102  [out] REFERENCE_TIME *phnsMinimumDevicePeriod
103  );
104  HRESULT Start(void);
105  HRESULT Stop(void);
106  HRESULT Reset(void);
107  HRESULT SetEventHandle([in] HANDLE eventHandle);
109  [in] REFIID riid,
110  [iid_is(riid),out] void **ppv
111  );
112 }
113 
114 [
115  local,
117  uuid(f294acfc-3146-4483-a7bf-addca7c260e2),
118  object,
119 ]
121 {
123  [in] UINT32 NumFramesRequested,
124  [out] BYTE **ppData
125  );
127  [in] UINT32 NumFramesWritten,
128  [in] DWORD dwFlags
129  );
130 }
131 
132 [
133  local,
135  uuid(c8adbd64-e71e-48a0-a4de-185c395cd317),
136  object,
137 ]
139 {
141  [out] BYTE **ppData,
142  [out] UINT32 *pNumFramesToRead,
143  [out] DWORD *pdwFlags,
144  [unique,out] UINT64 *pu64DevicePosition,
145  [unique,out] UINT64 *pu64QPCPosition
146  );
148  [in] UINT32 NumFramesRead
149  );
151  [out] UINT32 *pNumFramesInNextPacket
152  );
153 }
154 
155 cpp_quote("#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ 0x00000001")
156 
157 [
158  local,
160  uuid("cd63314f-3fba-4a1b-812c-ef96358728e7"),
161  object,
162 ]
164 {
166  [out] UINT64 *pu64Frequency
167  );
169  [out] UINT64 *pu64Position,
170  [out,unique] UINT64 *pu64QPCPosition
171  );
173  [out] DWORD *pdwCharacteristics
174  );
175 }
176 
177 [
178  local,
180  uuid("6f49ff73-6727-49ac-a008-d98cf5e70048"),
181  object,
182 ]
184 {
186  [out] UINT64 *DevicePosition,
187  [out,unique] UINT64 *QPCPosition
188  );
189 }
190 
191 [
192  local,
194  uuid("f6e4c0a0-46d9-4fb9-be21-57a3ef2b626c"),
195  object,
196 ]
198 {
200  [in] float flSampleRate
201  );
202 }
203 
204 [
205  local,
207  uuid("87ce5498-68d6-44e5-9215-6da47ef883d8"),
208  object,
209 ]
211 {
213  [in] float fLevel,
214  [unique,in] LPCGUID EventContext
215  );
217  [out] float *pfLevel
218  );
220  [in] const BOOL bMute,
221  [unique,in] LPCGUID EventContext
222  );
224  [out] BOOL *pbMute
225  );
226 }
227 
228 [
229  local,
231  uuid("93014887-242d-4068-8a15-cf5e93b90fe3"),
232  object,
233 ]
235 {
237  [out] UINT32 *pdwCount
238  );
240  [in] UINT32 dwIndex,
241  [in] const float fLevel
242  );
244  [in] UINT32 dwIndex,
245  [out] float *pfLevel
246  );
248  [in] UINT32 dwCount,
249  [size_is(dwCount),in] const float *pfVolumes
250  );
252  [in] UINT32 dwCount,
253  [size_is(dwCount),out] float *pfVolumes
254  );
255 }
256 
257 [
258  local,
260  uuid("1c158861-b533-4b30-b1cf-e853e51c59b8"),
261  object,
262 ]
264 {
266  [out] UINT32 *pdwCount
267  );
269  [in] UINT32 dwIndex,
270  [in] const float fLevel,
271  [unique,in] LPCGUID EventContext
272  );
274  [in] UINT32 dwIndex,
275  [out] float *pfLevel
276  );
278  [in] UINT32 dwCount,
279  [size_is(dwCount),in] const float *pfVolumes,
280  [unique,in] LPCGUID EventContext
281  );
283  [in] UINT32 dwCount,
284  [size_is(dwCount),out] float *pfVolumes
285  );
286 }
287 
288 cpp_quote("#define FACILIY_AUDCLNT 0x889")
289 cpp_quote("#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILIY_AUDCLNT, n)")
290 cpp_quote("#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILIY_AUDCLNT, n)")
291 cpp_quote("#define AUDCLNT_E_NOT_INITIALIZED AUDCLNT_ERR(1)")
292 cpp_quote("#define AUDCLNT_E_ALREADY_INITIALIZED AUDCLNT_ERR(2)")
293 cpp_quote("#define AUDCLNT_E_WRONG_ENDPOINT_TYPE AUDCLNT_ERR(3)")
294 cpp_quote("#define AUDCLNT_E_DEVICE_INVALIDATED AUDCLNT_ERR(4)")
295 cpp_quote("#define AUDCLNT_E_NOT_STOPPED AUDCLNT_ERR(5)")
296 cpp_quote("#define AUDCLNT_E_BUFFER_TOO_LARGE AUDCLNT_ERR(6)")
297 cpp_quote("#define AUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(7)")
298 cpp_quote("#define AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_ERR(8)")
299 cpp_quote("#define AUDCLNT_E_INVALID_SIZE AUDCLNT_ERR(9)")
300 cpp_quote("#define AUDCLNT_E_DEVICE_IN_USE AUDCLNT_ERR(0x0a)")
301 cpp_quote("#define AUDCLNT_E_BUFFER_OPERATION_PENDING AUDCLNT_ERR(0x0b)")
302 cpp_quote("#define AUDCLNT_E_THREAD_NOT_REGISTERED AUDCLNT_ERR(0x0c)")
303 /* Not defined? cpp_quote("#define AUDCLNT_E_UNKNOWN_XXX1 AUDCLNT_ERR(0x0d)") */
304 cpp_quote("#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x0e)")
305 cpp_quote("#define AUDCLNT_E_ENDPOINT_CREATE_FAILED AUDCLNT_ERR(0x0f)")
306 cpp_quote("#define AUDCLNT_E_SERVICE_NOT_RUNNING AUDCLNT_ERR(0x10)")
307 cpp_quote("#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED AUDCLNT_ERR(0x11)")
308 cpp_quote("#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY AUDCLNT_ERR(0x12)")
309 cpp_quote("#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x13)")
310 cpp_quote("#define AUDCLNT_E_EVENTHANDLE_NOT_SET AUDCLNT_ERR(0x14)")
311 cpp_quote("#define AUDCLNT_E_INCORRECT_BUFFER_SIZE AUDCLNT_ERR(0x15)")
312 cpp_quote("#define AUDCLNT_E_BUFFER_SIZE_ERROR AUDCLNT_ERR(0x16)")
313 cpp_quote("#define AUDCLNT_E_CPUUSAGE_EXCEEDED AUDCLNT_ERR(0x17)")
314 cpp_quote("#define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x18)")
315 cpp_quote("#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x19)")
316 /* Hex fail */
317 cpp_quote("#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x20)")
318 cpp_quote("#define AUDCLNT_E_INVALID_STREAM_FLAG AUDCLNT_ERR(0x021)")
319 cpp_quote("#define AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE AUDCLNT_ERR(0x022)")
320 cpp_quote("#define AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES AUDCLNT_ERR(0x023)")
321 cpp_quote("#define AUDCLNT_E_OFFLOAD_MODE_ONLY AUDCLNT_ERR(0x024)")
322 cpp_quote("#define AUDCLNT_E_NONOFFLOAD_MODE_ONLY AUDCLNT_ERR(0x025)")
323 cpp_quote("#define AUDCLNT_E_RESOURCES_INVALIDATED AUDCLNT_ERR(0x026)")
324 
325 cpp_quote("#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x1)")
326 cpp_quote("#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x2)")
327 cpp_quote("#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x3)")
HRESULT GetPosition([out] UINT64 *pu64Position, [out, unique] UINT64 *pu64QPCPosition)
#define REFIID
Definition: guiddef.h:113
HRESULT GetCharacteristics([out] DWORD *pdwCharacteristics)
HRESULT SetSampleRate([in] float flSampleRate)
HRESULT GetChannelCount([out] UINT32 *pdwCount)
HRESULT SetMasterVolume([in] float fLevel, [unique, in] LPCGUID EventContext)
HRESULT GetService([in] REFIID riid, [iid_is(riid), out] void **ppv)
HRESULT SetMute([in] const BOOL bMute, [unique, in] LPCGUID EventContext)
REFIID riid
Definition: precomp.h:44
HRESULT GetChannelVolume([in] UINT32 dwIndex, [out] float *pfLevel)
HRESULT GetBuffer([in] UINT32 NumFramesRequested, [out] BYTE **ppData)
HRESULT GetAllVolumes([in] UINT32 dwCount, [size_is(dwCount), out] float *pfVolumes)
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT GetCurrentPadding([out] UINT32 *pNumPaddingFrames)
HRESULT ReleaseBuffer([in] UINT32 NumFramesRead)
coclass AMMultiMediaStream cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);") cpp_quote("DEFINE_GUID(CLSID_AMAudioStream
HRESULT GetNextPacketSize([out] UINT32 *pNumFramesInNextPacket)
unsigned int UINT32
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT GetChannelVolume([in] UINT32 dwIndex, [out] float *pfLevel)
WORD wBitsPerSample
Definition: audioclient.idl:45
HRESULT Start(void)
HRESULT SetChannelVolume([in] UINT32 dwIndex, [in] const float fLevel, [unique, in] LPCGUID EventContext)
HRESULT GetDevicePeriod([out] REFERENCE_TIME *phnsDefaultDevicePeriod, [out] REFERENCE_TIME *phnsMinimumDevicePeriod)
HRESULT IsFormatSupported([in] AUDCLNT_SHAREMODE ShareMode, [in] const WAVEFORMATEX *pFormat, [out, unique] WAVEFORMATEX **ppClosestMatch)
HRESULT SetAllVolumes([in] UINT32 dwCount, [size_is(dwCount), in] const float *pfVolumes, [unique, in] LPCGUID EventContext)
HRESULT GetMixFormat([out] WAVEFORMATEX **ppDeviceFormat)
DWORD nSamplesPerSec
Definition: audioclient.idl:42
HRESULT GetAllVolumes([in] UINT32 dwCount, [size_is(dwCount), out] float *pfVolumes)
int64_t LONGLONG
Definition: typedefs.h:66
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:77
struct WAVEFORMATEX WAVEFORMATEX
HRESULT GetMute([out] BOOL *pbMute)
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT Initialize([in] AUDCLNT_SHAREMODE ShareMode, [in] DWORD StreamFlags, [in] REFERENCE_TIME hnsBufferDuration, [in] REFERENCE_TIME hnsPeriodicity, [in] const WAVEFORMATEX *pFormat, [in] LPCGUID AudioSessionGuid)
PSDBQUERYRESULT_VISTA PVOID * ppData
Definition: env.c:54
HRESULT GetPosition([out] UINT64 *DevicePosition, [out, unique] UINT64 *QPCPosition)
LONGLONG REFERENCE_TIME
Definition: audioclient.idl:53
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
unsigned char BYTE
Definition: mem.h:68
HRESULT GetMasterVolume([out] float *pfLevel)
HRESULT GetFrequency([out] UINT64 *pu64Frequency)
HRESULT Reset(void)
#define local
Definition: zutil.h:30
HRESULT SetEventHandle([in] HANDLE eventHandle)
GLuint in
Definition: glext.h:9616
static unsigned char pointer_default
Definition: parser.tab.c:114
DWORD nAvgBytesPerSec
Definition: audioclient.idl:43
HRESULT ReleaseBuffer([in] UINT32 NumFramesWritten, [in] DWORD dwFlags)
enum _AUDCLNT_SHAREMODE AUDCLNT_SHAREMODE
HRESULT GetChannelCount([out] UINT32 *pdwCount)
HRESULT SetChannelVolume([in] UINT32 dwIndex, [in] const float fLevel)
HRESULT GetStreamLatency([out] REFERENCE_TIME *phnsLatency)
HRESULT Stop(void)
HRESULT SetAllVolumes([in] UINT32 dwCount, [size_is(dwCount), in] const float *pfVolumes)
HRESULT GetBuffer([out] BYTE **ppData, [out] UINT32 *pNumFramesToRead, [out] DWORD *pdwFlags, [unique, out] UINT64 *pu64DevicePosition, [unique, out] UINT64 *pu64QPCPosition)
IN PIRP IN PFCB IN ULONG IN ULONG IN ULONG IN ULONG StreamFlags
Definition: fatprocs.h:580
unsigned long long UINT64
HRESULT GetBufferSize([out] UINT32 *pNumBufferFrames)
_AUDCLNT_BUFFERFLAGS
Definition: audioclient.idl:60
void * object
Definition: jmemsys.h:48