mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
[OpenAL branch]
- apply Chris's latest patch. SVN r2534 (openal)
This commit is contained in:
parent
2066842dd0
commit
5603c70574
15 changed files with 4170 additions and 172 deletions
|
@ -13,6 +13,9 @@ if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." )
|
set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." )
|
||||||
endif( CMAKE_COMPILER_IS_GNUCXX )
|
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
|
||||||
|
option( NO_FMOD "Disable FMODEx sound support" )
|
||||||
|
option( NO_OPENAL "Disable OpenAL sound support" )
|
||||||
|
|
||||||
find_package( BZip2 )
|
find_package( BZip2 )
|
||||||
find_package( JPEG )
|
find_package( JPEG )
|
||||||
find_package( ZLIB )
|
find_package( ZLIB )
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
cmake_minimum_required( VERSION 2.4 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
add_library( output_sdl MODULE output_sdl.c )
|
if( NOT NO_FMOD AND FMOD_INCLUDE_DIR )
|
||||||
include_directories( ${FMOD_INCLUDE_DIR} ${SDL_INCLUDE_DIR} )
|
add_library( output_sdl MODULE output_sdl.c )
|
||||||
|
include_directories( ${FMOD_INCLUDE_DIR} ${SDL_INCLUDE_DIR} )
|
||||||
|
|
||||||
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${ZDOOM_OUTPUT_DIR}/liboutput_sdl.so ]; then ln -sf output_sdl/liboutput_sdl.so ${ZDOOM_OUTPUT_DIR}/liboutput_sdl.so; fi" )
|
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${ZDOOM_OUTPUT_DIR}/liboutput_sdl.so ]; then ln -sf output_sdl/liboutput_sdl.so ${ZDOOM_OUTPUT_DIR}/liboutput_sdl.so; fi" )
|
||||||
add_custom_command( TARGET output_sdl POST_BUILD
|
add_custom_command( TARGET output_sdl POST_BUILD
|
||||||
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
|
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
|
||||||
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )
|
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )
|
||||||
|
endif( NOT NO_FMOD AND FMOD_INCLUDE_DIR )
|
||||||
|
|
|
@ -115,6 +115,60 @@ if( WIN32 )
|
||||||
message( FATAL_ERROR "Could not find DirectX 9 libraries" )
|
message( FATAL_ERROR "Could not find DirectX 9 libraries" )
|
||||||
endif( NOT DX_LIBS_FOUND )
|
endif( NOT DX_LIBS_FOUND )
|
||||||
|
|
||||||
|
|
||||||
|
if( NOT NO_OPENAL )
|
||||||
|
SET( GST_SEARCH_PATHS
|
||||||
|
ENV GSTSDK_DIR
|
||||||
|
ENV MINGDIR
|
||||||
|
"C:/Program Files/gstreamer"
|
||||||
|
"C:/gstreamer" )
|
||||||
|
|
||||||
|
message( STATUS "Looking for glib.h" )
|
||||||
|
find_path( GLIB_INCLUDE_DIR glib.h
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES include include/glib-2.0 )
|
||||||
|
if( GLIB_INCLUDE_DIR )
|
||||||
|
message(STATUS "Looking for glib.h - found: ${GLIB_INCLUDE_DIR}")
|
||||||
|
else( GLIB_INCLUDE_DIR )
|
||||||
|
message(STATUS "Looking for glib.h - not found")
|
||||||
|
endif( GLIB_INCLUDE_DIR )
|
||||||
|
|
||||||
|
message( STATUS "Looking for gst/gst.h" )
|
||||||
|
find_path( GST_INCLUDE_DIR gst/gst.h
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES include include/gstreamer-0.10 )
|
||||||
|
if( GST_INCLUDE_DIR )
|
||||||
|
message( STATUS "Looking for gst/gst.h - found: ${GST_INCLUDE_DIR}" )
|
||||||
|
else( GST_INCLUDE_DIR )
|
||||||
|
message( STATUS "Looking for gst/gst.h - not found" )
|
||||||
|
endif( GST_INCLUDE_DIR )
|
||||||
|
|
||||||
|
message( STATUS "Looking for al.h" )
|
||||||
|
set( OPENAL_SEARCH_PATHS
|
||||||
|
ENV ALSDK_DIR
|
||||||
|
ENV MINGDIR
|
||||||
|
"C:/Program Files/OpenAL 1.1 SDK"
|
||||||
|
"C:/Program Files (x86)/OpenAL 1.1 SDK"
|
||||||
|
"E:/Programs/Dev/OpenAL"
|
||||||
|
"E:/Program Files (x86)/OpenAL 1.1 SDK" )
|
||||||
|
|
||||||
|
find_path( OPENAL_INCLUDE_DIR al.h
|
||||||
|
PATHS ${OPENAL_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES include include/AL )
|
||||||
|
if( OPENAL_INCLUDE_DIR )
|
||||||
|
message( STATUS "Looking for al.h - found: ${OPENAL_INCLUDE_DIR}" )
|
||||||
|
else( OPENAL_INCLUDE_DIR )
|
||||||
|
message( STATUS "Looking for al.h - not found" )
|
||||||
|
endif( OPENAL_INCLUDE_DIR )
|
||||||
|
|
||||||
|
if( NOT OPENAL_INCLUDE_DIR OR NOT GLIB_INCLUDE_DIR OR NOT GST_INCLUDE_DIR )
|
||||||
|
set( NO_OPENAL ON )
|
||||||
|
else( NOT OPENAL_INCLUDE_DIR OR NOT GLIB_INCLUDE_DIR OR NOT GST_INCLUDE_DIR )
|
||||||
|
include_directories( ${OPENAL_INCLUDE_DIR} ${GLIB_INCLUDE_DIR} ${GST_INCLUDE_DIR} )
|
||||||
|
endif( NOT OPENAL_INCLUDE_DIR OR NOT GLIB_INCLUDE_DIR OR NOT GST_INCLUDE_DIR )
|
||||||
|
endif( NOT NO_OPENAL )
|
||||||
|
|
||||||
|
|
||||||
set( ZDOOM_LIBS
|
set( ZDOOM_LIBS
|
||||||
wsock32
|
wsock32
|
||||||
winmm
|
winmm
|
||||||
|
@ -129,12 +183,57 @@ if( WIN32 )
|
||||||
ws2_32
|
ws2_32
|
||||||
setupapi
|
setupapi
|
||||||
oleaut32 )
|
oleaut32 )
|
||||||
|
|
||||||
|
if( NOT NO_OPENAL )
|
||||||
|
message( STATUS "Looking for GST libraries" )
|
||||||
|
find_library( OPENAL_LIBRARY NAMES OpenAL32
|
||||||
|
PATHS ${OPENAL_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY1 NAMES gstapp-0.10
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY2 NAMES gstaudio-0.10
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY3 NAMES gstreamer-0.10
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY4 NAMES gthread-2.0
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY5 NAMES gmodule-2.0
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY6 NAMES gobject-2.0
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
find_library( GST_LIBRARY7 NAMES glib-2.0
|
||||||
|
PATHS ${GST_SEARCH_PATHS}
|
||||||
|
PATH_SUFFIXES lib )
|
||||||
|
if( OPENAL_LIBRARY AND GST_LIBRARY1 AND GST_LIBRARY2 AND GST_LIBRARY3 AND GST_LIBRARY4 AND GST_LIBRARY5 AND GST_LIBRARY6 AND GST_LIBRARY7 )
|
||||||
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${OPENAL_LIBRARY}" "${GST_LIBRARY1}" "${GST_LIBRARY2}" "${GST_LIBRARY3}" "${GST_LIBRARY4}" "${GST_LIBRARY5}" "${GST_LIBRARY6}" "${GST_LIBRARY7}" )
|
||||||
|
message( STATUS "Looking for GST libraries - found" )
|
||||||
|
else( OPENAL_LIBRARY AND GST_LIBRARY1 AND GST_LIBRARY2 AND GST_LIBRARY3 AND GST_LIBRARY4 AND GST_LIBRARY5 AND GST_LIBRARY6 AND GST_LIBRARY7 )
|
||||||
|
set( NO_OPENAL ON )
|
||||||
|
message( STATUS "Looking for GST libraries - not found" )
|
||||||
|
endif( OPENAL_LIBRARY AND GST_LIBRARY1 AND GST_LIBRARY2 AND GST_LIBRARY3 AND GST_LIBRARY4 AND GST_LIBRARY5 AND GST_LIBRARY6 AND GST_LIBRARY7 )
|
||||||
|
endif( NOT NO_OPENAL )
|
||||||
else( WIN32 )
|
else( WIN32 )
|
||||||
if( APPLE )
|
if( APPLE )
|
||||||
set( FMOD_SEARCH_PATHS "/Developer/FMOD Programmers API Mac/api" )
|
set( FMOD_SEARCH_PATHS "/Developer/FMOD Programmers API Mac/api" )
|
||||||
set( FMOD_INC_PATH_SUFFIXES PATH_SUFFIXES inc )
|
set( FMOD_INC_PATH_SUFFIXES PATH_SUFFIXES inc )
|
||||||
set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib )
|
set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib )
|
||||||
set( NO_GTK ON )
|
set( NO_GTK ON )
|
||||||
|
|
||||||
|
if( NOT NO_OPENAL )
|
||||||
|
check_library_exists( gstapp-0.10 gst_app_src_set_callbacks "" HAS_GSTAPP )
|
||||||
|
check_library_exists( gstaudio-0.10 gst_audio_set_channel_positions "" HAS_GSTAUDIO )
|
||||||
|
if( HAS_GSTAPP AND HAS_GSTAUDIO )
|
||||||
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} gstapp-0.10 gst-audio-0.10 "-framework OpenAL")
|
||||||
|
else( HAS_GSTAPP AND HAS_GSTAUDIO )
|
||||||
|
set( NO_OPENAL ON )
|
||||||
|
endif( HAS_GSTAPP AND HAS_GSTAUDIO )
|
||||||
|
endif( NOT NO_OPENAL )
|
||||||
else( APPLE )
|
else( APPLE )
|
||||||
option( NO_GTK "Disable GTK+ dialogs (Not applicable to Windows)" )
|
option( NO_GTK "Disable GTK+ dialogs (Not applicable to Windows)" )
|
||||||
option( VALGRIND "Add special Valgrind sequences to self-modifying code" )
|
option( VALGRIND "Add special Valgrind sequences to self-modifying code" )
|
||||||
|
@ -160,6 +259,14 @@ else( WIN32 )
|
||||||
set( NO_GTK ON )
|
set( NO_GTK ON )
|
||||||
endif( GTK2_FOUND )
|
endif( GTK2_FOUND )
|
||||||
endif( NOT NO_GTK )
|
endif( NOT NO_GTK )
|
||||||
|
|
||||||
|
pkg_check_modules( OPENAL openal gstreamer-app-0.10>=0.10.23 gstreamer-audio-0.10 )
|
||||||
|
if( OPENAL_FOUND )
|
||||||
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} ${OPENAL_LIBRARIES} )
|
||||||
|
include_directories( ${OPENAL_INCLUDE_DIRS} )
|
||||||
|
else( OPENAL_FOUND )
|
||||||
|
set( NO_OPENAL ON )
|
||||||
|
endif( OPENAL_FOUND )
|
||||||
endif( APPLE )
|
endif( APPLE )
|
||||||
set( NASM_NAMES nasm )
|
set( NASM_NAMES nasm )
|
||||||
|
|
||||||
|
@ -182,59 +289,69 @@ else( WIN32 )
|
||||||
endif( FPU_CONTROL_DIR )
|
endif( FPU_CONTROL_DIR )
|
||||||
endif( WIN32 )
|
endif( WIN32 )
|
||||||
|
|
||||||
# Decide on the name of the FMOD library we want to use.
|
|
||||||
|
|
||||||
if( NOT FMOD_LIB_NAME AND MSVC )
|
if( NOT NO_FMOD )
|
||||||
set( FMOD_LIB_NAME fmodex${X64}_vc )
|
# Search for FMOD include files
|
||||||
endif( NOT FMOD_LIB_NAME AND MSVC )
|
if( NOT WIN32 )
|
||||||
|
find_path( FMOD_INCLUDE_DIR fmod.hpp
|
||||||
|
PATHS ${FMOD_LOCAL_INC_DIRS} )
|
||||||
|
endif( NOT WIN32 )
|
||||||
|
|
||||||
if( NOT FMOD_LIB_NAME AND BORLAND )
|
if( NOT FMOD_INCLUDE_DIR )
|
||||||
set( FMOD_LIB_NAME fmodex${X64}_bc )
|
find_path( FMOD_INCLUDE_DIR fmod.hpp
|
||||||
endif( NOT FMOD_LIB_NAME AND BORLAND )
|
PATHS ${FMOD_SEARCH_PATHS}
|
||||||
|
${FMOD_INC_PATH_SUFFIXES} )
|
||||||
|
endif( NOT FMOD_INCLUDE_DIR )
|
||||||
|
|
||||||
if( NOT FMOD_LIB_NAME )
|
if( FMOD_INCLUDE_DIR )
|
||||||
set( FMOD_LIB_NAME fmodex${X64} )
|
message( STATUS "FMOD include files found at ${FMOD_INCLUDE_DIR}" )
|
||||||
endif( NOT FMOD_LIB_NAME )
|
include_directories( "${FMOD_INCLUDE_DIR}" )
|
||||||
|
else( FMOD_INCLUDE_DIR )
|
||||||
|
message( STATUS "Could not find FMOD include files" )
|
||||||
|
set( NO_FMOD ON )
|
||||||
|
endif( FMOD_INCLUDE_DIR )
|
||||||
|
endif( NOT NO_FMOD )
|
||||||
|
|
||||||
|
if( NOT NO_FMOD )
|
||||||
|
# Decide on the name of the FMOD library we want to use.
|
||||||
|
if( NOT FMOD_LIB_NAME AND MSVC )
|
||||||
|
set( FMOD_LIB_NAME fmodex${X64}_vc )
|
||||||
|
endif( NOT FMOD_LIB_NAME AND MSVC )
|
||||||
|
|
||||||
# Search for FMOD include files
|
if( NOT FMOD_LIB_NAME AND BORLAND )
|
||||||
|
set( FMOD_LIB_NAME fmodex${X64}_bc )
|
||||||
|
endif( NOT FMOD_LIB_NAME AND BORLAND )
|
||||||
|
|
||||||
if( NOT WIN32 )
|
if( NOT FMOD_LIB_NAME )
|
||||||
find_path( FMOD_INCLUDE_DIR fmod.hpp
|
set( FMOD_LIB_NAME fmodex${X64} )
|
||||||
PATHS ${FMOD_LOCAL_INC_DIRS} )
|
endif( NOT FMOD_LIB_NAME )
|
||||||
endif( NOT WIN32 )
|
|
||||||
|
|
||||||
if( NOT FMOD_INCLUDE_DIR )
|
# Search for FMOD library
|
||||||
find_path( FMOD_INCLUDE_DIR fmod.hpp
|
if( WIN32 OR APPLE )
|
||||||
PATHS ${FMOD_SEARCH_PATHS}
|
find_library( FMOD_LIBRARY ${FMOD_LIB_NAME}
|
||||||
${FMOD_INC_PATH_SUFFIXES} )
|
PATHS ${FMOD_SEARCH_PATHS}
|
||||||
endif( NOT FMOD_INCLUDE_DIR )
|
${FMOD_LIB_PATH_SUFFIXES} )
|
||||||
|
else( WIN32 OR APPLE )
|
||||||
|
find_library( FMOD_LIBRARY
|
||||||
|
NAMES ${FMOD_VERSIONS}
|
||||||
|
PATHS ${FMOD_LOCAL_LIB_DIRS} )
|
||||||
|
endif( WIN32 OR APPLE )
|
||||||
|
|
||||||
if( FMOD_INCLUDE_DIR )
|
if( FMOD_LIBRARY )
|
||||||
message( STATUS "FMOD include files found at ${FMOD_INCLUDE_DIR}" )
|
message( STATUS "FMOD library found at ${FMOD_LIBRARY}" )
|
||||||
else( FMOD_INCLUDE_DIR )
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${FMOD_LIBRARY}" )
|
||||||
message( SEND_ERROR "Could not find FMOD include files" )
|
else( FMOD_LIBRARY )
|
||||||
endif( FMOD_INCLUDE_DIR )
|
message( STATUS "Could not find FMOD library" )
|
||||||
|
set( NO_FMOD ON )
|
||||||
|
endif( FMOD_LIBRARY )
|
||||||
# Search for FMOD library
|
endif( NOT NO_FMOD )
|
||||||
|
|
||||||
if( WIN32 OR APPLE )
|
|
||||||
find_library( FMOD_LIBRARY ${FMOD_LIB_NAME}
|
|
||||||
PATHS ${FMOD_SEARCH_PATHS}
|
|
||||||
${FMOD_LIB_PATH_SUFFIXES} )
|
|
||||||
else( WIN32 OR APPLE )
|
|
||||||
find_library( FMOD_LIBRARY
|
|
||||||
NAMES ${FMOD_VERSIONS}
|
|
||||||
PATHS ${FMOD_LOCAL_LIB_DIRS} )
|
|
||||||
endif( WIN32 OR APPLE )
|
|
||||||
|
|
||||||
if( FMOD_LIBRARY )
|
|
||||||
message( STATUS "FMOD library found at ${FMOD_LIBRARY}" )
|
|
||||||
else( FMOD_LIBRARY )
|
|
||||||
message( SEND_ERROR "Could not find FMOD library" )
|
|
||||||
endif( FMOD_LIBRARY )
|
|
||||||
|
|
||||||
|
if( NO_FMOD )
|
||||||
|
add_definitions( -DNO_FMOD=1 )
|
||||||
|
endif( NO_FMOD )
|
||||||
|
if( NO_OPENAL )
|
||||||
|
add_definitions( -DNO_OPENAL=1 )
|
||||||
|
endif( NO_OPENAL )
|
||||||
|
|
||||||
# Search for NASM
|
# Search for NASM
|
||||||
|
|
||||||
|
@ -476,8 +593,8 @@ add_custom_target( revision_check ALL
|
||||||
|
|
||||||
# Libraries ZDoom needs
|
# Libraries ZDoom needs
|
||||||
|
|
||||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${FMOD_LIBRARY}" )
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" )
|
||||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${FMOD_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" )
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" )
|
||||||
|
|
||||||
# Start defining source files for ZDoom
|
# Start defining source files for ZDoom
|
||||||
|
|
||||||
|
@ -795,6 +912,7 @@ add_executable( zdoom WIN32
|
||||||
sound/music_stream.cpp
|
sound/music_stream.cpp
|
||||||
sound/music_timidity_mididevice.cpp
|
sound/music_timidity_mididevice.cpp
|
||||||
sound/music_win_mididevice.cpp
|
sound/music_win_mididevice.cpp
|
||||||
|
sound/oalsound.cpp
|
||||||
textures/automaptexture.cpp
|
textures/automaptexture.cpp
|
||||||
textures/bitmap.cpp
|
textures/bitmap.cpp
|
||||||
textures/buildtexture.cpp
|
textures/buildtexture.cpp
|
||||||
|
|
|
@ -122,6 +122,8 @@ void M_SizeDisplay (int diff);
|
||||||
|
|
||||||
int M_StringHeight (char *string);
|
int M_StringHeight (char *string);
|
||||||
|
|
||||||
|
int BuildALDeviceList(valueenum_t **menulist);
|
||||||
|
|
||||||
EColorRange LabelColor;
|
EColorRange LabelColor;
|
||||||
EColorRange ValueColor;
|
EColorRange ValueColor;
|
||||||
EColorRange MoreColor;
|
EColorRange MoreColor;
|
||||||
|
@ -1167,9 +1169,15 @@ EXTERN_CVAR (Int, snd_samplerate)
|
||||||
EXTERN_CVAR (Bool, snd_hrtf)
|
EXTERN_CVAR (Bool, snd_hrtf)
|
||||||
EXTERN_CVAR (Bool, snd_waterreverb)
|
EXTERN_CVAR (Bool, snd_waterreverb)
|
||||||
EXTERN_CVAR (Float, snd_waterlp)
|
EXTERN_CVAR (Float, snd_waterlp)
|
||||||
|
EXTERN_CVAR (Float, snd_waterabsorption)
|
||||||
EXTERN_CVAR (Int, snd_mididevice)
|
EXTERN_CVAR (Int, snd_mididevice)
|
||||||
|
EXTERN_CVAR (String, snd_backend)
|
||||||
|
EXTERN_CVAR (String, snd_aldevice)
|
||||||
|
EXTERN_CVAR (Bool, snd_efx)
|
||||||
|
|
||||||
static void MakeSoundChanges ();
|
static void MakeSoundChanges ();
|
||||||
|
static void FMODSoundOptions ();
|
||||||
|
static void OpenALSoundOptions ();
|
||||||
static void AdvSoundOptions ();
|
static void AdvSoundOptions ();
|
||||||
static void ModReplayerOptions ();
|
static void ModReplayerOptions ();
|
||||||
|
|
||||||
|
@ -1213,7 +1221,7 @@ static value_t BufferCounts[] =
|
||||||
{ 12.f, "12" }
|
{ 12.f, "12" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static valueenum_t Outputs[] =
|
static valueenum_t FMODOutputs[] =
|
||||||
{
|
{
|
||||||
{ "Default", "Default" },
|
{ "Default", "Default" },
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
@ -1234,6 +1242,17 @@ static valueenum_t Outputs[] =
|
||||||
{ "No sound", "No sound" }
|
{ "No sound", "No sound" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static valueenum_t Backends[] =
|
||||||
|
{
|
||||||
|
#ifndef NO_FMOD
|
||||||
|
{ "fmod", "FMOD" },
|
||||||
|
#endif
|
||||||
|
#ifndef NO_OPENAL
|
||||||
|
{ "openal", "OpenAL" },
|
||||||
|
#endif
|
||||||
|
{ "null", "No sound" }
|
||||||
|
};
|
||||||
|
|
||||||
static valueenum_t OutputFormats[] =
|
static valueenum_t OutputFormats[] =
|
||||||
{
|
{
|
||||||
{ "PCM-8", "8-bit" },
|
{ "PCM-8", "8-bit" },
|
||||||
|
@ -1263,6 +1282,49 @@ static valueenum_t Resamplers[] =
|
||||||
{ "Spline", "Spline" }
|
{ "Spline", "Spline" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static menuitem_t FMODSoundItems[] =
|
||||||
|
{
|
||||||
|
{ slider, "Underwater cutoff", {&snd_waterlp}, {0.0}, {2000.0},{50.0}, {NULL} },
|
||||||
|
{ ediscrete,"Output system", {&snd_output}, {countof(FMODOutputs)}, {0.0}, {0.0}, {(value_t *)FMODOutputs} },
|
||||||
|
{ ediscrete,"Output format", {&snd_output_format}, {5.0}, {0.0}, {0.0}, {(value_t *)OutputFormats} },
|
||||||
|
{ ediscrete,"Speaker mode", {&snd_speakermode}, {8.0}, {0.0}, {0.0}, {(value_t *)SpeakerModes} },
|
||||||
|
{ ediscrete,"Resampler", {&snd_resampler}, {4.0}, {0.0}, {0.0}, {(value_t *)Resamplers} },
|
||||||
|
{ discrete, "HRTF filter", {&snd_hrtf}, {2.0}, {0.0}, {0.0}, {(value_t *)OnOff} },
|
||||||
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
|
{ discrete, "Buffer size", {&snd_buffersize}, {8.0}, {0.0}, {0.0}, {BufferSizes} },
|
||||||
|
{ discrete, "Buffer count", {&snd_buffercount}, {12.0},{0.0}, {0.0}, {BufferCounts} },
|
||||||
|
};
|
||||||
|
|
||||||
|
static menu_t FMODSoundMenu =
|
||||||
|
{
|
||||||
|
"FMOD SOUND OPTIONS",
|
||||||
|
0,
|
||||||
|
countof(FMODSoundItems),
|
||||||
|
0,
|
||||||
|
FMODSoundItems,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static valueenum_t *ALOutputs = NULL;
|
||||||
|
|
||||||
|
static menuitem_t OpenALSoundItems[] =
|
||||||
|
{
|
||||||
|
{ ediscrete, "Playback device", {&snd_aldevice}, {0.0}, {0.0},{0.0}, {(value_t *)ALOutputs} },
|
||||||
|
{ discrete, "Enable EFX", {&snd_efx}, {2.0}, {0.0},{0.0}, {(value_t *)YesNo} },
|
||||||
|
{ redtext, " ", {NULL}, {0.0}, {0.0},{0.0}, {NULL} },
|
||||||
|
{ whitetext, "Requires EFX", {NULL}, {0.0}, {0.0},{0.0}, {NULL} },
|
||||||
|
{ slider, "Underwater absorption",{&snd_waterabsorption}, {0.0}, {10.0},{0.5},{NULL} },
|
||||||
|
};
|
||||||
|
|
||||||
|
static menu_t OpenALSoundMenu =
|
||||||
|
{
|
||||||
|
"OPENAL SOUND OPTIONS",
|
||||||
|
0,
|
||||||
|
countof(OpenALSoundItems),
|
||||||
|
0,
|
||||||
|
OpenALSoundItems,
|
||||||
|
};
|
||||||
|
|
||||||
static menuitem_t SoundItems[] =
|
static menuitem_t SoundItems[] =
|
||||||
{
|
{
|
||||||
{ slider, "Sounds volume", {&snd_sfxvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
{ slider, "Sounds volume", {&snd_sfxvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
||||||
|
@ -1270,17 +1332,18 @@ static menuitem_t SoundItems[] =
|
||||||
{ discrete, "MIDI device", {&snd_mididevice}, {0.0}, {0.0}, {0.0}, {NULL} },
|
{ discrete, "MIDI device", {&snd_mididevice}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
{ discrete, "Underwater reverb", {&snd_waterreverb}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
{ discrete, "Underwater reverb", {&snd_waterreverb}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
||||||
{ slider, "Underwater cutoff", {&snd_waterlp}, {0.0}, {2000.0},{50.0}, {NULL} },
|
|
||||||
{ discrete, "Randomize pitches", {&snd_pitched}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
{ discrete, "Randomize pitches", {&snd_pitched}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
||||||
{ slider, "Sound channels", {&snd_channels}, {8.0}, {256.0}, {8.0}, {NULL} },
|
{ slider, "Sound channels", {&snd_channels}, {8.0}, {256.0}, {8.0}, {NULL} },
|
||||||
|
{ ediscrete,"Sound backend", {&snd_backend}, {countof(Backends)}, {0.0}, {0.0}, {(value_t *)Backends} },
|
||||||
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
|
#ifndef NO_FMOD
|
||||||
|
{ more, "FMOD sound options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)FMODSoundOptions} },
|
||||||
|
#endif
|
||||||
|
#ifndef NO_OPENAL
|
||||||
|
{ more, "OpenAL sound options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)OpenALSoundOptions} },
|
||||||
|
#endif
|
||||||
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
{ more, "Restart sound", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)MakeSoundChanges} },
|
{ more, "Restart sound", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)MakeSoundChanges} },
|
||||||
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
||||||
{ ediscrete,"Output system", {&snd_output}, {countof(Outputs)}, {0.0}, {0.0}, {(value_t *)Outputs} },
|
|
||||||
{ ediscrete,"Output format", {&snd_output_format}, {5.0}, {0.0}, {0.0}, {(value_t *)OutputFormats} },
|
|
||||||
{ ediscrete,"Speaker mode", {&snd_speakermode}, {8.0}, {0.0}, {0.0}, {(value_t *)SpeakerModes} },
|
|
||||||
{ ediscrete,"Resampler", {&snd_resampler}, {4.0}, {0.0}, {0.0}, {(value_t *)Resamplers} },
|
|
||||||
{ discrete, "HRTF filter", {&snd_hrtf}, {2.0}, {0.0}, {0.0}, {(value_t *)OnOff} },
|
|
||||||
|
|
||||||
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
{ more, "Advanced options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)AdvSoundOptions} },
|
{ more, "Advanced options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)AdvSoundOptions} },
|
||||||
|
@ -1309,8 +1372,6 @@ EXTERN_CVAR (Bool, opl_onechip)
|
||||||
static menuitem_t AdvSoundItems[] =
|
static menuitem_t AdvSoundItems[] =
|
||||||
{
|
{
|
||||||
{ discrete, "Sample rate", {&snd_samplerate}, {8.0}, {0.0}, {0.0}, {SampleRates} },
|
{ discrete, "Sample rate", {&snd_samplerate}, {8.0}, {0.0}, {0.0}, {SampleRates} },
|
||||||
{ discrete, "Buffer size", {&snd_buffersize}, {8.0}, {0.0}, {0.0}, {BufferSizes} },
|
|
||||||
{ discrete, "Buffer count", {&snd_buffercount}, {12.0}, {0.0}, {0.0}, {BufferCounts} },
|
|
||||||
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
{ whitetext,"OPL Synthesis", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
{ whitetext,"OPL Synthesis", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||||
{ discrete, "Only emulate one OPL chip", {&opl_onechip}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
{ discrete, "Only emulate one OPL chip", {&opl_onechip}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
||||||
|
@ -1342,7 +1403,7 @@ EXTERN_CVAR(Int, mod_autochip_scan_threshold)
|
||||||
|
|
||||||
static value_t ModReplayers[] =
|
static value_t ModReplayers[] =
|
||||||
{
|
{
|
||||||
{ 0.0, "FMOD" },
|
{ 0.0, "Sound System" },
|
||||||
{ 1.0, "foo_dumb" }
|
{ 1.0, "foo_dumb" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3380,6 +3441,36 @@ CCMD (menu_sound)
|
||||||
SoundOptions ();
|
SoundOptions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void FMODSoundOptions ()
|
||||||
|
{
|
||||||
|
M_SwitchMenu (&FMODSoundMenu);
|
||||||
|
}
|
||||||
|
|
||||||
|
CCMD (menu_fmodsound)
|
||||||
|
{
|
||||||
|
#ifndef NO_FMOD
|
||||||
|
M_StartControlPanel (true);
|
||||||
|
OptionsActive = true;
|
||||||
|
FMODSoundOptions ();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void OpenALSoundOptions ()
|
||||||
|
{
|
||||||
|
OpenALSoundItems[0].b.numvalues = BuildALDeviceList (&ALOutputs);
|
||||||
|
OpenALSoundItems[0].e.enumvalues = ALOutputs;
|
||||||
|
M_SwitchMenu (&OpenALSoundMenu);
|
||||||
|
}
|
||||||
|
|
||||||
|
CCMD (menu_openalsound)
|
||||||
|
{
|
||||||
|
#ifndef NO_OPENAL
|
||||||
|
M_StartControlPanel (true);
|
||||||
|
OptionsActive = true;
|
||||||
|
OpenALSoundOptions ();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void AdvSoundOptions ()
|
static void AdvSoundOptions ()
|
||||||
{
|
{
|
||||||
M_SwitchMenu (&AdvSoundMenu);
|
M_SwitchMenu (&AdvSoundMenu);
|
||||||
|
@ -3825,6 +3916,14 @@ CCMD (addmenukey)
|
||||||
|
|
||||||
void M_Deinit ()
|
void M_Deinit ()
|
||||||
{
|
{
|
||||||
|
if (ALOutputs)
|
||||||
|
{
|
||||||
|
for (size_t i = 0;ALOutputs[i].value;i++)
|
||||||
|
delete[] const_cast<char*>(ALOutputs[i].value);
|
||||||
|
delete[] ALOutputs;
|
||||||
|
ALOutputs = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// Free bitdepth names for the modes menu.
|
// Free bitdepth names for the modes menu.
|
||||||
for (size_t i = 0; i < countof(Depths); ++i)
|
for (size_t i = 0; i < countof(Depths); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,8 +97,7 @@ static void gdb_info(pid_t pid)
|
||||||
strcpy(respfile, "gdb-respfile-XXXXXX");
|
strcpy(respfile, "gdb-respfile-XXXXXX");
|
||||||
if((fd = mkstemp(respfile)) >= 0 && (f = fdopen(fd, "w")))
|
if((fd = mkstemp(respfile)) >= 0 && (f = fdopen(fd, "w")))
|
||||||
{
|
{
|
||||||
fprintf(f, "signal SIGCHLD\n"
|
fprintf(f, "shell echo \"\"\n"
|
||||||
"shell echo \"\"\n"
|
|
||||||
"shell echo \"* Loaded Libraries\"\n"
|
"shell echo \"* Loaded Libraries\"\n"
|
||||||
"info sharedlibrary\n"
|
"info sharedlibrary\n"
|
||||||
"shell echo \"\"\n"
|
"shell echo \"\"\n"
|
||||||
|
@ -115,36 +114,8 @@ static void gdb_info(pid_t pid)
|
||||||
"x/x $eip-3\nx/x $eip\n"
|
"x/x $eip-3\nx/x $eip\n"
|
||||||
"shell echo \"\"\n"
|
"shell echo \"\"\n"
|
||||||
"shell echo \"* Backtrace\"\n"
|
"shell echo \"* Backtrace\"\n"
|
||||||
"backtrace full\n"
|
"thread apply all backtrace full\n"
|
||||||
#if 0 /* This sorta works to print out the core, but is too slow and skips 0's.. */
|
"detach\n"
|
||||||
"shell echo \"\"\n"
|
|
||||||
"shell echo \"* Stack\"\n"
|
|
||||||
"set var $_sp = $esp\n"
|
|
||||||
"while $_sp <= $ebp - 12\n"
|
|
||||||
" printf \"%%08x: \", $_sp\n"
|
|
||||||
" set var $_i = $_sp\n"
|
|
||||||
" while $_i < $_sp + 16\n"
|
|
||||||
" printf \"%%08x \", {int} $_i\n"
|
|
||||||
" set $_i += 4\n"
|
|
||||||
" end\n"
|
|
||||||
" set var $_i = $_sp\n"
|
|
||||||
" while $_i < $_sp + 16\n"
|
|
||||||
" printf \"%%c\", {int} $_i\n"
|
|
||||||
" set ++$_i\n"
|
|
||||||
" end\n"
|
|
||||||
" set var $_sp += 16\n"
|
|
||||||
" printf \"\\n\"\n"
|
|
||||||
"end\n"
|
|
||||||
"if $_sp <= $ebp\n"
|
|
||||||
" printf \"%%08x: \", $esp\n"
|
|
||||||
" while $_sp <= $ebp\n"
|
|
||||||
" printf \"%%08x \", {int} $_i\n"
|
|
||||||
" set $_sp += 4\n"
|
|
||||||
" end\n"
|
|
||||||
" printf \"\\n\"\n"
|
|
||||||
"end\n"
|
|
||||||
#endif
|
|
||||||
"kill\n"
|
|
||||||
"quit\n");
|
"quit\n");
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
|
@ -152,8 +123,8 @@ static void gdb_info(pid_t pid)
|
||||||
snprintf(buf, sizeof(buf), "gdb --quiet --batch --command=%s --pid=%i", respfile, pid);
|
snprintf(buf, sizeof(buf), "gdb --quiet --batch --command=%s --pid=%i", respfile, pid);
|
||||||
printf("Executing: %s\n", buf);
|
printf("Executing: %s\n", buf);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
system(buf);
|
|
||||||
|
|
||||||
|
system(buf);
|
||||||
/* Clean up */
|
/* Clean up */
|
||||||
remove(respfile);
|
remove(respfile);
|
||||||
}
|
}
|
||||||
|
@ -168,6 +139,7 @@ static void gdb_info(pid_t pid)
|
||||||
printf("Could not create gdb command file\n");
|
printf("Could not create gdb command file\n");
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
kill(pid, SIGKILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -267,8 +239,8 @@ static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
||||||
/* Make sure the effective uid is the real uid */
|
/* Make sure the effective uid is the real uid */
|
||||||
if (getuid() != geteuid())
|
if (getuid() != geteuid())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s (signal %i)\ngetuid() does not match geteuid().\n", sigdesc, signum);
|
raise(signum);
|
||||||
_exit(-1);
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -325,48 +297,18 @@ static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
||||||
}
|
}
|
||||||
gdb_info(pid);
|
gdb_info(pid);
|
||||||
|
|
||||||
#if 0 /* Why won't this work? */
|
|
||||||
if(ucontext)
|
|
||||||
{
|
|
||||||
unsigned char *ptr = ucontext->uc_stack.ss_sp;
|
|
||||||
size_t len;
|
|
||||||
|
|
||||||
fprintf(f, "\n* Stack\n");
|
|
||||||
for(len = ucontext->uc_stack.ss_size/4;len > 0; len -= 4)
|
|
||||||
{
|
|
||||||
fprintf(f, "0x%08x:", (int)ptr);
|
|
||||||
for(i = 0;i < ((len < 4) ? len : 4);++i)
|
|
||||||
{
|
|
||||||
fprintf(f, " %02x%02x%02x%02x", ptr[i*4 + 0], ptr[i*4 + 1],
|
|
||||||
ptr[i*4 + 2], ptr[i*4 + 3]);
|
|
||||||
}
|
|
||||||
fputc(' ', f);
|
|
||||||
fflush(f);
|
|
||||||
for(i = 0;i < ((len < 4) ? len : 4);++i)
|
|
||||||
{
|
|
||||||
fprintf(f, "%c", *(ptr++));
|
|
||||||
fprintf(f, "%c", *(ptr++));
|
|
||||||
fprintf(f, "%c", *(ptr++));
|
|
||||||
fprintf(f, "%c", *(ptr++));
|
|
||||||
}
|
|
||||||
fputc('\n', f);
|
|
||||||
fflush(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(f != stderr)
|
if(f != stderr)
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
#if (defined __unix__)
|
#if (defined __unix__)
|
||||||
if(cc_logfile)
|
if(cc_logfile)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[512];
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"if (which gxmessage > /dev/null 2>&1);"
|
"if (which gxmessage > /dev/null 2>&1) ; then\n"
|
||||||
"then gxmessage -buttons \"Damn it:0\" -center -title \"Very Fatal Error\" -file %s;"
|
" gxmessage -buttons \"Damn it:0\" -center -title \"Very Fatal Error\" -file %s\n"
|
||||||
"elif (which xmessage > /dev/null 2>&1);"
|
"elif (which xmessage > /dev/null 2>&1) ; then\n"
|
||||||
"then xmessage -buttons \"Damn it:0\" -center -file %s -geometry 600x400;"
|
" xmessage -buttons \"Damn it:0\" -center -file %s -geometry 600x400\n"
|
||||||
"fi", cc_logfile, cc_logfile);
|
"fi", cc_logfile, cc_logfile);
|
||||||
system(buf);
|
system(buf);
|
||||||
}
|
}
|
||||||
|
@ -376,8 +318,8 @@ static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
||||||
_exit(0);
|
_exit(0);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* Wait and let the child attach gdb */
|
/* Wait indefinitely; we'll be killed when gdb is done */
|
||||||
waitpid(dbg_pid, NULL, 0);
|
while(1) usleep(1000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,12 +330,13 @@ int cc_install_handlers(int num_signals, int *signals, const char *logfile, int
|
||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
|
|
||||||
sa.sa_sigaction = crash_catcher;
|
sa.sa_sigaction = crash_catcher;
|
||||||
|
|
||||||
#if !defined(__FreeBSD__) && !defined(__APPLE__)
|
#ifdef SA_ONESHOT
|
||||||
sa.sa_flags = SA_ONESHOT | SA_NODEFER | SA_SIGINFO;
|
sa.sa_flags = SA_ONESHOT | SA_NODEFER | SA_SIGINFO;
|
||||||
#else
|
#else
|
||||||
sa.sa_flags = SA_NODEFER | SA_SIGINFO;
|
sa.sa_flags = SA_NODEFER | SA_SIGINFO;
|
||||||
#endif
|
#endif
|
||||||
|
sigemptyset(&sa.sa_mask);
|
||||||
|
|
||||||
cc_logfile = logfile;
|
cc_logfile = logfile;
|
||||||
cc_user_info = user_info;
|
cc_user_info = user_info;
|
||||||
|
|
758
src/sound/efx.h
Normal file
758
src/sound/efx.h
Normal file
|
@ -0,0 +1,758 @@
|
||||||
|
#ifndef AL_EFX_H
|
||||||
|
#define AL_EFX_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ALC_EXT_EFX_NAME "ALC_EXT_EFX"
|
||||||
|
|
||||||
|
#define ALC_EFX_MAJOR_VERSION 0x20001
|
||||||
|
#define ALC_EFX_MINOR_VERSION 0x20002
|
||||||
|
#define ALC_MAX_AUXILIARY_SENDS 0x20003
|
||||||
|
|
||||||
|
|
||||||
|
/* Listener properties. */
|
||||||
|
#define AL_METERS_PER_UNIT 0x20004
|
||||||
|
|
||||||
|
/* Source properties. */
|
||||||
|
#define AL_DIRECT_FILTER 0x20005
|
||||||
|
#define AL_AUXILIARY_SEND_FILTER 0x20006
|
||||||
|
#define AL_AIR_ABSORPTION_FACTOR 0x20007
|
||||||
|
#define AL_ROOM_ROLLOFF_FACTOR 0x20008
|
||||||
|
#define AL_CONE_OUTER_GAINHF 0x20009
|
||||||
|
#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
|
||||||
|
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
|
||||||
|
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
|
||||||
|
|
||||||
|
|
||||||
|
/* Effect properties. */
|
||||||
|
|
||||||
|
/* Reverb effect parameters */
|
||||||
|
#define AL_REVERB_DENSITY 0x0001
|
||||||
|
#define AL_REVERB_DIFFUSION 0x0002
|
||||||
|
#define AL_REVERB_GAIN 0x0003
|
||||||
|
#define AL_REVERB_GAINHF 0x0004
|
||||||
|
#define AL_REVERB_DECAY_TIME 0x0005
|
||||||
|
#define AL_REVERB_DECAY_HFRATIO 0x0006
|
||||||
|
#define AL_REVERB_REFLECTIONS_GAIN 0x0007
|
||||||
|
#define AL_REVERB_REFLECTIONS_DELAY 0x0008
|
||||||
|
#define AL_REVERB_LATE_REVERB_GAIN 0x0009
|
||||||
|
#define AL_REVERB_LATE_REVERB_DELAY 0x000A
|
||||||
|
#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B
|
||||||
|
#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C
|
||||||
|
#define AL_REVERB_DECAY_HFLIMIT 0x000D
|
||||||
|
|
||||||
|
/* EAX Reverb effect parameters */
|
||||||
|
#define AL_EAXREVERB_DENSITY 0x0001
|
||||||
|
#define AL_EAXREVERB_DIFFUSION 0x0002
|
||||||
|
#define AL_EAXREVERB_GAIN 0x0003
|
||||||
|
#define AL_EAXREVERB_GAINHF 0x0004
|
||||||
|
#define AL_EAXREVERB_GAINLF 0x0005
|
||||||
|
#define AL_EAXREVERB_DECAY_TIME 0x0006
|
||||||
|
#define AL_EAXREVERB_DECAY_HFRATIO 0x0007
|
||||||
|
#define AL_EAXREVERB_DECAY_LFRATIO 0x0008
|
||||||
|
#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009
|
||||||
|
#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A
|
||||||
|
#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B
|
||||||
|
#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C
|
||||||
|
#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D
|
||||||
|
#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E
|
||||||
|
#define AL_EAXREVERB_ECHO_TIME 0x000F
|
||||||
|
#define AL_EAXREVERB_ECHO_DEPTH 0x0010
|
||||||
|
#define AL_EAXREVERB_MODULATION_TIME 0x0011
|
||||||
|
#define AL_EAXREVERB_MODULATION_DEPTH 0x0012
|
||||||
|
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013
|
||||||
|
#define AL_EAXREVERB_HFREFERENCE 0x0014
|
||||||
|
#define AL_EAXREVERB_LFREFERENCE 0x0015
|
||||||
|
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016
|
||||||
|
#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017
|
||||||
|
|
||||||
|
/* Chorus effect parameters */
|
||||||
|
#define AL_CHORUS_WAVEFORM 0x0001
|
||||||
|
#define AL_CHORUS_PHASE 0x0002
|
||||||
|
#define AL_CHORUS_RATE 0x0003
|
||||||
|
#define AL_CHORUS_DEPTH 0x0004
|
||||||
|
#define AL_CHORUS_FEEDBACK 0x0005
|
||||||
|
#define AL_CHORUS_DELAY 0x0006
|
||||||
|
|
||||||
|
/* Distortion effect parameters */
|
||||||
|
#define AL_DISTORTION_EDGE 0x0001
|
||||||
|
#define AL_DISTORTION_GAIN 0x0002
|
||||||
|
#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003
|
||||||
|
#define AL_DISTORTION_EQCENTER 0x0004
|
||||||
|
#define AL_DISTORTION_EQBANDWIDTH 0x0005
|
||||||
|
|
||||||
|
/* Echo effect parameters */
|
||||||
|
#define AL_ECHO_DELAY 0x0001
|
||||||
|
#define AL_ECHO_LRDELAY 0x0002
|
||||||
|
#define AL_ECHO_DAMPING 0x0003
|
||||||
|
#define AL_ECHO_FEEDBACK 0x0004
|
||||||
|
#define AL_ECHO_SPREAD 0x0005
|
||||||
|
|
||||||
|
/* Flanger effect parameters */
|
||||||
|
#define AL_FLANGER_WAVEFORM 0x0001
|
||||||
|
#define AL_FLANGER_PHASE 0x0002
|
||||||
|
#define AL_FLANGER_RATE 0x0003
|
||||||
|
#define AL_FLANGER_DEPTH 0x0004
|
||||||
|
#define AL_FLANGER_FEEDBACK 0x0005
|
||||||
|
#define AL_FLANGER_DELAY 0x0006
|
||||||
|
|
||||||
|
/* Frequency shifter effect parameters */
|
||||||
|
#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001
|
||||||
|
#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002
|
||||||
|
#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003
|
||||||
|
|
||||||
|
/* Vocal morpher effect parameters */
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEA 0x0001
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEB 0x0003
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM 0x0005
|
||||||
|
#define AL_VOCAL_MORPHER_RATE 0x0006
|
||||||
|
|
||||||
|
/* Pitchshifter effect parameters */
|
||||||
|
#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001
|
||||||
|
#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002
|
||||||
|
|
||||||
|
/* Ringmodulator effect parameters */
|
||||||
|
#define AL_RING_MODULATOR_FREQUENCY 0x0001
|
||||||
|
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002
|
||||||
|
#define AL_RING_MODULATOR_WAVEFORM 0x0003
|
||||||
|
|
||||||
|
/* Autowah effect parameters */
|
||||||
|
#define AL_AUTOWAH_ATTACK_TIME 0x0001
|
||||||
|
#define AL_AUTOWAH_RELEASE_TIME 0x0002
|
||||||
|
#define AL_AUTOWAH_RESONANCE 0x0003
|
||||||
|
#define AL_AUTOWAH_PEAK_GAIN 0x0004
|
||||||
|
|
||||||
|
/* Compressor effect parameters */
|
||||||
|
#define AL_COMPRESSOR_ONOFF 0x0001
|
||||||
|
|
||||||
|
/* Equalizer effect parameters */
|
||||||
|
#define AL_EQUALIZER_LOW_GAIN 0x0001
|
||||||
|
#define AL_EQUALIZER_LOW_CUTOFF 0x0002
|
||||||
|
#define AL_EQUALIZER_MID1_GAIN 0x0003
|
||||||
|
#define AL_EQUALIZER_MID1_CENTER 0x0004
|
||||||
|
#define AL_EQUALIZER_MID1_WIDTH 0x0005
|
||||||
|
#define AL_EQUALIZER_MID2_GAIN 0x0006
|
||||||
|
#define AL_EQUALIZER_MID2_CENTER 0x0007
|
||||||
|
#define AL_EQUALIZER_MID2_WIDTH 0x0008
|
||||||
|
#define AL_EQUALIZER_HIGH_GAIN 0x0009
|
||||||
|
#define AL_EQUALIZER_HIGH_CUTOFF 0x000A
|
||||||
|
|
||||||
|
/* Effect type */
|
||||||
|
#define AL_EFFECT_FIRST_PARAMETER 0x0000
|
||||||
|
#define AL_EFFECT_LAST_PARAMETER 0x8000
|
||||||
|
#define AL_EFFECT_TYPE 0x8001
|
||||||
|
|
||||||
|
/* Effect types, used with the AL_EFFECT_TYPE property */
|
||||||
|
#define AL_EFFECT_NULL 0x0000
|
||||||
|
#define AL_EFFECT_REVERB 0x0001
|
||||||
|
#define AL_EFFECT_CHORUS 0x0002
|
||||||
|
#define AL_EFFECT_DISTORTION 0x0003
|
||||||
|
#define AL_EFFECT_ECHO 0x0004
|
||||||
|
#define AL_EFFECT_FLANGER 0x0005
|
||||||
|
#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006
|
||||||
|
#define AL_EFFECT_VOCAL_MORPHER 0x0007
|
||||||
|
#define AL_EFFECT_PITCH_SHIFTER 0x0008
|
||||||
|
#define AL_EFFECT_RING_MODULATOR 0x0009
|
||||||
|
#define AL_EFFECT_AUTOWAH 0x000A
|
||||||
|
#define AL_EFFECT_COMPRESSOR 0x000B
|
||||||
|
#define AL_EFFECT_EQUALIZER 0x000C
|
||||||
|
#define AL_EFFECT_EAXREVERB 0x8000
|
||||||
|
|
||||||
|
/* Auxiliary Effect Slot properties. */
|
||||||
|
#define AL_EFFECTSLOT_EFFECT 0x0001
|
||||||
|
#define AL_EFFECTSLOT_GAIN 0x0002
|
||||||
|
#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
|
||||||
|
|
||||||
|
/* NULL Auxiliary Slot ID to disable a source send. */
|
||||||
|
#define AL_EFFECTSLOT_NULL 0x0000
|
||||||
|
|
||||||
|
|
||||||
|
/* Filter properties. */
|
||||||
|
|
||||||
|
/* Lowpass filter parameters */
|
||||||
|
#define AL_LOWPASS_GAIN 0x0001
|
||||||
|
#define AL_LOWPASS_GAINHF 0x0002
|
||||||
|
|
||||||
|
/* Highpass filter parameters */
|
||||||
|
#define AL_HIGHPASS_GAIN 0x0001
|
||||||
|
#define AL_HIGHPASS_GAINLF 0x0002
|
||||||
|
|
||||||
|
/* Bandpass filter parameters */
|
||||||
|
#define AL_BANDPASS_GAIN 0x0001
|
||||||
|
#define AL_BANDPASS_GAINLF 0x0002
|
||||||
|
#define AL_BANDPASS_GAINHF 0x0003
|
||||||
|
|
||||||
|
/* Filter type */
|
||||||
|
#define AL_FILTER_FIRST_PARAMETER 0x0000
|
||||||
|
#define AL_FILTER_LAST_PARAMETER 0x8000
|
||||||
|
#define AL_FILTER_TYPE 0x8001
|
||||||
|
|
||||||
|
/* Filter types, used with the AL_FILTER_TYPE property */
|
||||||
|
#define AL_FILTER_NULL 0x0000
|
||||||
|
#define AL_FILTER_LOWPASS 0x0001
|
||||||
|
#define AL_FILTER_HIGHPASS 0x0002
|
||||||
|
#define AL_FILTER_BANDPASS 0x0003
|
||||||
|
|
||||||
|
|
||||||
|
/* Effect object function types. */
|
||||||
|
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
|
||||||
|
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
|
||||||
|
/* Filter object function types. */
|
||||||
|
typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, ALuint*);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat);
|
||||||
|
typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
|
||||||
|
/* Auxiliary Effect Slot object function types. */
|
||||||
|
typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*);
|
||||||
|
typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat);
|
||||||
|
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*);
|
||||||
|
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*);
|
||||||
|
|
||||||
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
|
AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects);
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
|
||||||
|
|
||||||
|
AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters);
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
|
||||||
|
|
||||||
|
AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
|
||||||
|
AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
|
||||||
|
AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue);
|
||||||
|
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Filter ranges and defaults. */
|
||||||
|
|
||||||
|
/* Lowpass filter */
|
||||||
|
#define LOWPASS_MIN_GAIN (0.0f)
|
||||||
|
#define LOWPASS_MAX_GAIN (1.0f)
|
||||||
|
#define LOWPASS_DEFAULT_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define LOWPASS_MIN_GAINHF (0.0f)
|
||||||
|
#define LOWPASS_MAX_GAINHF (1.0f)
|
||||||
|
#define LOWPASS_DEFAULT_GAINHF (1.0f)
|
||||||
|
|
||||||
|
/* Highpass filter */
|
||||||
|
#define HIGHPASS_MIN_GAIN (0.0f)
|
||||||
|
#define HIGHPASS_MAX_GAIN (1.0f)
|
||||||
|
#define HIGHPASS_DEFAULT_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define HIGHPASS_MIN_GAINLF (0.0f)
|
||||||
|
#define HIGHPASS_MAX_GAINLF (1.0f)
|
||||||
|
#define HIGHPASS_DEFAULT_GAINLF (1.0f)
|
||||||
|
|
||||||
|
/* Bandpass filter */
|
||||||
|
#define BANDPASS_MIN_GAIN (0.0f)
|
||||||
|
#define BANDPASS_MAX_GAIN (1.0f)
|
||||||
|
#define BANDPASS_DEFAULT_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define BANDPASS_MIN_GAINHF (0.0f)
|
||||||
|
#define BANDPASS_MAX_GAINHF (1.0f)
|
||||||
|
#define BANDPASS_DEFAULT_GAINHF (1.0f)
|
||||||
|
|
||||||
|
#define BANDPASS_MIN_GAINLF (0.0f)
|
||||||
|
#define BANDPASS_MAX_GAINLF (1.0f)
|
||||||
|
#define BANDPASS_DEFAULT_GAINLF (1.0f)
|
||||||
|
|
||||||
|
|
||||||
|
/* Effect parameter ranges and defaults. */
|
||||||
|
|
||||||
|
/* Standard reverb effect */
|
||||||
|
#define AL_REVERB_MIN_DENSITY (0.0f)
|
||||||
|
#define AL_REVERB_MAX_DENSITY (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DENSITY (1.0f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DIFFUSION (0.0f)
|
||||||
|
#define AL_REVERB_MAX_DIFFUSION (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DIFFUSION (1.0f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_GAIN (0.0f)
|
||||||
|
#define AL_REVERB_MAX_GAIN (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_GAIN (0.32f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_GAINHF (0.0f)
|
||||||
|
#define AL_REVERB_MAX_GAINHF (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_GAINHF (0.89f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DECAY_TIME (0.1f)
|
||||||
|
#define AL_REVERB_MAX_DECAY_TIME (20.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f)
|
||||||
|
#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f)
|
||||||
|
#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f)
|
||||||
|
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f)
|
||||||
|
#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f)
|
||||||
|
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f)
|
||||||
|
#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f)
|
||||||
|
#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f)
|
||||||
|
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f)
|
||||||
|
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||||
|
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||||
|
#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||||
|
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||||
|
|
||||||
|
/* EAX reverb effect */
|
||||||
|
#define AL_EAXREVERB_MIN_DENSITY (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_DENSITY (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DIFFUSION (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_DIFFUSION (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_GAIN (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_GAIN (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_GAIN (0.32f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_GAINHF (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_GAINHF (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_GAINLF (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_GAINLF (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f)
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f)
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f)
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f)
|
||||||
|
#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f)
|
||||||
|
#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f)
|
||||||
|
#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||||
|
#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||||
|
#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||||
|
#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||||
|
|
||||||
|
/* Chorus effect */
|
||||||
|
#define AL_CHORUS_WAVEFORM_SINUSOID (0)
|
||||||
|
#define AL_CHORUS_WAVEFORM_TRIANGLE (1)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_WAVEFORM (0)
|
||||||
|
#define AL_CHORUS_MAX_WAVEFORM (1)
|
||||||
|
#define AL_CHORUS_DEFAULT_WAVEFORM (1)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_PHASE (-180)
|
||||||
|
#define AL_CHORUS_MAX_PHASE (180)
|
||||||
|
#define AL_CHORUS_DEFAULT_PHASE (90)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_RATE (0.0f)
|
||||||
|
#define AL_CHORUS_MAX_RATE (10.0f)
|
||||||
|
#define AL_CHORUS_DEFAULT_RATE (1.1f)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_DEPTH (0.0f)
|
||||||
|
#define AL_CHORUS_MAX_DEPTH (1.0f)
|
||||||
|
#define AL_CHORUS_DEFAULT_DEPTH (0.1f)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_FEEDBACK (-1.0f)
|
||||||
|
#define AL_CHORUS_MAX_FEEDBACK (1.0f)
|
||||||
|
#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f)
|
||||||
|
|
||||||
|
#define AL_CHORUS_MIN_DELAY (0.0f)
|
||||||
|
#define AL_CHORUS_MAX_DELAY (0.016f)
|
||||||
|
#define AL_CHORUS_DEFAULT_DELAY (0.016f)
|
||||||
|
|
||||||
|
/* Distortion effect */
|
||||||
|
#define AL_DISTORTION_MIN_EDGE (0.0f)
|
||||||
|
#define AL_DISTORTION_MAX_EDGE (1.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_EDGE (0.2f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_GAIN (0.01f)
|
||||||
|
#define AL_DISTORTION_MAX_GAIN (1.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_GAIN (0.05f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f)
|
||||||
|
#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_EQCENTER (80.0f)
|
||||||
|
#define AL_DISTORTION_MAX_EQCENTER (24000.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f)
|
||||||
|
|
||||||
|
#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f)
|
||||||
|
#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f)
|
||||||
|
#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f)
|
||||||
|
|
||||||
|
/* Echo effect */
|
||||||
|
#define AL_ECHO_MIN_DELAY (0.0f)
|
||||||
|
#define AL_ECHO_MAX_DELAY (0.207f)
|
||||||
|
#define AL_ECHO_DEFAULT_DELAY (0.1f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_LRDELAY (0.0f)
|
||||||
|
#define AL_ECHO_MAX_LRDELAY (0.404f)
|
||||||
|
#define AL_ECHO_DEFAULT_LRDELAY (0.1f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_DAMPING (0.0f)
|
||||||
|
#define AL_ECHO_MAX_DAMPING (0.99f)
|
||||||
|
#define AL_ECHO_DEFAULT_DAMPING (0.5f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_FEEDBACK (0.0f)
|
||||||
|
#define AL_ECHO_MAX_FEEDBACK (1.0f)
|
||||||
|
#define AL_ECHO_DEFAULT_FEEDBACK (0.5f)
|
||||||
|
|
||||||
|
#define AL_ECHO_MIN_SPREAD (-1.0f)
|
||||||
|
#define AL_ECHO_MAX_SPREAD (1.0f)
|
||||||
|
#define AL_ECHO_DEFAULT_SPREAD (-1.0f)
|
||||||
|
|
||||||
|
/* Flanger effect */
|
||||||
|
#define AL_FLANGER_WAVEFORM_SINUSOID (0)
|
||||||
|
#define AL_FLANGER_WAVEFORM_TRIANGLE (1)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_WAVEFORM (0)
|
||||||
|
#define AL_FLANGER_MAX_WAVEFORM (1)
|
||||||
|
#define AL_FLANGER_DEFAULT_WAVEFORM (1)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_PHASE (-180)
|
||||||
|
#define AL_FLANGER_MAX_PHASE (180)
|
||||||
|
#define AL_FLANGER_DEFAULT_PHASE (0)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_RATE (0.0f)
|
||||||
|
#define AL_FLANGER_MAX_RATE (10.0f)
|
||||||
|
#define AL_FLANGER_DEFAULT_RATE (0.27f)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_DEPTH (0.0f)
|
||||||
|
#define AL_FLANGER_MAX_DEPTH (1.0f)
|
||||||
|
#define AL_FLANGER_DEFAULT_DEPTH (1.0f)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_FEEDBACK (-1.0f)
|
||||||
|
#define AL_FLANGER_MAX_FEEDBACK (1.0f)
|
||||||
|
#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f)
|
||||||
|
|
||||||
|
#define AL_FLANGER_MIN_DELAY (0.0f)
|
||||||
|
#define AL_FLANGER_MAX_DELAY (0.004f)
|
||||||
|
#define AL_FLANGER_DEFAULT_DELAY (0.002f)
|
||||||
|
|
||||||
|
/* Frequency shifter effect */
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f)
|
||||||
|
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0)
|
||||||
|
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2)
|
||||||
|
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2)
|
||||||
|
#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0)
|
||||||
|
|
||||||
|
/* Vocal morpher effect */
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_A (0)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_E (1)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_I (2)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_O (3)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_U (4)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AA (5)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AE (6)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AH (7)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_AO (8)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_EH (9)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_ER (10)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_IH (11)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_IY (12)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_UH (13)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_UW (14)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_B (15)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_D (16)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_F (17)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_G (18)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_J (19)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_K (20)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_L (21)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_M (22)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_N (23)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_P (24)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_R (25)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_S (26)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_T (27)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_V (28)
|
||||||
|
#define AL_VOCAL_MORPHER_PHONEME_Z (29)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0)
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1)
|
||||||
|
#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0)
|
||||||
|
|
||||||
|
#define AL_VOCAL_MORPHER_MIN_RATE (0.0f)
|
||||||
|
#define AL_VOCAL_MORPHER_MAX_RATE (10.0f)
|
||||||
|
#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f)
|
||||||
|
|
||||||
|
/* Pitch shifter effect */
|
||||||
|
#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12)
|
||||||
|
#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12)
|
||||||
|
#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12)
|
||||||
|
|
||||||
|
#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50)
|
||||||
|
#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50)
|
||||||
|
#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0)
|
||||||
|
|
||||||
|
/* Ring modulator effect */
|
||||||
|
#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f)
|
||||||
|
#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f)
|
||||||
|
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f)
|
||||||
|
|
||||||
|
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f)
|
||||||
|
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f)
|
||||||
|
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f)
|
||||||
|
|
||||||
|
#define AL_RING_MODULATOR_SINUSOID (0)
|
||||||
|
#define AL_RING_MODULATOR_SAWTOOTH (1)
|
||||||
|
#define AL_RING_MODULATOR_SQUARE (2)
|
||||||
|
|
||||||
|
#define AL_RING_MODULATOR_MIN_WAVEFORM (0)
|
||||||
|
#define AL_RING_MODULATOR_MAX_WAVEFORM (2)
|
||||||
|
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0)
|
||||||
|
|
||||||
|
/* Autowah effect */
|
||||||
|
#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f)
|
||||||
|
#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f)
|
||||||
|
|
||||||
|
#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f)
|
||||||
|
#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f)
|
||||||
|
|
||||||
|
#define AL_AUTOWAH_MIN_RESONANCE (2.0f)
|
||||||
|
#define AL_AUTOWAH_MAX_RESONANCE (1000.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f)
|
||||||
|
|
||||||
|
#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f)
|
||||||
|
#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f)
|
||||||
|
#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f)
|
||||||
|
|
||||||
|
/* Compressor effect */
|
||||||
|
#define AL_COMPRESSOR_MIN_ONOFF (0)
|
||||||
|
#define AL_COMPRESSOR_MAX_ONOFF (1)
|
||||||
|
#define AL_COMPRESSOR_DEFAULT_ONOFF (1)
|
||||||
|
|
||||||
|
/* Equalizer effect */
|
||||||
|
#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f)
|
||||||
|
#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f)
|
||||||
|
#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f)
|
||||||
|
|
||||||
|
#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f)
|
||||||
|
#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f)
|
||||||
|
#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f)
|
||||||
|
|
||||||
|
|
||||||
|
/* Source parameter value ranges and defaults. */
|
||||||
|
#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f)
|
||||||
|
#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f)
|
||||||
|
#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||||
|
#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||||
|
|
||||||
|
#define AL_MIN_CONE_OUTER_GAINHF (0.0f)
|
||||||
|
#define AL_MAX_CONE_OUTER_GAINHF (1.0f)
|
||||||
|
#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f)
|
||||||
|
|
||||||
|
#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE
|
||||||
|
#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
|
||||||
|
#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE
|
||||||
|
#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||||
|
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||||
|
|
||||||
|
#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE
|
||||||
|
#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/* Listener parameter value ranges and defaults. */
|
||||||
|
#define AL_MIN_METERS_PER_UNIT FLT_MIN
|
||||||
|
#define AL_MAX_METERS_PER_UNIT FLT_MAX
|
||||||
|
#define AL_DEFAULT_METERS_PER_UNIT (1.0f)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* AL_EFX_H */
|
|
@ -2,6 +2,8 @@
|
||||||
#ifndef FMOD_WRAP_H
|
#ifndef FMOD_WRAP_H
|
||||||
#define FMOD_WRAP_H
|
#define FMOD_WRAP_H
|
||||||
|
|
||||||
|
#ifndef NO_FMOD
|
||||||
|
|
||||||
#if !defined(_WIN32) || defined(_MSC_VER)
|
#if !defined(_WIN32) || defined(_MSC_VER)
|
||||||
// Use the real C++ interface if it's supported on this platform.
|
// Use the real C++ interface if it's supported on this platform.
|
||||||
#include "fmod.hpp"
|
#include "fmod.hpp"
|
||||||
|
@ -610,3 +612,4 @@ namespace FMOD
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
|
@ -75,6 +75,36 @@ extern HWND Window;
|
||||||
|
|
||||||
#define SPECTRUM_SIZE 256
|
#define SPECTRUM_SIZE 256
|
||||||
|
|
||||||
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||||
|
|
||||||
|
ReverbContainer *ForcedEnvironment;
|
||||||
|
|
||||||
|
CVAR (Int, snd_driver, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (Int, snd_buffercount, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (Bool, snd_hrtf, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (Bool, snd_waterreverb, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (String, snd_resampler, "Linear", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (String, snd_speakermode, "Auto", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (String, snd_output_format, "PCM-16", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (String, snd_midipatchset, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
CVAR (Bool, snd_profile, false, 0)
|
||||||
|
|
||||||
|
// Underwater low-pass filter cutoff frequency. Set to 0 to disable the filter.
|
||||||
|
CUSTOM_CVAR (Float, snd_waterlp, 250, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
{
|
||||||
|
// Clamp to the DSP unit's limits.
|
||||||
|
if (*self < 10 && *self != 0)
|
||||||
|
{
|
||||||
|
self = 10;
|
||||||
|
}
|
||||||
|
else if (*self > 22000)
|
||||||
|
{
|
||||||
|
self = 22000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NO_FMOD
|
||||||
|
|
||||||
// TYPES -------------------------------------------------------------------
|
// TYPES -------------------------------------------------------------------
|
||||||
|
|
||||||
struct FEnumList
|
struct FEnumList
|
||||||
|
@ -104,34 +134,6 @@ EXTERN_CVAR (Int, snd_channels)
|
||||||
|
|
||||||
extern int sfx_empty;
|
extern int sfx_empty;
|
||||||
|
|
||||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
|
||||||
|
|
||||||
ReverbContainer *ForcedEnvironment;
|
|
||||||
|
|
||||||
CVAR (Int, snd_driver, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (Int, snd_buffercount, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (Bool, snd_hrtf, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (Bool, snd_waterreverb, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (String, snd_resampler, "Linear", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (String, snd_speakermode, "Auto", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (String, snd_output_format, "PCM-16", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (String, snd_midipatchset, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
CVAR (Bool, snd_profile, false, 0)
|
|
||||||
|
|
||||||
// Underwater low-pass filter cutoff frequency. Set to 0 to disable the filter.
|
|
||||||
CUSTOM_CVAR (Float, snd_waterlp, 250, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
{
|
|
||||||
// Clamp to the DSP unit's limits.
|
|
||||||
if (*self < 10 && *self != 0)
|
|
||||||
{
|
|
||||||
self = 10;
|
|
||||||
}
|
|
||||||
else if (*self > 22000)
|
|
||||||
{
|
|
||||||
self = 22000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||||
|
|
||||||
static const ReverbContainer *PrevEnvironment;
|
static const ReverbContainer *PrevEnvironment;
|
||||||
|
@ -2900,3 +2902,5 @@ void FMODSoundRenderer::InitCreateSoundExInfo(FMOD_CREATESOUNDEXINFO *exinfo) co
|
||||||
}
|
}
|
||||||
memset((BYTE *)exinfo + sizeof(exinfo->cbsize), 0, exinfo->cbsize - sizeof(exinfo->cbsize));
|
memset((BYTE *)exinfo + sizeof(exinfo->cbsize), 0, exinfo->cbsize - sizeof(exinfo->cbsize));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // NO_FMOD
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
#define FMODSOUND_H
|
#define FMODSOUND_H
|
||||||
|
|
||||||
#include "i_sound.h"
|
#include "i_sound.h"
|
||||||
|
|
||||||
|
#ifndef NO_FMOD
|
||||||
#include "fmod_wrap.h"
|
#include "fmod_wrap.h"
|
||||||
|
|
||||||
class FMODSoundRenderer : public SoundRenderer
|
class FMODSoundRenderer : public SoundRenderer
|
||||||
|
@ -117,3 +119,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
|
@ -53,6 +53,7 @@ extern HINSTANCE g_hInst;
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "fmodsound.h"
|
#include "fmodsound.h"
|
||||||
|
#include "oalsound.h"
|
||||||
|
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
@ -77,6 +78,14 @@ CVAR (Int, snd_samplerate, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR (Int, snd_buffersize, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR (Int, snd_buffersize, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR (String, snd_output, "default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR (String, snd_output, "default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
|
#ifndef NO_FMOD
|
||||||
|
CVAR (String, snd_backend, "fmod", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
#elif !defined(NO_OPENAL)
|
||||||
|
CVAR (String, snd_backend, "openal", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
#else
|
||||||
|
CVAR (String, snd_backend, "null", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
#endif
|
||||||
|
|
||||||
// killough 2/21/98: optionally use varying pitched sounds
|
// killough 2/21/98: optionally use varying pitched sounds
|
||||||
CVAR (Bool, snd_pitched, false, CVAR_ARCHIVE)
|
CVAR (Bool, snd_pitched, false, CVAR_ARCHIVE)
|
||||||
|
|
||||||
|
@ -243,9 +252,17 @@ void I_InitSound ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSnd = new FMODSoundRenderer;
|
if(stricmp(snd_backend, "null") == 0)
|
||||||
|
GSnd = new NullSoundRenderer;
|
||||||
if (!GSnd->IsValid ())
|
#ifndef NO_FMOD
|
||||||
|
else if(stricmp(snd_backend, "fmod") == 0)
|
||||||
|
GSnd = new FMODSoundRenderer;
|
||||||
|
#endif
|
||||||
|
#ifndef NO_OPENAL
|
||||||
|
else if(stricmp(snd_backend, "openal") == 0)
|
||||||
|
GSnd = new OpenALSoundRenderer;
|
||||||
|
#endif
|
||||||
|
if (!GSnd || !GSnd->IsValid ())
|
||||||
{
|
{
|
||||||
I_CloseSound();
|
I_CloseSound();
|
||||||
GSnd = new NullSoundRenderer;
|
GSnd = new NullSoundRenderer;
|
||||||
|
|
|
@ -96,6 +96,8 @@ struct FISoundChannel
|
||||||
// callback that can't be passed a sound channel pointer
|
// callback that can't be passed a sound channel pointer
|
||||||
FRolloffInfo Rolloff;
|
FRolloffInfo Rolloff;
|
||||||
float DistanceScale;
|
float DistanceScale;
|
||||||
|
float DistanceSqr;
|
||||||
|
bool ManualGain;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ void I_BuildMIDIMenuList (struct value_t **outValues, float *numValues)
|
||||||
values[0].value = -3.0;
|
values[0].value = -3.0;
|
||||||
values[1].name = "TiMidity++";
|
values[1].name = "TiMidity++";
|
||||||
values[1].value = -2.0;
|
values[1].value = -2.0;
|
||||||
values[2].name = "FMOD";
|
values[2].name = "Sound System";
|
||||||
values[2].value = -1.0;
|
values[2].value = -1.0;
|
||||||
for (id = 0, p = 3; id < nummididevices; ++id)
|
for (id = 0, p = 3; id < nummididevices; ++id)
|
||||||
{
|
{
|
||||||
|
@ -153,7 +153,7 @@ CCMD (snd_listmididevices)
|
||||||
|
|
||||||
PrintMidiDevice (-3, "Emulated OPL FM Synth", MOD_FMSYNTH, 0);
|
PrintMidiDevice (-3, "Emulated OPL FM Synth", MOD_FMSYNTH, 0);
|
||||||
PrintMidiDevice (-2, "TiMidity++", 0, MOD_SWSYNTH);
|
PrintMidiDevice (-2, "TiMidity++", 0, MOD_SWSYNTH);
|
||||||
PrintMidiDevice (-1, "FMOD", 0, MOD_SWSYNTH);
|
PrintMidiDevice (-1, "Sound System", 0, MOD_SWSYNTH);
|
||||||
if (nummididevices != 0)
|
if (nummididevices != 0)
|
||||||
{
|
{
|
||||||
for (id = 0; id < nummididevices; ++id)
|
for (id = 0; id < nummididevices; ++id)
|
||||||
|
@ -195,7 +195,7 @@ void I_BuildMIDIMenuList (struct value_t **outValues, float *numValues)
|
||||||
values[0].value = -3.0;
|
values[0].value = -3.0;
|
||||||
values[1].name = "TiMidity++";
|
values[1].name = "TiMidity++";
|
||||||
values[1].value = -2.0;
|
values[1].value = -2.0;
|
||||||
values[2].name = "FMOD";
|
values[2].name = "Sound System";
|
||||||
values[2].value = -1.0;
|
values[2].value = -1.0;
|
||||||
*numValues = 3.f;
|
*numValues = 3.f;
|
||||||
}
|
}
|
||||||
|
@ -205,6 +205,6 @@ CCMD (snd_listmididevices)
|
||||||
{
|
{
|
||||||
Printf("%s-3. Emulated OPL FM Synth\n", -3 == snd_mididevice ? TEXTCOLOR_BOLD : "");
|
Printf("%s-3. Emulated OPL FM Synth\n", -3 == snd_mididevice ? TEXTCOLOR_BOLD : "");
|
||||||
Printf("%s-2. TiMidity++\n", -2 == snd_mididevice ? TEXTCOLOR_BOLD : "");
|
Printf("%s-2. TiMidity++\n", -2 == snd_mididevice ? TEXTCOLOR_BOLD : "");
|
||||||
Printf("%s-1. FMOD\n", -1 == snd_mididevice ? TEXTCOLOR_BOLD : "");
|
Printf("%s-1. Sound System\n", -1 == snd_mididevice ? TEXTCOLOR_BOLD : "");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
2823
src/sound/oalsound.cpp
Normal file
2823
src/sound/oalsound.cpp
Normal file
File diff suppressed because it is too large
Load diff
211
src/sound/oalsound.h
Normal file
211
src/sound/oalsound.h
Normal file
|
@ -0,0 +1,211 @@
|
||||||
|
#ifndef OALSOUND_H
|
||||||
|
#define OALSOUND_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
#include "i_sound.h"
|
||||||
|
#include "s_sound.h"
|
||||||
|
#include "m_menu.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_OPENAL
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <al.h>
|
||||||
|
#include <alc.h>
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
#include <OpenAL/al.h>
|
||||||
|
#include <OpenAL/alc.h>
|
||||||
|
#else
|
||||||
|
#include <AL/al.h>
|
||||||
|
#include <AL/alc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_ENUMERATE_ALL_EXT
|
||||||
|
#define ALC_ENUMERATE_ALL_EXT 1
|
||||||
|
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
|
||||||
|
#define ALC_ALL_DEVICES_SPECIFIER 0x1013
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ALC_EXT_disconnect
|
||||||
|
#define ALC_EXT_disconnect 1
|
||||||
|
#define ALC_CONNECTED 0x313
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_source_distance_model
|
||||||
|
#define AL_EXT_source_distance_model 1
|
||||||
|
#define AL_SOURCE_DISTANCE_MODEL 0x200
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_loop_points
|
||||||
|
#define AL_EXT_loop_points 1
|
||||||
|
#define AL_LOOP_POINTS 0x2015
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_float32
|
||||||
|
#define AL_EXT_float32 1
|
||||||
|
#define AL_FORMAT_MONO_FLOAT32 0x10010
|
||||||
|
#define AL_FORMAT_STEREO_FLOAT32 0x10011
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AL_EXT_MCFORMATS
|
||||||
|
#define AL_EXT_MCFORMATS 1
|
||||||
|
#define AL_FORMAT_QUAD8 0x1204
|
||||||
|
#define AL_FORMAT_QUAD16 0x1205
|
||||||
|
#define AL_FORMAT_QUAD32 0x1206
|
||||||
|
#define AL_FORMAT_REAR8 0x1207
|
||||||
|
#define AL_FORMAT_REAR16 0x1208
|
||||||
|
#define AL_FORMAT_REAR32 0x1209
|
||||||
|
#define AL_FORMAT_51CHN8 0x120A
|
||||||
|
#define AL_FORMAT_51CHN16 0x120B
|
||||||
|
#define AL_FORMAT_51CHN32 0x120C
|
||||||
|
#define AL_FORMAT_61CHN8 0x120D
|
||||||
|
#define AL_FORMAT_61CHN16 0x120E
|
||||||
|
#define AL_FORMAT_61CHN32 0x120F
|
||||||
|
#define AL_FORMAT_71CHN8 0x1210
|
||||||
|
#define AL_FORMAT_71CHN16 0x1211
|
||||||
|
#define AL_FORMAT_71CHN32 0x1212
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "efx.h"
|
||||||
|
|
||||||
|
|
||||||
|
class OpenALSoundStream;
|
||||||
|
|
||||||
|
class OpenALSoundRenderer : public SoundRenderer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OpenALSoundRenderer();
|
||||||
|
virtual ~OpenALSoundRenderer();
|
||||||
|
|
||||||
|
virtual void SetSfxVolume(float volume);
|
||||||
|
virtual void SetMusicVolume(float volume);
|
||||||
|
virtual SoundHandle LoadSound(BYTE *sfxdata, int length);
|
||||||
|
virtual SoundHandle LoadSoundRaw(BYTE *sfxdata, int length, int frequency, int channels, int bits, int loopstart);
|
||||||
|
virtual void UnloadSound(SoundHandle sfx);
|
||||||
|
virtual unsigned int GetMSLength(SoundHandle sfx);
|
||||||
|
virtual unsigned int GetSampleLength(SoundHandle sfx);
|
||||||
|
virtual float GetOutputRate();
|
||||||
|
|
||||||
|
// Streaming sounds.
|
||||||
|
virtual SoundStream *CreateStream(SoundStreamCallback callback, int buffbytes, int flags, int samplerate, void *userdata);
|
||||||
|
virtual SoundStream *OpenStream(const char *filename, int flags, int offset, int length);
|
||||||
|
|
||||||
|
// Starts a sound.
|
||||||
|
virtual FISoundChannel *StartSound(SoundHandle sfx, float vol, int pitch, int chanflags, FISoundChannel *reuse_chan);
|
||||||
|
virtual FISoundChannel *StartSound3D(SoundHandle sfx, SoundListener *listener, float vol, FRolloffInfo *rolloff, float distscale, int pitch, int priority, const FVector3 &pos, const FVector3 &vel, int channum, int chanflags, FISoundChannel *reuse_chan);
|
||||||
|
|
||||||
|
// Stops a sound channel.
|
||||||
|
virtual void StopChannel(FISoundChannel *chan);
|
||||||
|
|
||||||
|
// Returns position of sound on this channel, in samples.
|
||||||
|
virtual unsigned int GetPosition(FISoundChannel *chan);
|
||||||
|
|
||||||
|
// Synchronizes following sound startups.
|
||||||
|
virtual void Sync(bool sync);
|
||||||
|
|
||||||
|
// Pauses or resumes all sound effect channels.
|
||||||
|
virtual void SetSfxPaused(bool paused, int slot);
|
||||||
|
|
||||||
|
// Pauses or resumes *every* channel, including environmental reverb.
|
||||||
|
virtual void SetInactive(bool inactive);
|
||||||
|
|
||||||
|
// Updates the volume, separation, and pitch of a sound channel.
|
||||||
|
virtual void UpdateSoundParams3D(SoundListener *listener, FISoundChannel *chan, bool areasound, const FVector3 &pos, const FVector3 &vel);
|
||||||
|
|
||||||
|
virtual void UpdateListener(SoundListener *);
|
||||||
|
virtual void UpdateSounds();
|
||||||
|
|
||||||
|
virtual short *DecodeSample(int outlen, const void *coded, int sizebytes, ECodecType type);
|
||||||
|
|
||||||
|
virtual void MarkStartTime(FISoundChannel*);
|
||||||
|
virtual float GetAudibility(FISoundChannel*);
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool IsValid();
|
||||||
|
virtual void PrintStatus();
|
||||||
|
virtual void PrintDriversList();
|
||||||
|
virtual FString GatherStats();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// EFX Extension function pointer variables. Loaded after context creation
|
||||||
|
// if EFX is supported. These pointers may be context- or device-dependant,
|
||||||
|
// thus can't be static
|
||||||
|
// Effect objects
|
||||||
|
LPALGENEFFECTS alGenEffects;
|
||||||
|
LPALDELETEEFFECTS alDeleteEffects;
|
||||||
|
LPALISEFFECT alIsEffect;
|
||||||
|
LPALEFFECTI alEffecti;
|
||||||
|
LPALEFFECTIV alEffectiv;
|
||||||
|
LPALEFFECTF alEffectf;
|
||||||
|
LPALEFFECTFV alEffectfv;
|
||||||
|
LPALGETEFFECTI alGetEffecti;
|
||||||
|
LPALGETEFFECTIV alGetEffectiv;
|
||||||
|
LPALGETEFFECTF alGetEffectf;
|
||||||
|
LPALGETEFFECTFV alGetEffectfv;
|
||||||
|
// Filter objects
|
||||||
|
LPALGENFILTERS alGenFilters;
|
||||||
|
LPALDELETEFILTERS alDeleteFilters;
|
||||||
|
LPALISFILTER alIsFilter;
|
||||||
|
LPALFILTERI alFilteri;
|
||||||
|
LPALFILTERIV alFilteriv;
|
||||||
|
LPALFILTERF alFilterf;
|
||||||
|
LPALFILTERFV alFilterfv;
|
||||||
|
LPALGETFILTERI alGetFilteri;
|
||||||
|
LPALGETFILTERIV alGetFilteriv;
|
||||||
|
LPALGETFILTERF alGetFilterf;
|
||||||
|
LPALGETFILTERFV alGetFilterfv;
|
||||||
|
// Auxiliary slot objects
|
||||||
|
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
|
||||||
|
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
|
||||||
|
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
|
||||||
|
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
|
||||||
|
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
|
||||||
|
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
|
||||||
|
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
|
||||||
|
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
|
||||||
|
|
||||||
|
|
||||||
|
void LoadReverb(const ReverbContainer *env);
|
||||||
|
void PurgeStoppedSources();
|
||||||
|
static FSoundChan *FindLowestChannel();
|
||||||
|
|
||||||
|
ALCdevice *Device;
|
||||||
|
ALCcontext *Context;
|
||||||
|
|
||||||
|
bool LoopPoints;
|
||||||
|
bool SrcDistanceModel;
|
||||||
|
bool DisconnectNotify;
|
||||||
|
|
||||||
|
std::vector<ALuint> Sources;
|
||||||
|
|
||||||
|
ALfloat SfxVolume;
|
||||||
|
ALfloat MusicVolume;
|
||||||
|
|
||||||
|
int SFXPaused;
|
||||||
|
std::vector<ALuint> FreeSfx;
|
||||||
|
std::vector<ALuint> PausableSfx;
|
||||||
|
std::vector<ALuint> ReverbSfx;
|
||||||
|
std::vector<ALuint> SfxGroup;
|
||||||
|
|
||||||
|
const ReverbContainer *PrevEnvironment;
|
||||||
|
|
||||||
|
typedef std::map<WORD,ALuint> EffectMap;
|
||||||
|
ALuint EnvSlot;
|
||||||
|
EffectMap EnvEffects;
|
||||||
|
|
||||||
|
ALuint EnvFilters[2];
|
||||||
|
float LastWaterAbsorb;
|
||||||
|
|
||||||
|
std::vector<OpenALSoundStream*> Streams;
|
||||||
|
friend class OpenALSoundStream;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // NO_OPENAL
|
||||||
|
|
||||||
|
#endif
|
12
zdoom.vcproj
12
zdoom.vcproj
|
@ -5413,6 +5413,18 @@
|
||||||
RelativePath=".\src\sound\fmodsound.h"
|
RelativePath=".\src\sound\fmodsound.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\sound\oalsound.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\sound\oalsound.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\sound\efx.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="src\sound\i_music.cpp"
|
RelativePath="src\sound\i_music.cpp"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue