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>
28 #include "FAudio_internal.h"
30 uint32_t FAPOFX_CreateFX(
31 const FAudioGUID
*clsid
,
33 const void *pInitData
,
34 uint32_t InitDataByteSize
36 return FAPOFX_CreateFXWithCustomAllocatorEXT(
47 uint32_t FAPOFX_CreateFXWithCustomAllocatorEXT(
48 const FAudioGUID
*clsid
,
50 const void *pInitData
,
51 uint32_t InitDataByteSize
,
52 FAudioMallocFunc customMalloc
,
53 FAudioFreeFunc customFree
,
54 FAudioReallocFunc customRealloc
56 #define CHECK_AND_RETURN(effect) \
57 if (FAudio_memcmp(clsid, &FAPOFX_CLSID_FX##effect, sizeof(FAudioGUID)) == 0) \
59 return FAPOFXCreate##effect( \
69 else if (FAudio_memcmp(clsid, &FAPOFX_CLSID_FX##effect##_LEGACY, sizeof(FAudioGUID)) == 0) \
71 return FAPOFXCreate##effect( \
82 CHECK_AND_RETURN(MasteringLimiter
)
83 CHECK_AND_RETURN(Reverb
)
84 CHECK_AND_RETURN(Echo
)
85 #undef CHECK_AND_RETURN
89 /* vim: set noexpandtab shiftwidth=8 tabstop=8: */