faudio: Import upstream release 24.02.
[wine.git] / libs / faudio / include / FACT3D.h
blobb40224179c2082a455da423def6451ca22bd81c4
1 /* FAudio - XAudio Reimplementation for FNA
3 * Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
5 * This software is provided 'as-is', without any express or implied warranty.
6 * In no event will the authors be held liable for any damages arising from
7 * the use of this software.
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software in a
15 * product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
21 * 3. This notice may not be removed or altered from any source distribution.
23 * Ethan "flibitijibibo" Lee <flibitijibibo@flibitijibibo.com>
27 /* This file has no documentation since you are expected to already know how
28 * XACT works if you are still using these APIs!
31 #ifndef FACT3D_H
32 #define FACT3D_H
34 #include "F3DAudio.h"
35 #include "FACT.h"
37 #ifdef __cplusplus
38 extern "C" {
39 #endif /* __cplusplus */
41 /* Constants */
43 #define LEFT_AZIMUTH (3.0f * F3DAUDIO_PI / 2.0f)
44 #define RIGHT_AZIMUTH (F3DAUDIO_PI / 2.0f)
45 #define FRONT_LEFT_AZIMUTH (7.0f * F3DAUDIO_PI / 4.0f)
46 #define FRONT_RIGHT_AZIMUTH (F3DAUDIO_PI / 4.0f)
47 #define FRONT_CENTER_AZIMUTH 0.0f
48 #define LOW_FREQUENCY_AZIMUTH F3DAUDIO_2PI
49 #define BACK_LEFT_AZIMUTH (5.0f * F3DAUDIO_PI / 4.0f)
50 #define BACK_RIGHT_AZIMUTH (3.0f * F3DAUDIO_PI / 4.0f)
51 #define BACK_CENTER_AZIMUTH F3DAUDIO_PI
52 #define FRONT_LEFT_OF_CENTER_AZIMUTH (15.0f * F3DAUDIO_PI / 8.0f)
53 #define FRONT_RIGHT_OF_CENTER_AZIMUTH (F3DAUDIO_PI / 8.0f)
55 static const float aStereoLayout[] =
57 LEFT_AZIMUTH,
58 RIGHT_AZIMUTH
60 static const float a2Point1Layout[] =
62 LEFT_AZIMUTH,
63 RIGHT_AZIMUTH,
64 LOW_FREQUENCY_AZIMUTH
66 static const float aQuadLayout[] =
68 FRONT_LEFT_AZIMUTH,
69 FRONT_RIGHT_AZIMUTH,
70 BACK_LEFT_AZIMUTH,
71 BACK_RIGHT_AZIMUTH
73 static const float a4Point1Layout[] =
75 FRONT_LEFT_AZIMUTH,
76 FRONT_RIGHT_AZIMUTH,
77 LOW_FREQUENCY_AZIMUTH,
78 BACK_LEFT_AZIMUTH,
79 BACK_RIGHT_AZIMUTH
81 static const float a5Point1Layout[] =
83 FRONT_LEFT_AZIMUTH,
84 FRONT_RIGHT_AZIMUTH,
85 FRONT_CENTER_AZIMUTH,
86 LOW_FREQUENCY_AZIMUTH,
87 BACK_LEFT_AZIMUTH,
88 BACK_RIGHT_AZIMUTH
90 static const float a7Point1Layout[] =
92 FRONT_LEFT_AZIMUTH,
93 FRONT_RIGHT_AZIMUTH,
94 FRONT_CENTER_AZIMUTH,
95 LOW_FREQUENCY_AZIMUTH,
96 BACK_LEFT_AZIMUTH,
97 BACK_RIGHT_AZIMUTH,
98 LEFT_AZIMUTH,
99 RIGHT_AZIMUTH
102 /* Functions */
104 FACTAPI uint32_t FACT3DInitialize(
105 FACTAudioEngine *pEngine,
106 F3DAUDIO_HANDLE F3DInstance
109 FACTAPI uint32_t FACT3DCalculate(
110 F3DAUDIO_HANDLE F3DInstance,
111 const F3DAUDIO_LISTENER *pListener,
112 F3DAUDIO_EMITTER *pEmitter,
113 F3DAUDIO_DSP_SETTINGS *pDSPSettings
116 FACTAPI uint32_t FACT3DApply(
117 F3DAUDIO_DSP_SETTINGS *pDSPSettings,
118 FACTCue *pCue
121 #ifdef __cplusplus
123 #endif /* __cplusplus */
125 #endif /* FACT3D_H */
127 /* vim: set noexpandtab shiftwidth=8 tabstop=8: */