From 55362898908ec67ce09881257c257765508e8e9a Mon Sep 17 00:00:00 2001 From: Squareys Date: Sat, 10 Oct 2015 15:22:28 +0200 Subject: [PATCH] MagnumExternal: Add OpenAL/extensions.h. Custom header for implemented OpenAL extensions defines. Signed-off-by: Squareys --- src/MagnumExternal/CMakeLists.txt | 1 + src/MagnumExternal/OpenAL/CMakeLists.txt | 27 ++++++++++ src/MagnumExternal/OpenAL/extensions.h | 65 ++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 src/MagnumExternal/OpenAL/CMakeLists.txt create mode 100644 src/MagnumExternal/OpenAL/extensions.h diff --git a/src/MagnumExternal/CMakeLists.txt b/src/MagnumExternal/CMakeLists.txt index 842b6c8d3..550c057bc 100644 --- a/src/MagnumExternal/CMakeLists.txt +++ b/src/MagnumExternal/CMakeLists.txt @@ -23,5 +23,6 @@ # DEALINGS IN THE SOFTWARE. # +add_subdirectory(OpenAL) add_subdirectory(OpenGL) add_subdirectory(Optional) diff --git a/src/MagnumExternal/OpenAL/CMakeLists.txt b/src/MagnumExternal/OpenAL/CMakeLists.txt new file mode 100644 index 000000000..2076113e4 --- /dev/null +++ b/src/MagnumExternal/OpenAL/CMakeLists.txt @@ -0,0 +1,27 @@ +# +# This file is part of Magnum. +# +# Copyright © 2010, 2011, 2012, 2013, 2014, 2015 +# Vladimír Vondruš +# Copyright © 2015 Jonathan Hale +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +install(FILES extensions.h DESTINATION ${MAGNUM_EXTERNAL_INCLUDE_INSTALL_DIR}/OpenAL) diff --git a/src/MagnumExternal/OpenAL/extensions.h b/src/MagnumExternal/OpenAL/extensions.h new file mode 100644 index 000000000..ae76748c0 --- /dev/null +++ b/src/MagnumExternal/OpenAL/extensions.h @@ -0,0 +1,65 @@ +#ifndef MagnumExternal_OpenAL_extensions_h +#define MagnumExternal_OpenAL_extensions_h +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015 + Vladimír Vondruš + Copyright © 2015 Jonathan Hale + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +/* AL_EXT_float32 */ +#ifndef AL_EXT_float32 +#define AL_EXT_float32 1 +#define AL_FORMAT_MONO_FLOAT32 0x10010 +#define AL_FORMAT_STEREO_FLOAT32 0x10011 +#endif + +/* ALC_SOFT_HRTF */ +#ifndef ALC_SOFT_HRTF +#define ALC_SOFT_HRTF 1 +#define ALC_HRTF_SOFT 0x1992 + +#define ALC_HRTF_ID_SOFT 0x1996 + +#define ALC_DONT_CARE_SOFT 0x0002 + +#define ALC_HRTF_STATUS_SOFT 0x1993 +#define ALC_NUM_HRTF_SPECIFIER_SOFT 0x1994 +#define ALC_HRTF_SPECIFIER_SOFT 0x1995 + +#define ALC_HRTF_DISABLED_SOFT 0x0000 +#define ALC_HRTF_ENABLED_SOFT 0x0001 +#define ALC_HRTF_DENIED_SOFT 0x0002 +#define ALC_HRTF_REQUIRED_SOFT 0x0003 +#define ALC_HRTF_HEADPHONES_DETECTED_SOFT 0x0004 +#define ALC_HRTF_UNSUPPORTED_FORMAT_SOFT 0x0005 +#endif + +#ifdef __cplusplus +} +#endif + +#endif