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
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
36 typedef struct HrtfOrientation
41 typedef enum HrtfDirectivityType
46 } HrtfDirectivityType
;
48 typedef enum HrtfEnvironment
56 typedef struct HrtfDirectivity
58 HrtfDirectivityType type
;
62 typedef struct HrtfDirectivityCardioid
64 HrtfDirectivity directivity
;
66 } HrtfDirectivityCardioid
;
68 typedef struct HrtfDirectivityCone
70 HrtfDirectivity directivity
;
73 } HrtfDirectivityCone
;
75 typedef enum HrtfDistanceDecayType
79 } HrtfDistanceDecayType
;
81 typedef struct HrtfDistanceDecay
83 HrtfDistanceDecayType type
;
86 float unityGainDistance
;
90 typedef struct HrtfApoInit
92 HrtfDistanceDecay
*distanceDecay
;
93 HrtfDirectivity
*directivity
;
96 HRESULT __stdcall CreateHrtfApo
(const HrtfApoInit
*init
, IXAPO
**xapo
);
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
);