d3d10/tests: Avoid implicit cast changing value.
[wine.git] / include / hrtfapoapi.idl
blob15b479d021602c5756e19e750f8abeaf1199060e
1 /*
2 * Copyright (C) 2023 Mohamad Al-Jaf
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 "xapo.idl";
21 cpp_quote("#include <float.h>")
23 cpp_quote("#define HRTF_MAX_GAIN_LIMIT 12.0f")
24 cpp_quote("#define HRTF_MIN_GAIN_LIMIT -96.0f")
25 cpp_quote("#define HRTF_MIN_UNITY_GAIN_DISTANCE 0.05f")
26 cpp_quote("#define HRTF_DEFAULT_UNITY_GAIN_DISTANCE 1.0f")
27 cpp_quote("#define HRTF_DEFAULT_CUTOFF_DISTANCE FLT_MAX")
29 typedef struct HrtfPosition
31 float x;
32 float y;
33 float z;
34 } HrtfPosition;
36 typedef struct HrtfOrientation
38 float element[9];
39 } HrtfOrientation;
41 typedef enum HrtfDirectivityType
43 OmniDirectional,
44 Cardioid,
45 Cone,
46 } HrtfDirectivityType;
48 typedef enum HrtfEnvironment
50 Small,
51 Medium,
52 Large,
53 Outdoors,
54 } HrtfEnvironment;
56 typedef struct HrtfDirectivity
58 HrtfDirectivityType type;
59 float scaling;
60 } HrtfDirectivity;
62 typedef struct HrtfDirectivityCardioid
64 HrtfDirectivity directivity;
65 float order;
66 } HrtfDirectivityCardioid;
68 typedef struct HrtfDirectivityCone
70 HrtfDirectivity directivity;
71 float innerAngle;
72 float outerAngle;
73 } HrtfDirectivityCone;
75 typedef enum HrtfDistanceDecayType
77 NaturalDecay,
78 CustomDecay,
79 } HrtfDistanceDecayType;
81 typedef struct HrtfDistanceDecay
83 HrtfDistanceDecayType type;
84 float maxGain;
85 float minGain;
86 float unityGainDistance;
87 float cutoffDistance;
88 } HrtfDistanceDecay;
90 typedef struct HrtfApoInit
92 HrtfDistanceDecay *distanceDecay;
93 HrtfDirectivity *directivity;
94 } HrtfApoInit;
96 HRESULT __stdcall CreateHrtfApo(const HrtfApoInit *init, IXAPO **xapo);
99 object,
100 uuid(15b3cd66-e9de-4464-b6e6-2bc3cf63d455)
102 interface IXAPOHrtfParameters : IUnknown
104 HRESULT SetSourcePosition(const HrtfPosition *position);
105 HRESULT SetSourceOrientation(const HrtfOrientation *orientation);
106 HRESULT SetSourceGain(float gain);
107 HRESULT SetEnvironment(HrtfEnvironment environment);