source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/audioclient.idl@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 11.8 KB
RevLine 
[1166]1/*
2 * Core Audio audioclient definitions
3 *
4 * (c) 2013 Corrected, and 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
23cpp_quote("#include <winapifamily.h>")
24cpp_quote("")
25
26import "wtypes.idl";
27import "unknwn.idl";
28
29cpp_quote("")
30cpp_quote("#if 0")
31typedef [restricted, hidden] struct WAVEFORMATEX {
32 WORD wFormatTag;
33 WORD nChannels;
34 DWORD nSamplesPerSec;
35 DWORD nAvgBytesPerSec;
36 WORD nBlockAlign;
37 WORD wBitsPerSample;
38 WORD cbSize;
39} WAVEFORMATEX;
40
41cpp_quote("")
42typedef [restricted, hidden] LONGLONG REFERENCE_TIME;
43cpp_quote("#else")
44cpp_quote("#define _IKsControl_")
45cpp_quote("")
46cpp_quote("#include <mmreg.h>")
47cpp_quote("#include <ks.h>")
48cpp_quote("#include <ksmedia.h>")
49cpp_quote("#endif")
50
51cpp_quote("")
52
53import "audiosessiontypes.h";
54
55cpp_quote("")
56cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
57enum _AUDCLNT_BUFFERFLAGS {
58 AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY = 0x1,
59 AUDCLNT_BUFFERFLAGS_SILENT = 0x2,
60 AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR = 0x4
61};
62
63typedef [v1_enum] enum AUDCLNT_STREAMOPTIONS {
64 AUDCLNT_STREAMOPTIONS_NONE = 0x0,
65 AUDCLNT_STREAMOPTIONS_RAW = 0x1,
66 AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x2,
67 AUDCLNT_STREAMOPTIONS_AMBISONICS = 0x4
68} AUDCLNT_STREAMOPTIONS;
69cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(AUDCLNT_STREAMOPTIONS);")
70
71typedef enum AMBISONICS_TYPE {
72 AMBISONICS_TYPE_FULL3D = 0x0
73} AMBISONICS_TYPE;
74
75typedef enum AMBISONICS_CHANNEL_ORDERING {
76 AMBISONICS_CHANNEL_ORDERING_ACN = 0x0
77} AMBISONICS_CHANNEL_ORDERING;
78
79typedef enum AMBISONICS_NORMALIZATION {
80 AMBISONICS_NORMALIZATION_SN3D = 0x0,
81 AMBISONICS_NORMALIZATION_N3D = 0x1
82} AMBISONICS_NORMALIZATION;
83
84cpp_quote("")
85typedef struct AudioClientProperties {
86 UINT32 cbSize;
87 WINBOOL bIsOffload;
88 AUDIO_STREAM_CATEGORY eCategory;
89 AUDCLNT_STREAMOPTIONS Options;
90} AudioClientProperties;
91
92typedef struct AudioClient3ActivationParams {
93 GUID tracingContextId;
94} AudioClient3ActivationParams;
95
96typedef struct AMBISONICS_PARAMS {
97 UINT32 u32Size;
98 UINT32 u32Version;
99 AMBISONICS_TYPE u32Type;
100 AMBISONICS_CHANNEL_ORDERING u32ChannelOrdering;
101 AMBISONICS_NORMALIZATION u32Normalization;
102 UINT32 u32Order;
103 UINT32 u32NumChannels;
104 UINT32 *pu32ChannelMap;
105} AMBISONICS_PARAMS;
106
107cpp_quote("")
108[object, local, uuid (1cb9ad4c-DBFA-4c32-B178-C2F568A703B2), pointer_default (unique)]
109interface IAudioClient : IUnknown {
110 HRESULT Initialize ([in] AUDCLNT_SHAREMODE ShareMode,[in] DWORD StreamFlags,[in] REFERENCE_TIME hnsBufferDuration,[in] REFERENCE_TIME hnsPeriodicity,[in] const WAVEFORMATEX *pFormat,[in] LPCGUID AudioSessionGuid);
111 HRESULT GetBufferSize ([out] UINT32 *pNumBufferFrames);
112 HRESULT GetStreamLatency ([out] REFERENCE_TIME *phnsLatency);
113 HRESULT GetCurrentPadding ([out] UINT32 *pNumPaddingFrames);
114 HRESULT IsFormatSupported ([in] AUDCLNT_SHAREMODE ShareMode,[in] const WAVEFORMATEX *pFormat,[out, unique] WAVEFORMATEX **ppClosestMatch);
115 HRESULT GetMixFormat ([out] WAVEFORMATEX **ppDeviceFormat);
116 HRESULT GetDevicePeriod ([out] REFERENCE_TIME *phnsDefaultDevicePeriod,[out] REFERENCE_TIME *phnsMinimumDevicePeriod);
117 HRESULT Start ();
118 HRESULT Stop ();
119 HRESULT Reset ();
120 HRESULT SetEventHandle ([in] HANDLE eventHandle);
121 HRESULT GetService ([in] REFIID riid,[out, iid_is (riid)] void **ppv);
122}
123
124cpp_quote("")
125[object, local, uuid (726778cd-F60A-4eda-82de-E47610CD78AA), pointer_default (unique)]
126interface IAudioClient2 : IAudioClient {
127 HRESULT IsOffloadCapable ([in] AUDIO_STREAM_CATEGORY Category,[in] WINBOOL *pbOffloadCapable);
128 HRESULT SetClientProperties ([in] const AudioClientProperties *pProperties);
129 HRESULT GetBufferSizeLimits ([in] const WAVEFORMATEX *pFormat,[in] WINBOOL bEventDriven,[in] REFERENCE_TIME *phnsMinBufferDuration,[in] REFERENCE_TIME *phnsMaxBufferDuration);
130}
131
132[object, local, uuid (7ed4ee07-8e67-4cd4-8c1a-2b7a5987ad42), pointer_default (unique)]
133interface IAudioClient3 : IAudioClient2 {
134 HRESULT GetSharedModeEnginePeriod ([in] const WAVEFORMATEX *pFormat, [out] UINT32 *pDefaultPeriodInFrames, [out] UINT32 *pFundamentalPeriodInFrames, [out] UINT32 *pMinPeriodInFrames, [out] UINT32 *pMaxPeriodInFrames);
135 HRESULT GetCurrentSharedModeEnginePeriod ([out, unique] WAVEFORMATEX **ppFormat, [out] UINT32 *pCurrentPeriodInFrames);
136 HRESULT InitializeSharedAudioStream ([in] DWORD StreamFlags, [in] UINT32 PeriodInFrames, [in] const WAVEFORMATEX *pFormat, [in] LPCGUID AudioSessionGuid);
137}
138
139cpp_quote("")
140[object, local, uuid (F294ACFC-3146-4483-A7BF-ADDCA7C260E2), helpstring ("IAudioRenderClient Interface"), pointer_default (unique)]
141interface IAudioRenderClient : IUnknown {
142 HRESULT GetBuffer ([in] UINT32 NumFramesRequested,[out] BYTE **ppData);
143 HRESULT ReleaseBuffer ([in] UINT32 NumFramesWritten,[in] DWORD dwFlags);
144}
145
146cpp_quote("")
147[object, local, uuid (C8ADBD64-E71E-48a0-A4DE-185c395cd317), helpstring ("IAudioCaptureClient Interface"), pointer_default (unique)]
148interface IAudioCaptureClient : IUnknown {
149 HRESULT GetBuffer ([out] BYTE **ppData,[out] UINT32 *pNumFramesToRead,[out] DWORD *pdwFlags,[out, unique] UINT64 *pu64DevicePosition,[out, unique] UINT64 *pu64QPCPosition);
150 HRESULT ReleaseBuffer ([in] UINT32 NumFramesRead);
151 HRESULT GetNextPacketSize ([out] UINT32 *pNumFramesInNextPacket);
152}
153
154cpp_quote("")
155cpp_quote("#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ 0x1")
156
157cpp_quote("")
158[object, local, uuid (CD63314F-3fba-4a1b-812c-EF96358728E7), pointer_default (unique)]
159interface IAudioClock : IUnknown {
160 HRESULT GetFrequency ([out] UINT64 *pu64Frequency);
161 HRESULT GetPosition ([out] UINT64 *pu64Position,[out, unique] UINT64 *pu64QPCPosition);
162 HRESULT GetCharacteristics ([out] DWORD *pdwCharacteristics);
163};
164cpp_quote("#endif")
165
166cpp_quote("")
167cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
168[object, local, uuid (6f49ff73-6727-49ac-a008-d98cf5e70048), pointer_default (unique)]
169interface IAudioClock2 : IUnknown {
170 HRESULT GetDevicePosition ([out] UINT64 *DevicePosition,[out, unique] UINT64 *QPCPosition);
171};
172
173cpp_quote("")
174[local, uuid (f6e4c0a0-46d9-4fb8-be21-57a3ef2b626c), pointer_default (unique)]
175interface IAudioClockAdjustment : IUnknown {
176 HRESULT SetSampleRate ([in] float flSampleRate);
177};
178cpp_quote("#endif")
179
180cpp_quote("")
181cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
182[object, local, uuid (87ce5498-68d6-44e5-9215-6da47ef883d8), pointer_default (unique)]
183interface ISimpleAudioVolume : IUnknown {
184 HRESULT SetMasterVolume ([in] float fLevel,[in, unique] LPCGUID EventContext);
185 HRESULT GetMasterVolume ([out] float *pfLevel);
186 HRESULT SetMute ([in] const WINBOOL bMute,[in, unique] LPCGUID EventContext);
187 HRESULT GetMute ([out] WINBOOL *pbMute);
188}
189cpp_quote("#endif")
190cpp_quote("")
191cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
192[object, local, uuid (93014887-242d-4068-8a15-CF5E93B90FE3), pointer_default (unique)]
193interface IAudioStreamVolume : IUnknown {
194 HRESULT GetChannelCount ([out] UINT32 *pdwCount);
195 HRESULT SetChannelVolume ([in] UINT32 dwIndex,[in] const float fLevel);
196 HRESULT GetChannelVolume ([in] UINT32 dwIndex,[out] float *pfLevel);
197 HRESULT SetAllVolumes ([in] UINT32 dwCount,[in, size_is (dwCount)] const float *pfVolumes);
198 HRESULT GetAllVolumes ([in] UINT32 dwCount,[out, size_is (dwCount),] float *pfVolumes);
199}
200
201[object, local, uuid (28724c91-df35-4856-9f76-d6a26413f3df), pointer_default (unique)]
202interface IAudioAmbisonicsControl : IUnknown {
203 HRESULT SetData([in] const AMBISONICS_PARAMS *pAmbisonicsParams, [in] UINT32 cbAmbisonicsParams);
204 HRESULT SetHeadTracking([in] WINBOOL bEnableHeadTracking);
205 HRESULT GetHeadTracking([out] WINBOOL *pbEnableHeadTracking);
206 HRESULT SetRotation([in] float X, [in] float Y, [in] float Z, [in] float W);
207}
208
209cpp_quote("")
210[object, local, uuid (1c158861-B533-4b30-B1CF-E853E51C59B8), pointer_default (unique)]
211interface IChannelAudioVolume : IUnknown {
212 HRESULT GetChannelCount ([out] UINT32 *pdwCount);
213 HRESULT SetChannelVolume ([in] UINT32 dwIndex,[in] const float fLevel,[in, unique] LPCGUID EventContext);
214 HRESULT GetChannelVolume ([in] UINT32 dwIndex,[out] float *pfLevel);
215 HRESULT SetAllVolumes ([in] UINT32 dwCount,[in, size_is (dwCount)] const float *pfVolumes,[in, unique] LPCGUID EventContext);
216 HRESULT GetAllVolumes ([in] UINT32 dwCount,[out, size_is (dwCount),] float *pfVolumes);
217}
218cpp_quote("#endif")
219cpp_quote("")
220cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
221cpp_quote("#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n)")
222cpp_quote("#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n)")
223cpp_quote("")
224cpp_quote("#define AUDCLNT_E_NOT_INITIALIZED AUDCLNT_ERR(0x1)")
225cpp_quote("#define AUDCLNT_E_ALREADY_INITIALIZED AUDCLNT_ERR(0x2)")
226cpp_quote("#define AUDCLNT_E_WRONG_ENDPOINT_TYPE AUDCLNT_ERR(0x3)")
227cpp_quote("#define AUDCLNT_E_DEVICE_INVALIDATED AUDCLNT_ERR(0x4)")
228cpp_quote("#define AUDCLNT_E_NOT_STOPPED AUDCLNT_ERR(0x5)")
229cpp_quote("#define AUDCLNT_E_BUFFER_TOO_LARGE AUDCLNT_ERR(0x6)")
230cpp_quote("#define AUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(0x7)")
231cpp_quote("#define AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_ERR(0x8)")
232cpp_quote("#define AUDCLNT_E_INVALID_SIZE AUDCLNT_ERR(0x9)")
233cpp_quote("#define AUDCLNT_E_DEVICE_IN_USE AUDCLNT_ERR(0xa)")
234cpp_quote("#define AUDCLNT_E_BUFFER_OPERATION_PENDING AUDCLNT_ERR(0xb)")
235cpp_quote("#define AUDCLNT_E_THREAD_NOT_REGISTERED AUDCLNT_ERR(0xc)")
236cpp_quote("#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0xe)")
237cpp_quote("#define AUDCLNT_E_ENDPOINT_CREATE_FAILED AUDCLNT_ERR(0xf)")
238cpp_quote("#define AUDCLNT_E_SERVICE_NOT_RUNNING AUDCLNT_ERR(0x10)")
239cpp_quote("#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED AUDCLNT_ERR(0x11)")
240cpp_quote("#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY AUDCLNT_ERR(0x12)")
241cpp_quote("#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x13)")
242cpp_quote("#define AUDCLNT_E_EVENTHANDLE_NOT_SET AUDCLNT_ERR(0x14)")
243cpp_quote("#define AUDCLNT_E_INCORRECT_BUFFER_SIZE AUDCLNT_ERR(0x15)")
244cpp_quote("#define AUDCLNT_E_BUFFER_SIZE_ERROR AUDCLNT_ERR(0x16)")
245cpp_quote("#define AUDCLNT_E_CPUUSAGE_EXCEEDED AUDCLNT_ERR(0x17)")
246cpp_quote("#define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x18)")
247cpp_quote("#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x19)")
248cpp_quote("#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x20)")
249cpp_quote("#define AUDCLNT_E_INVALID_STREAM_FLAG AUDCLNT_ERR(0x21)")
250cpp_quote("#define AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE AUDCLNT_ERR(0x22)")
251cpp_quote("#define AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES AUDCLNT_ERR(0x23)")
252cpp_quote("#define AUDCLNT_E_OFFLOAD_MODE_ONLY AUDCLNT_ERR(0x24)")
253cpp_quote("#define AUDCLNT_E_NONOFFLOAD_MODE_ONLY AUDCLNT_ERR(0x25)")
254cpp_quote("#define AUDCLNT_E_RESOURCES_INVALIDATED AUDCLNT_ERR(0x26)")
255cpp_quote("#define AUDCLNT_E_RAW_MODE_UNSUPPORTED AUDCLNT_ERR(0x027)")
256cpp_quote("#define AUDCLNT_E_ENGINE_PERIODICITY_LOCKED AUDCLNT_ERR(0x028)")
257cpp_quote("#define AUDCLNT_E_ENGINE_FORMAT_LOCKED AUDCLNT_ERR(0x029)")
258cpp_quote("#define AUDCLNT_E_HEADTRACKING_ENABLED AUDCLNT_ERR(0x030)")
259cpp_quote("#define AUDCLNT_E_HEADTRACKING_UNSUPPORTED AUDCLNT_ERR(0x040)")
260cpp_quote("#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x1)")
261cpp_quote("#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x2)")
262cpp_quote("#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x3)")
263
264cpp_quote("#endif")
Note: See TracBrowser for help on using the repository browser.