include: Add MFTOPOLOGY_DXVA_MODE enum definition.
[wine.git] / include / spatialaudioclient.idl
blob08c8496556699cdcb22ad9c865b621f222c8246c
1 /*
2 * Copyright 2020 Nikolay Sivov for CodeWeavers
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.
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.
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
19 import "unknwn.idl";
20 import "audioclient.idl";
21 import "propsys.idl";
23 typedef [v1_enum] enum AudioObjectType
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;
46 cpp_quote("#define SPTLAUDCLNT_E_DESTROYED AUDCLNT_ERR(0x100)")
47 cpp_quote("#define SPTLAUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(0x101)")
48 cpp_quote("#define SPTLAUDCLNT_E_RESOURCES_INVALIDATED AUDCLNT_ERR(0x102)")
49 cpp_quote("#define SPTLAUDCLNT_E_NO_MORE_OBJECTS AUDCLNT_ERR(0x103)")
50 cpp_quote("#define SPTLAUDCLNT_E_PROPERTY_NOT_SUPPORTED AUDCLNT_ERR(0x104)")
51 cpp_quote("#define SPTLAUDCLNT_E_ERRORS_IN_OBJECT_CALLS AUDCLNT_ERR(0x105)")
52 cpp_quote("#define SPTLAUDCLNT_E_METADATA_FORMAT_NOT_SUPPORTED AUDCLNT_ERR(0x106)")
53 cpp_quote("#define SPTLAUDCLNT_E_STREAM_NOT_AVAILABLE AUDCLNT_ERR(0x107)")
54 cpp_quote("#define SPTLAUDCLNT_E_INVALID_LICENSE AUDCLNT_ERR(0x108)")
55 cpp_quote("#define SPTLAUDCLNT_E_STREAM_NOT_STOPPED AUDCLNT_ERR(0x10a)")
56 cpp_quote("#define SPTLAUDCLNT_E_STATIC_OBJECT_NOT_AVAILABLE AUDCLNT_ERR(0x10b)")
57 cpp_quote("#define SPTLAUDCLNT_E_OBJECT_ALREADY_ACTIVE AUDCLNT_ERR(0x10c)")
58 cpp_quote("#define SPTLAUDCLNT_E_INTERNAL AUDCLNT_ERR(0x10d)")
60 interface ISpatialAudioObjectRenderStreamBase;
63 object,
64 uuid(dddf83e6-68d7-4c70-883f-a1836afb4a50),
65 pointer_default(unique),
66 local
68 interface ISpatialAudioObjectRenderStreamNotify : IUnknown
70 HRESULT OnAvailableDynamicObjectCountChange(
71 [in] ISpatialAudioObjectRenderStreamBase *stream,
72 [in] LONGLONG deadline,
73 [in] UINT32 object_count);
76 typedef struct tagSpatialAudioObjectRenderStreamActivationParams
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;
88 object,
89 uuid(dcdaa858-895a-4a22-a5eb-67bda506096d),
90 pointer_default(unique),
91 local
93 interface IAudioFormatEnumerator : IUnknown
95 HRESULT GetCount(
96 [out] UINT32 *count);
98 HRESULT GetFormat(
99 [in] UINT32 index,
100 [out] WAVEFORMATEX **format);
104 object,
105 uuid(bbf8e066-aaaa-49be-9a4d-fd2a858ea27f),
106 pointer_default(unique),
107 local
109 interface ISpatialAudioClient : IUnknown
111 HRESULT GetStaticObjectPosition(
112 [in] AudioObjectType type,
113 [out] float *x,
114 [out] float *y,
115 [out] float *z);
117 HRESULT GetNativeStaticObjectTypeMask(
118 [out] AudioObjectType *mask);
120 HRESULT GetMaxDynamicObjectCount(
121 [out] UINT32 *value);
123 HRESULT GetSupportedAudioObjectFormatEnumerator(
124 [out] IAudioFormatEnumerator **enumerator);
126 HRESULT GetMaxFrameCount(
127 [in] WAVEFORMATEX const *format,
128 [out] UINT32 *count);
130 HRESULT IsAudioObjectFormatSupported(
131 [in] WAVEFORMATEX const *format);
133 HRESULT IsSpatialAudioStreamAvailable(
134 [in] REFIID stream_uuid,
135 [in] PROPVARIANT const *info);
137 HRESULT ActivateSpatialAudioStream(
138 [in] PROPVARIANT const *params,
139 [in] REFIID riid,
140 [out, iid_is(riid)] void **stream);
144 object,
145 uuid(cce0b8f2-8d4d-4efb-a8cf-3d6ecf1c30e0),
146 pointer_default(unique),
147 local
149 interface ISpatialAudioObjectBase : IUnknown
151 HRESULT GetBuffer(
152 [out] BYTE **buffer,
153 [out] UINT32 *bytes);
155 HRESULT SetEndOfStream(
156 [in] UINT32 frames);
158 HRESULT IsActive(
159 [out] BOOL *active);
161 HRESULT GetAudioObjectType(
162 [out] AudioObjectType *type);
166 object,
167 uuid(dde28967-521b-46e5-8f00-bd6f2bc8ab1d),
168 pointer_default(unique),
169 local
171 interface ISpatialAudioObject : ISpatialAudioObjectBase
173 HRESULT SetPosition(
174 [in] float x,
175 [in] float y,
176 [in] float z);
178 HRESULT SetVolume(
179 [in] float vol);
183 object,
184 uuid(feaaf403-c1d8-450d-aa05-e0ccee7502a8),
185 pointer_default(unique),
186 local
188 interface ISpatialAudioObjectRenderStreamBase : IUnknown
190 HRESULT GetAvailableDynamicObjectCount(
191 [out] UINT32 *count);
193 HRESULT GetService(
194 [in] REFIID riid,
195 [out] void **service);
197 HRESULT Start();
199 HRESULT Stop();
201 HRESULT Reset();
203 HRESULT BeginUpdatingAudioObjects(
204 [out] UINT32 *count,
205 [out] UINT32 *frames);
207 HRESULT EndUpdatingAudioObjects();
211 object,
212 uuid(bab5f473-b423-477b-85f5-b5a332a04153),
213 pointer_default(unique),
214 local
216 interface ISpatialAudioObjectRenderStream : ISpatialAudioObjectRenderStreamBase
218 HRESULT ActivateSpatialAudioObject(
219 [in] AudioObjectType type,
220 [out] ISpatialAudioObject **object);