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!
39 #endif /* __cplusplus */
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
[] =
60 static const float a2Point1Layout
[] =
66 static const float aQuadLayout
[] =
73 static const float a4Point1Layout
[] =
77 LOW_FREQUENCY_AZIMUTH
,
81 static const float a5Point1Layout
[] =
86 LOW_FREQUENCY_AZIMUTH
,
90 static const float a7Point1Layout
[] =
95 LOW_FREQUENCY_AZIMUTH
,
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
,
123 #endif /* __cplusplus */
125 #endif /* FACT3D_H */
127 /* vim: set noexpandtab shiftwidth=8 tabstop=8: */