source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/spatialaudioclient.idl@ 1170

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

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

File size: 6.4 KB
Line 
1/*
2 * Copyright 2020 Nikolay Sivov for CodeWeavers
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
19import "unknwn.idl";
20import "audioclient.idl";
21import "propsys.idl";
22
23typedef [v1_enum] enum AudioObjectType
24{
25 AudioObjectType_None = 0,
26 AudioObjectType_Dynamic = 0x00000001,
27 AudioObjectType_FrontLeft = 0x00000002,
28 AudioObjectType_FrontRight = 0x00000004,
29 AudioObjectType_FrontCenter = 0x00000008,
30 AudioObjectType_LowFrequency = 0x00000010,
31 AudioObjectType_SideLeft = 0x00000020,
32 AudioObjectType_SideRight = 0x00000040,
33 AudioObjectType_BackLeft = 0x00000080,
34 AudioObjectType_BackRight = 0x00000100,
35 AudioObjectType_TopFrontLeft = 0x00000200,
36 AudioObjectType_TopFrontRight = 0x00000400,
37 AudioObjectType_TopBackLeft = 0x00000800,
38 AudioObjectType_TopBackRight = 0x00001000,
39 AudioObjectType_BottomFrontLeft = 0x00002000,
40 AudioObjectType_BottomFrontRight = 0x00004000,
41 AudioObjectType_BottomBackLeft = 0x00008000,
42 AudioObjectType_BottomBackRight = 0x00010000,
43 AudioObjectType_BackCenter = 0x00020000,
44} AudioObjectType;
45
46cpp_quote("#define SPTLAUDCLNT_E_DESTROYED AUDCLNT_ERR(0x100)")
47cpp_quote("#define SPTLAUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(0x101)")
48cpp_quote("#define SPTLAUDCLNT_E_RESOURCES_INVALIDATED AUDCLNT_ERR(0x102)")
49cpp_quote("#define SPTLAUDCLNT_E_NO_MORE_OBJECTS AUDCLNT_ERR(0x103)")
50cpp_quote("#define SPTLAUDCLNT_E_PROPERTY_NOT_SUPPORTED AUDCLNT_ERR(0x104)")
51cpp_quote("#define SPTLAUDCLNT_E_ERRORS_IN_OBJECT_CALLS AUDCLNT_ERR(0x105)")
52cpp_quote("#define SPTLAUDCLNT_E_METADATA_FORMAT_NOT_SUPPORTED AUDCLNT_ERR(0x106)")
53cpp_quote("#define SPTLAUDCLNT_E_STREAM_NOT_AVAILABLE AUDCLNT_ERR(0x107)")
54cpp_quote("#define SPTLAUDCLNT_E_INVALID_LICENSE AUDCLNT_ERR(0x108)")
55cpp_quote("#define SPTLAUDCLNT_E_STREAM_NOT_STOPPED AUDCLNT_ERR(0x10a)")
56cpp_quote("#define SPTLAUDCLNT_E_STATIC_OBJECT_NOT_AVAILABLE AUDCLNT_ERR(0x10b)")
57cpp_quote("#define SPTLAUDCLNT_E_OBJECT_ALREADY_ACTIVE AUDCLNT_ERR(0x10c)")
58cpp_quote("#define SPTLAUDCLNT_E_INTERNAL AUDCLNT_ERR(0x10d)")
59
60interface ISpatialAudioObjectRenderStreamBase;
61
62[
63 object,
64 uuid(dddf83e6-68d7-4c70-883f-a1836afb4a50),
65 pointer_default(unique),
66 local
67]
68interface ISpatialAudioObjectRenderStreamNotify : IUnknown
69{
70 HRESULT OnAvailableDynamicObjectCountChange(
71 [in] ISpatialAudioObjectRenderStreamBase *stream,
72 [in] LONGLONG deadline,
73 [in] UINT32 object_count);
74}
75
76typedef struct tagSpatialAudioObjectRenderStreamActivationParams
77{
78 const WAVEFORMATEX *ObjectFormat;
79 AudioObjectType StaticObjectTypeMask;
80 UINT32 MinDynamicObjectCount;
81 UINT32 MaxDynamicObjectCount;
82 AUDIO_STREAM_CATEGORY Category;
83 HANDLE EventHandle;
84 ISpatialAudioObjectRenderStreamNotify *NotifyObject;
85} SpatialAudioObjectRenderStreamActivationParams;
86
87[
88 object,
89 uuid(dcdaa858-895a-4a22-a5eb-67bda506096d),
90 pointer_default(unique),
91 local
92]
93interface IAudioFormatEnumerator : IUnknown
94{
95 HRESULT GetCount(
96 [out] UINT32 *count);
97
98 HRESULT GetFormat(
99 [in] UINT32 index,
100 [out] WAVEFORMATEX **format);
101}
102
103[
104 object,
105 uuid(bbf8e066-aaaa-49be-9a4d-fd2a858ea27f),
106 pointer_default(unique),
107 local
108]
109interface ISpatialAudioClient : IUnknown
110{
111 HRESULT GetStaticObjectPosition(
112 [in] AudioObjectType type,
113 [out] float *x,
114 [out] float *y,
115 [out] float *z);
116
117 HRESULT GetNativeStaticObjectTypeMask(
118 [out] AudioObjectType *mask);
119
120 HRESULT GetMaxDynamicObjectCount(
121 [out] UINT32 *value);
122
123 HRESULT GetSupportedAudioObjectFormatEnumerator(
124 [out] IAudioFormatEnumerator **enumerator);
125
126 HRESULT GetMaxFrameCount(
127 [in] WAVEFORMATEX const *format,
128 [out] UINT32 *count);
129
130 HRESULT IsAudioObjectFormatSupported(
131 [in] WAVEFORMATEX const *format);
132
133 HRESULT IsSpatialAudioStreamAvailable(
134 [in] REFIID stream_uuid,
135 [in] PROPVARIANT const *info);
136
137 HRESULT ActivateSpatialAudioStream(
138 [in] PROPVARIANT const *params,
139 [in] REFIID riid,
140 [out, iid_is(riid)] void **stream);
141}
142
143[
144 object,
145 uuid(cce0b8f2-8d4d-4efb-a8cf-3d6ecf1c30e0),
146 pointer_default(unique),
147 local
148]
149interface ISpatialAudioObjectBase : IUnknown
150{
151 HRESULT GetBuffer(
152 [out] BYTE **buffer,
153 [out] UINT32 *bytes);
154
155 HRESULT SetEndOfStream(
156 [in] UINT32 frames);
157
158 HRESULT IsActive(
159 [out] BOOL *active);
160
161 HRESULT GetAudioObjectType(
162 [out] AudioObjectType *type);
163}
164
165[
166 object,
167 uuid(dde28967-521b-46e5-8f00-bd6f2bc8ab1d),
168 pointer_default(unique),
169 local
170]
171interface ISpatialAudioObject : ISpatialAudioObjectBase
172{
173 HRESULT SetPosition(
174 [in] float x,
175 [in] float y,
176 [in] float z);
177
178 HRESULT SetVolume(
179 [in] float vol);
180}
181
182[
183 object,
184 uuid(feaaf403-c1d8-450d-aa05-e0ccee7502a8),
185 pointer_default(unique),
186 local
187]
188interface ISpatialAudioObjectRenderStreamBase : IUnknown
189{
190 HRESULT GetAvailableDynamicObjectCount(
191 [out] UINT32 *count);
192
193 HRESULT GetService(
194 [in] REFIID riid,
195 [out] void **service);
196
197 HRESULT Start();
198
199 HRESULT Stop();
200
201 HRESULT Reset();
202
203 HRESULT BeginUpdatingAudioObjects(
204 [out] UINT32 *count,
205 [out] UINT32 *frames);
206
207 HRESULT EndUpdatingAudioObjects();
208}
209
210[
211 object,
212 uuid(bab5f473-b423-477b-85f5-b5a332a04153),
213 pointer_default(unique),
214 local
215]
216interface ISpatialAudioObjectRenderStream : ISpatialAudioObjectRenderStreamBase
217{
218 HRESULT ActivateSpatialAudioObject(
219 [in] AudioObjectType type,
220 [out] ISpatialAudioObject **object);
221}
Note: See TracBrowser for help on using the repository browser.