diff --git a/README.md b/README.md index c00ee5d..07ba845 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ - ## TODO + - Replace OpenAL with Soloud - Store Materials in new format supported by parser - Add model description file which has the same syntax supported by parser and modify old blender exporter to conform to new standards - Implement sound/listener loading from scene file diff --git a/build/genie.lua b/build/genie.lua index 169f99c..cc99fe5 100644 --- a/build/genie.lua +++ b/build/genie.lua @@ -19,13 +19,17 @@ solution "Symmetry" configuration {"windows", "vs2017 or qbs"} - includedirs {"../third_party/windows/SDL2-2.0.5/include/", "../third_party/windows/OpenAL/include/"} - - local sdl_lib_dir = "../third_party/windows/SDL2-2.0.5/lib/x64/" - local openal_lib_dir = "../third_party/windows/OpenAL/lib/" - - defines {"_CRT_SECURE_NO_WARNINGS"} - flags {"NoIncrementalLink", "NoEditAndContinue"} + includedirs + { + "../third_party/windows/SDL2-2.0.5/include/", + "../third_party/windows/Soloud/include/" + } + + local sdl_lib_dir = "../third_party/windows/SDL2-2.0.5/lib/x64/" + local soloud_lib_dir = "../third_party/windows/Soloud/lib/" + + defines {"_CRT_SECURE_NO_WARNINGS"} + flags {"NoIncrementalLink", "NoEditAndContinue"} configuration "Debug" if (_ACTION ~= nil and _ACTION ~= "postbuild_copy") then @@ -52,20 +56,38 @@ solution "Symmetry" language "C" files { "../src/common/**.c", "../src/common/**.h", "../src/game/**.c", "../src/game/**.h" } defines {"GAME"} - + local soloud_lib_name = + + configuration "Debug" + links {"soloud_x64_d"} + + configuration "Release" + links {"soloud_x64"} + configuration "linux" - buildoptions {"`pkg-config --cflags-only-other sdl2 openal`"} - linkoptions {"`pkg-config --libs sdl2 openal`"} + buildoptions {"`pkg-config --cflags-only-other sdl2`"} + linkoptions {"`pkg-config --libs sdl2`"} links {"m"} configuration {"windows", "gmake"} - buildoptions {"`pkg-config --cflags-only-I sdl2 openal`"} - linkoptions {"`pkg-config --libs sdl2 openal`"} + buildoptions {"`pkg-config --cflags-only-I sdl2`"} + linkoptions {"`pkg-config --libs sdl2`"} links {"m"} configuration {"windows", "vs2017 or qbs"} - libdirs { sdl_lib_dir, openal_lib_dir } - links {"SDL2", "OpenAL32"} + libdirs { sdl_lib_dir, soloud_lib_dir } + links {"SDL2"} + + + + configuration {"windows", "Release", "vs2017"} + postbuildcommands { + "xcopy ..\\..\\assets ..\\..\\bin\\assets /s /e /h /i /y /d", + "copy release\\Symmetry.exe ..\\..\\bin\\ /Y", + "copy release\\libSymmetry.dll ..\\..\\bin\\ /Y", + "copy release\\SDL2.dll ..\\..\\bin\\ /Y", + "copy release\\soloud_x64.dll ..\\..\\bin\\ /Y", + } newaction { trigger = "postbuild_copy", @@ -87,8 +109,9 @@ solution "Symmetry" local success = false success = os.copyfile(sdl_lib_dir .. "SDL2.dll", copy_dest_dir .. "/debug/SDL2.dll") success = os.copyfile(sdl_lib_dir .. "SDL2.dll", copy_dest_dir .. "/release/SDL2.dll") - success = os.copyfile("../third_party/windows/OpenAL/bin/OpenAL32.dll", copy_dest_dir .. "/debug/OpenAL32.dll") - success = os.copyfile("../third_party/windows/OpenAL/bin/OpenAL32.dll", copy_dest_dir .. "/release/OpenAL32.dll") + success = os.copyfile(soloud_lib_dir .. "soloud_x64_d.dll", copy_dest_dir .. "/debug/soloud_x64_d.dll") + success = os.copyfile(soloud_lib_dir .. "soloud_x64.dll", copy_dest_dir .. "/release/soloud_x64.dll") + if success ~= true then printf("Copying one or more dlls failed.") @@ -125,11 +148,14 @@ solution "Symmetry" defines {"GAME_LIB"} files { "../src/common/**.c", "../src/common/**.h", "../src/libsymmetry/**.h", "../src/libsymmetry/**.c" } - configuration {"windows or linux", "gmake"} - buildoptions {"`pkg-config --cflags-only-I sdl2`"} + -- configuration {"windows or linux", "gmake"} + --buildoptions {"`pkg-config --cflags-only-I sdl2`"} configuration "windows" targetname "libSymmetry" + + configuration {"windows", "vs2017"} + flags "NoImportLib" configuration "Debug" - defines {"GL_DEBUG_CONTEXT", "AL_DEBUG"} + defines {"GL_DEBUG_CONTEXT"} \ No newline at end of file diff --git a/src/common/common.h b/src/common/common.h index a4a9b86..8a8acbe 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -26,29 +26,29 @@ typedef void (*Textinput_Event_Func) (const char* text); enum Directory_Type { - DIRT_USER, /* User directory or preferences directory */ - DIRT_INSTALL, /* Directory where the game's assets are, usually alongside the game's executable where the game is installed */ - DIRT_EXECUTABLE, /* Directory where the game's executable is located */ + DIRT_USER, /* User directory or preferences directory */ + DIRT_INSTALL, /* Directory where the game's assets are, usually alongside the game's executable where the game is installed */ + DIRT_EXECUTABLE, /* Directory where the game's executable is located */ DIRT_COUNT }; +enum Sound_Source_Type +{ + ST_WAV = 0, + ST_WAV_STREAM +}; + struct Sound_Api { void (*volume_set)(float volume); void (*listener_update)(float apos_x, float apos_y, float apos_z, float afwd_x, float afwd_y, float afwd_z, float aup_x, float aup_y, float aup_z); - void (*source_update)(uint source_handle, - float apos_x, float apos_y, float apos_z, - float afwd_x, float afwd_y, float afwd_z, - float aup_x, float aup_y, float aup_z); - void (*source_create)(bool relative, uint num_buffers, uint* out_handle, uint* out_buffer_handles); - void (*source_destroy)(uint source_handle, uint* attached_buffers, uint num_buffers); + void (*source_update)(uint source_handle, float apos_x, float apos_y, float apos_z); + uint (*source_create)(bool relative, const char* filename, int type); + void (*source_destroy)(uint source_handle); void (*source_volume_set)(uint source_handle, float volume); - void (*source_pitch_set)(uint source_handle, float pitch); - void (*source_load_wav)(uint source_handle, uint buffer_handle, const char* file_name); void (*source_loop_set)(uint source_handle, bool loop); - void (*source_relative_set)(uint source_handle, bool relative); void (*source_play)(uint source_handle); void (*source_pause)(uint source_handle); void (*source_rewind)(uint source_handle); diff --git a/src/game/main.c b/src/game/main.c index d72d599..81ee03d 100644 --- a/src/game/main.c +++ b/src/game/main.c @@ -70,10 +70,7 @@ int main(int argc, char** args) .source_create = &sound_source_create, .source_destroy = &sound_source_destroy, .source_volume_set = &sound_source_volume_set, - .source_pitch_set = &sound_source_pitch_set, - .source_load_wav = &sound_source_load_wav, .source_loop_set = &sound_source_loop_set, - .source_relative_set = &sound_source_relative_set, .source_play = &sound_source_play, .source_pause = &sound_source_pause, .source_rewind = &sound_source_rewind, diff --git a/src/game/sound.c b/src/game/sound.c index f2c66f8..21d48c3 100644 --- a/src/game/sound.c +++ b/src/game/sound.c @@ -1,256 +1,223 @@ #include "sound.h" #include "../common/log.h" #include "../common/array.h" +#include "../common/hashmap.h" +#include "../common/variant.h" #include "../common/string_utils.h" #include "file_io.h" #include #include -#include -#include -#include -//#if defined(_MSC_VER) -// #include -//#else -// #include -//#endif -#include +#include + +struct Sound_Buffer +{ + int type; + union + { + Wav* wav; + WavStream* wavstream; + }; +}; struct Sound_State { - ALCdevice* device; - ALCcontext* context; - float volume; + Soloud* soloud_context; + float volume; }; static struct Sound_State sound_state = { - .device = NULL, - .context = NULL, - .volume = 0.f + .soloud_context = NULL, + .volume = 1.f }; +static struct Hashmap* sound_buffers = NULL; + bool sound_init(void) { - bool success = false; - sound_state.device = alcOpenDevice(NULL); - if(!sound_state.device) - { - log_error("sound:init", "Failed to open a sound sound_state.device"); - return success; - } + sound_buffers = hashmap_new(); - sound_state.context = alcCreateContext(sound_state.device, NULL); - if(sound_state.context == NULL || alcMakeContextCurrent(sound_state.context) == ALC_FALSE) - { - if(!sound_state.context) alcDestroyContext(sound_state.context); - alcCloseDevice(sound_state.device); - log_error("sound:init", "Could not set sound context"); - return success; - } - log_message("Opened %s", alcGetString(sound_state.device, ALC_DEVICE_SPECIFIER)); - - /* Set default listener values */ - sound_state.volume = 1.f; - float orientation[] = - { - 0.f, 0.f, -1.f, /* Direction, towards negative z axis */ - 0.f, 1.f, 0.f /* Up vector */ - }; - al_check(alListenerf(AL_GAIN, sound_state.volume)) - al_check(alListener3f(AL_POSITION, 0.f, 0.f, 0.f)) - al_check(alListenerfv(AL_ORIENTATION, orientation)) - - success = true; - return success; + sound_state.soloud_context = Soloud_create(); + + if(!sound_state.soloud_context) + { + log_error("sound:init", "Failed to create sound context"); + return false; + } + + Soloud_initEx(sound_state.soloud_context, SOLOUD_CLIP_ROUNDOFF | SOLOUD_ENABLE_VISUALIZATION, SOLOUD_AUTO, SOLOUD_AUTO, SOLOUD_AUTO, SOLOUD_AUTO); + Soloud_setGlobalVolume(sound_state.soloud_context, 4); + + Soloud_set3dListenerParameters(sound_state.soloud_context, + 0.f, 0.f, 0.f, // Position + 0.f, 0.f, -1.f, // At + 0.f, 1.f, 0.f); // Up + + Soloud_update3dAudio(sound_state.soloud_context); + + log_message("Sound initialized with %s", Soloud_getBackendString(sound_state.soloud_context)); + return true; } void sound_listener_update(float apos_x, float apos_y, float apos_z, float afwd_x, float afwd_y, float afwd_z, float aup_x, float aup_y, float aup_z) { - float orientation[] = - { - afwd_x, afwd_y, afwd_z, - aup_x, aup_y, aup_z - }; - al_check(alListener3f(AL_POSITION, apos_x, apos_y, apos_z)) - al_check(alListenerfv(AL_ORIENTATION, orientation)) + Soloud_set3dListenerParameters(sound_state.soloud_context, + apos_x, apos_y, apos_z, // Position + afwd_x, afwd_y, afwd_z, // At + aup_x, aup_y, aup_z); // Up + Soloud_update3dAudio(sound_state.soloud_context); } void sound_volume_set(float volume) { if(volume < 0.f) volume = 0.f; - al_check(alListenerf(AL_GAIN, volume)) + sound_state.volume = volume; + Soloud_setGlobalVolume(sound_state.soloud_context, sound_state.volume); } -void sound_source_destroy(uint source_handle, uint* attached_buffers, uint num_buffers) +void sound_cleanup(void) { - for(int i = 0; i < (int)num_buffers; i++) - { - if(alIsBuffer(attached_buffers[i]) == AL_TRUE) - { - al_check(alSourcei(source_handle, AL_BUFFER, i)) - al_check(alDeleteBuffers(1, &attached_buffers[i])) - } - } - if(alIsSource(source_handle) == AL_TRUE) al_check(alDeleteSources(1, &source_handle)) -} + char* key = NULL; + struct Variant* value = NULL; + HASHMAP_FOREACH(sound_buffers, key, value) + { + struct Sound_Buffer* buffer = value->val_voidptr; + switch(buffer->type) + { + case ST_WAV: Wav_destroy(buffer->wav); break; + case ST_WAV_STREAM: WavStream_destroy(buffer->wavstream); break; + } + } + + hashmap_free(sound_buffers); + Soloud_deinit(sound_state.soloud_context); + Soloud_destroy(sound_state.soloud_context); -void sound_cleanup(void) -{ - alcMakeContextCurrent(NULL); - alcDestroyContext(sound_state.context); - alcCloseDevice(sound_state.device); - sound_state.context = NULL; - sound_state.device = NULL; sound_state.volume = 0.f; + sound_state.soloud_context = NULL; } -void sound_error_check(const char* file, unsigned int line, const char* expression) +uint sound_source_create(bool relative, const char* filename, int type) { - ALenum error_code = alGetError(); - const char* error_string = "No Error String"; - if(error_code != AL_NO_ERROR) + uint handle = 0; + struct Sound_Buffer* buffer = NULL; + + long size = 0L; + char* memory = io_file_read(DIRT_INSTALL, filename, "rb", &size); + + //See if we've already loaded this file + if(hashmap_value_exists(sound_buffers, filename)) { - switch(error_code) + buffer = (struct Sound_Buffer*)hashmap_ptr_get(sound_buffers, filename); + if(relative) { - case AL_INVALID_NAME: error_string = "AL_INVALID_NAME, Invalid name(ID) specified"; break; - case AL_INVALID_ENUM: error_string = "AL_INVALID_ENUM, Invalid enum specified"; break; - case AL_INVALID_VALUE: error_string = "AL_INVALID_VALUE, A numeric argument is out of range"; break; - case AL_INVALID_OPERATION: error_string = "AL_INVALID_OPERATION, The specified operation is not allowed in current state"; break; - case AL_OUT_OF_MEMORY: error_string = "AL_OUT_OF_MEMORY, Not enough memory to execute command"; break; + handle = Soloud_play3dEx(sound_state.soloud_context, + type == ST_WAV ? buffer->wav : buffer->wavstream, + 0.f, 0.f, 0.f, + 0.f, 0.f, 0.f, + 1.f, + true, + 0); + return handle; } - log_error("OpenAL", "%s\n(%s::%d): %s", file, expression, line, error_string); } -} -void sound_source_create(bool relative, uint num_buffers, uint* out_handle, uint* out_buffer_handles) -{ - al_check(alGenSources(1, out_handle)) - al_check(alGenBuffers((int)num_buffers, out_buffer_handles)) - sound_source_volume_set(*out_handle, 1.f); - if(relative) - sound_source_relative_set(*out_handle, true); -} + buffer = malloc(sizeof(*buffer)); + if(!buffer) + { + log_error("sound:source_create", "Out of memory!"); + return 0; + } -void sound_source_update(uint source_handle, - float apos_x, float apos_y, float apos_z, - float afwd_x, float afwd_y, float afwd_z, - float aup_x, float aup_y, float aup_z) -{ - float orientation[] = + switch(type) { - afwd_x, afwd_y, afwd_z, - aup_x, aup_y, aup_z - }; - al_check(alSource3f(source_handle, AL_POSITION, apos_x, apos_y, apos_z)) - al_check(alSourcefv(source_handle, AL_ORIENTATION, orientation)) -} + case ST_WAV: + { + Wav* wave = Wav_create(); + int rc = Wav_loadMem(wave, memory, (uint)size); + if(rc != 0) + { + log_error("sound:source_create", "Failed to load %s, Soloud: %s", filename, Soloud_getErrorString(sound_state.soloud_context, rc)); + free(buffer); + return 0; + } + buffer->type = ST_WAV; + buffer->wav = wave; + Wav_set3dAttenuation(wave, 1, 0.9f); + } + break; + case ST_WAV_STREAM: + { + WavStream* wave_stream = WavStream_create(); + int rc = WavStream_loadMem(wave_stream, memory, (uint)size); + if(rc != 0) + { + log_error("sound:source_create", "Failed to load %s, Soloud: %s", filename, Soloud_getErrorString(sound_state.soloud_context, rc)); + free(buffer); + return 0; + } + buffer->type = ST_WAV_STREAM; + buffer->wavstream = wave_stream; + } + break; + default: log_error("sound:source_create", "Invalid source type %d", type); return 0; + } -void sound_source_volume_set(uint source_handle, float volume) -{ - if(volume < 0.f) volume = 0.f; - al_check(alSourcef(source_handle, AL_GAIN, volume)) + hashmap_ptr_set(sound_buffers, filename, (void*)buffer); + handle = Soloud_play3dEx(sound_state.soloud_context, + type == ST_WAV ? buffer->wav : buffer->wavstream, + 0.f, 0.f, 0.f, + 0.f, 0.f, 0.f, + 1.f, + true, + 0); + + return handle; } -void sound_source_pitch_set(uint source_handle, float pitch) +void sound_source_destroy(uint source_handle) { - if(pitch < 0.f) pitch = 0.f; - al_check(alSourcef(source_handle, AL_PITCH, pitch)) + Soloud_stop(sound_state.soloud_context, source_handle); } -void sound_source_loop_set(uint source_handle, bool loop) + +void sound_source_update(uint source_handle, float apos_x, float apos_y, float apos_z) { - loop = loop ? AL_TRUE : AL_FALSE; - al_check(alSourcei(source_handle, AL_LOOPING, loop)) + Soloud_set3dSourceParameters(sound_state.soloud_context, source_handle, apos_x, apos_y, apos_z); + Soloud_update3dAudio(sound_state.soloud_context); } -void sound_source_relative_set(uint source_handle, bool relative) +void sound_source_volume_set(uint source_handle, float volume) { - relative = relative ? AL_TRUE : AL_FALSE; - al_check(alSourcei(source_handle, AL_SOURCE_RELATIVE, relative)); + if(volume < 0.f) volume = 0.f; + Soloud_setVolume(sound_state.soloud_context, source_handle, volume); } -void sound_source_load_wav(uint source_handle, uint buffer_handle, const char* file_name) +void sound_source_loop_set(uint source_handle, bool loop) { - if(!file_name) - { - log_error("sound_source:load_wav", "No file name given"); - return; - } - - char* full_path = str_new("sounds/%s", file_name); - FILE* wav_file = io_file_open(DIRT_INSTALL, full_path, "rb"); - free(full_path); - if(!wav_file) - { - log_error("sound_source:load_wav", "Failed to load %s", file_name); - return; - } - - SDL_RWops* sdl_rw = SDL_RWFromFP(wav_file, SDL_TRUE); - Uint8* wav_data = NULL; - Uint32 wav_data_len; - SDL_AudioSpec wav_spec; - if(!SDL_LoadWAV_RW(sdl_rw, 1, &wav_spec, &wav_data, &wav_data_len)) - { - log_error("sound_source:load_wav", "Failed to load wav %s", SDL_GetError()); - //SDL_FreeRW(sdl_rw); - return; - } - - bool mono = wav_spec.channels == 1 ? true : false; - int format = -1; - if(mono) - { - if(wav_spec.format == AUDIO_U8 || wav_spec.format == AUDIO_S8) - format = AL_FORMAT_MONO8; - else if(wav_spec.format == AUDIO_S16 || wav_spec.format == AUDIO_S16LSB || wav_spec.format == AUDIO_S16MSB || wav_spec.format == AUDIO_S16SYS) - format = AL_FORMAT_MONO16; - else if(wav_spec.format == AUDIO_F32 || wav_spec.format == AUDIO_F32LSB || wav_spec.format == AUDIO_F32MSB || wav_spec.format == AUDIO_F32SYS || wav_spec.format == AUDIO_S32 || wav_spec.format == AUDIO_S32LSB) - format = AL_FORMAT_MONO_FLOAT32; - } - else - { - /* TODO: FIX THIS!!!! This should resemble the if condition */ - if(wav_spec.format == AUDIO_U8 || wav_spec.format == AUDIO_S8) - format = AL_FORMAT_STEREO8; - else if(wav_spec.format == AUDIO_S16 || wav_spec.format == AUDIO_S16LSB || wav_spec.format == AUDIO_S16MSB || wav_spec.format == AUDIO_S16SYS) - format = AL_FORMAT_STEREO16; - else if(wav_spec.format == AUDIO_F32 || wav_spec.format == AUDIO_F32LSB || wav_spec.format == AUDIO_F32MSB || wav_spec.format == AUDIO_F32SYS || wav_spec.format == AUDIO_S32 || wav_spec.format == AUDIO_S32LSB) - format = AL_FORMAT_STEREO_FLOAT32; - } - - if(format == -1) - { - log_error("sound_source:load_wav", "Unsupported audio format"); - SDL_FreeWAV(wav_data); - return; - } - - al_check(alBufferData(buffer_handle, format, wav_data, wav_data_len, wav_spec.freq)) - al_check(alSourcei(source_handle, AL_BUFFER, buffer_handle)) - SDL_FreeWAV(wav_data); + Soloud_setLooping(sound_state.soloud_context, source_handle, loop); } void sound_source_play(uint source_handle) { - al_check(alSourcePlay(source_handle)) + Soloud_setPause(sound_state.soloud_context, source_handle, false); } void sound_source_pause(uint source_handle) { - al_check(alSourcePause(source_handle)) + Soloud_setPause(sound_state.soloud_context, source_handle, true); } void sound_source_rewind(uint source_handle) { - al_check(alSourceRewind(source_handle)) + Soloud_seek(sound_state.soloud_context, source_handle, 0.0); } void sound_source_stop(uint source_handle) { - al_check(alSourceStop(source_handle)) + Soloud_stop(sound_state.soloud_context, source_handle); } diff --git a/src/game/sound.h b/src/game/sound.h index 7170643..95b9ae6 100644 --- a/src/game/sound.h +++ b/src/game/sound.h @@ -4,7 +4,7 @@ #include "../common/num_types.h" #ifdef AL_DEBUG - #define al_check(expr) {expr; sound_error_check(__FILE__, __LINE__, #expr);} + #define al_check(expr) expr; #else #define al_check(expr) expr; #endif @@ -12,26 +12,19 @@ bool sound_init(void); void sound_cleanup(void); void sound_volume_set(float volume); -void sound_error_check(const char* file, unsigned int line, const char* expression); void sound_listener_update(float apos_x, float apos_y, float apos_z, float afwd_x, float afwd_y, float afwd_z, float aup_x, float aup_y, float aup_z); -void sound_source_update(uint source_handle, - float apos_x, float apos_y, float apos_z, - float afwd_x, float afwd_y, float afwd_z, - float aup_x, float aup_y, float aup_z); -void sound_source_create(bool relative, uint num_buffers, uint* out_handle, uint* out_buffer_handles); -void sound_source_destroy(uint source_handle, uint* attached_buffers, uint num_buffers); -void sound_source_volume_set(uint source_handle, float volume); -void sound_source_pitch_set(uint source_handle, float pitch); -void sound_source_load_wav(uint source_handle, uint buffer_handle, const char* file_name); -void sound_source_loop_set(uint source_handle, bool loop); -void sound_source_relative_set(uint source_handle, bool relative); -void sound_source_play(uint source_handle); -void sound_source_pause(uint source_handle); -void sound_source_rewind(uint source_handle); -void sound_source_stop(uint source_handle); +void sound_source_update(uint source_handle, float apos_x, float apos_y, float apos_z); +uint sound_source_create(bool relative, const char* filename, int type); +void sound_source_destroy(uint handle); +void sound_source_volume_set(uint handle, float volume); +void sound_source_loop_set(uint handle, bool loop); +void sound_source_play(uint handle); +void sound_source_pause(uint handle); +void sound_source_rewind(uint handle); +void sound_source_stop(uint handle); #endif diff --git a/src/libsymmetry/entity.c b/src/libsymmetry/entity.c index 6acd1d5..a50dd1f 100644 --- a/src/libsymmetry/entity.c +++ b/src/libsymmetry/entity.c @@ -58,9 +58,7 @@ void entity_remove(int index) case ET_STATIC_MESH: model_destroy(entity); break; case ET_SOUND_SOURCE: { - platform->sound.source_destroy(entity->sound_source.source_handle, - &entity->sound_source.buffer_handles[0], - entity->sound_source.num_attached_buffers); + } break; case ET_ROOT: break; @@ -164,10 +162,7 @@ void entity_post_update(void) transform_get_absolute_forward(entity, &abs_fwd); transform_get_absolute_up(entity, &abs_up); - platform->sound.source_update(entity->sound_source.source_handle, - abs_pos.x, abs_pos.y, abs_pos.z, - abs_fwd.x, abs_fwd.y, abs_fwd.z, - abs_up.x, abs_up.y, abs_up.z); + platform->sound.source_update(entity->sound_source.source_handle, abs_pos.x, abs_pos.y, abs_pos.z); } if(entity->is_listener) @@ -277,6 +272,9 @@ bool entity_write(struct Entity* entity, struct Parser_Object* object) { hashmap_bool_set(entity_data, "active", entity->sound_source.active); hashmap_bool_set(entity_data, "relative", entity->sound_source.relative); + hashmap_int_set(entity_data, "sound_type", entity->sound_source.type); + hashmap_str_set(entity_data, "wav_filename", entity->sound_source.wav_filename); + hashmap_bool_set(entity_data, "loop", entity->sound_source.loop); break; } }; @@ -440,13 +438,32 @@ struct Entity* entity_read(struct Parser_Object* object) break; case ET_SOUND_SOURCE: { - if(hashmap_value_exists(object->data, "active")) entity->sound_source.active = hashmap_bool_get(object->data, "active"); - if(hashmap_value_exists(object->data, "relative")) entity->sound_source.relative = hashmap_bool_get(object->data, "relative"); - if(hashmap_value_exists(object->data, "num_attached_buffers")) entity->sound_source.num_attached_buffers = (uint)hashmap_int_get(object->data, "num_attached_buffers"); - platform->sound.source_create(entity->sound_source.relative, - entity->sound_source.num_attached_buffers, - &entity->sound_source.source_handle, - &entity->sound_source.buffer_handles); + struct Sound_Source* sound_source = &entity->sound_source; + sound_source->active = false; + sound_source->relative = false; + sound_source->loop = false; + sound_source->source_handle = 0; + sound_source->wav_filename = NULL; + sound_source->type = ST_WAV; + + if(hashmap_value_exists(object->data, "active")) sound_source->active = hashmap_bool_get(object->data, "active"); + if(hashmap_value_exists(object->data, "relative")) sound_source->relative = hashmap_bool_get(object->data, "relative"); + if(hashmap_value_exists(object->data, "loop")) sound_source->loop = hashmap_bool_get(object->data, "loop"); + if(hashmap_value_exists(object->data, "wav_filename")) sound_source->wav_filename = str_new(hashmap_str_get(object->data, "wav_filename")); + if(hashmap_value_exists(object->data, "sound_type")) sound_source->type = hashmap_int_get(object->data, "sound_type"); + if(sound_source->wav_filename) + { + sound_source->source_handle = platform->sound.source_create(sound_source->relative, sound_source->wav_filename, sound_source->type); + platform->sound.source_loop_set(sound_source->source_handle, sound_source->loop); + } + + vec3 abs_pos = {0.f, 0.f, 0.f}; + vec3 abs_fwd = {0.f, 0.f, -1.f}; + vec3 abs_up = {0.f, 1.f, 0.f}; + transform_get_absolute_pos(entity, &abs_pos); + transform_get_absolute_forward(entity, &abs_fwd); + transform_get_absolute_up(entity, &abs_up); + platform->sound.source_update(entity->sound_source.source_handle, abs_pos.x, abs_pos.y, abs_pos.z); } break; case ET_PLAYER: @@ -473,6 +490,20 @@ struct Entity* entity_read(struct Parser_Object* object) break; } + if(entity->is_listener) + { + vec3 abs_pos = {0.f, 0.f, 0.f}; + vec3 abs_fwd = {0.f, 0.f, -1.f}; + vec3 abs_up = {0.f, 1.f, 0.f}; + transform_get_absolute_pos(entity, &abs_pos); + transform_get_absolute_forward(entity, &abs_fwd); + transform_get_absolute_up(entity, &abs_up); + + platform->sound.listener_update(abs_pos.x, abs_pos.y, abs_pos.z, + abs_fwd.x, abs_fwd.y, abs_fwd.z, + abs_up.x, abs_up.y, abs_up.z); + } + return entity; } diff --git a/src/libsymmetry/entity.h b/src/libsymmetry/entity.h index a1f203c..2d4cbb9 100644 --- a/src/libsymmetry/entity.h +++ b/src/libsymmetry/entity.h @@ -53,10 +53,11 @@ struct Model struct Sound_Source { bool active; + int type; bool relative; + bool loop; + char* wav_filename; uint source_handle; - uint buffer_handles[MAX_SOUND_SOURCE_BUFFERS]; - uint num_attached_buffers; }; struct Camera diff --git a/src/libsymmetry/game.c b/src/libsymmetry/game.c index 5d06cfb..c70d698 100644 --- a/src/libsymmetry/game.c +++ b/src/libsymmetry/game.c @@ -216,6 +216,12 @@ void scene_setup(void) struct Entity* player = entity_find("player"); game_state->player_node = player->id; + struct Entity* suz = entity_find("Suzanne"); + struct Entity* sound_ent = scene_add_as_child("Sound_Ent", ET_SOUND_SOURCE, suz->id); + sound_ent->sound_source.source_handle = platform->sound.source_create(true, "sounds/teh_beatz.wav", ST_WAV); + platform->sound.source_loop_set(sound_ent->sound_source.source_handle, true); + platform->sound.source_play(sound_ent->sound_source.source_handle); + //scene_save("parser_write.symtres", DIRT_INSTALL); } diff --git a/src/libsymmetry/input.c b/src/libsymmetry/input.c index 45207f6..5620371 100644 --- a/src/libsymmetry/input.c +++ b/src/libsymmetry/input.c @@ -326,28 +326,28 @@ bool input_map_state_get(const char* name, int state) } return (key_binding->state == state); -} - -bool input_map_create(const char* name, struct Key_Binding key_combination) -{ - //Check if a key map already exists - if(hashmap_value_exists(key_bindings, name)) - { - log_warning("Removing existing Map '%s' and replacing with new one", name); - input_map_remove(name); - } - - struct Key_Binding* new_keybinding = malloc(sizeof(*new_keybinding)); - if(!new_keybinding) - { - log_error("input:map_create", "Out of memory"); - return false; - } - - memcpy(new_keybinding, &key_combination, sizeof(key_combination)); - hashmap_ptr_set(key_bindings, name, new_keybinding); - log_message("Created new input map '%s'", name); - return true; +} + +bool input_map_create(const char* name, struct Key_Binding key_combination) +{ + //Check if a key map already exists + if(hashmap_value_exists(key_bindings, name)) + { + log_warning("Removing existing Map '%s' and replacing with new one", name); + input_map_remove(name); + } + + struct Key_Binding* new_keybinding = malloc(sizeof(*new_keybinding)); + if(!new_keybinding) + { + log_error("input:map_create", "Out of memory"); + return false; + } + + memcpy(new_keybinding, &key_combination, sizeof(key_combination)); + hashmap_ptr_set(key_bindings, name, new_keybinding); + log_message("Created new input map '%s'", name); + return true; } bool input_is_key_pressed(int key) diff --git a/third_party/windows/OpenAL/bin/OpenAL32.dll b/third_party/windows/OpenAL/bin/OpenAL32.dll deleted file mode 100644 index 392987d..0000000 Binary files a/third_party/windows/OpenAL/bin/OpenAL32.dll and /dev/null differ diff --git a/third_party/windows/OpenAL/include/AL/al.h b/third_party/windows/OpenAL/include/AL/al.h deleted file mode 100644 index 413b383..0000000 --- a/third_party/windows/OpenAL/include/AL/al.h +++ /dev/null @@ -1,656 +0,0 @@ -#ifndef AL_AL_H -#define AL_AL_H - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef AL_API - #if defined(AL_LIBTYPE_STATIC) - #define AL_API - #elif defined(_WIN32) - #define AL_API __declspec(dllimport) - #else - #define AL_API extern - #endif -#endif - -#if defined(_WIN32) - #define AL_APIENTRY __cdecl -#else - #define AL_APIENTRY -#endif - - -/** Deprecated macro. */ -#define OPENAL -#define ALAPI AL_API -#define ALAPIENTRY AL_APIENTRY -#define AL_INVALID (-1) -#define AL_ILLEGAL_ENUM AL_INVALID_ENUM -#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION - -/** Supported AL version. */ -#define AL_VERSION_1_0 -#define AL_VERSION_1_1 - -/** 8-bit boolean */ -typedef char ALboolean; - -/** character */ -typedef char ALchar; - -/** signed 8-bit 2's complement integer */ -typedef signed char ALbyte; - -/** unsigned 8-bit integer */ -typedef unsigned char ALubyte; - -/** signed 16-bit 2's complement integer */ -typedef short ALshort; - -/** unsigned 16-bit integer */ -typedef unsigned short ALushort; - -/** signed 32-bit 2's complement integer */ -typedef int ALint; - -/** unsigned 32-bit integer */ -typedef unsigned int ALuint; - -/** non-negative 32-bit binary integer size */ -typedef int ALsizei; - -/** enumerated 32-bit value */ -typedef int ALenum; - -/** 32-bit IEEE754 floating-point */ -typedef float ALfloat; - -/** 64-bit IEEE754 floating-point */ -typedef double ALdouble; - -/** void type (for opaque pointers only) */ -typedef void ALvoid; - - -/* Enumerant values begin at column 50. No tabs. */ - -/** "no distance model" or "no buffer" */ -#define AL_NONE 0 - -/** Boolean False. */ -#define AL_FALSE 0 - -/** Boolean True. */ -#define AL_TRUE 1 - - -/** - * Relative source. - * Type: ALboolean - * Range: [AL_TRUE, AL_FALSE] - * Default: AL_FALSE - * - * Specifies if the Source has relative coordinates. - */ -#define AL_SOURCE_RELATIVE 0x202 - - -/** - * Inner cone angle, in degrees. - * Type: ALint, ALfloat - * Range: [0 - 360] - * Default: 360 - * - * The angle covered by the inner cone, where the source will not attenuate. - */ -#define AL_CONE_INNER_ANGLE 0x1001 - -/** - * Outer cone angle, in degrees. - * Range: [0 - 360] - * Default: 360 - * - * The angle covered by the outer cone, where the source will be fully - * attenuated. - */ -#define AL_CONE_OUTER_ANGLE 0x1002 - -/** - * Source pitch. - * Type: ALfloat - * Range: [0.5 - 2.0] - * Default: 1.0 - * - * A multiplier for the frequency (sample rate) of the source's buffer. - */ -#define AL_PITCH 0x1003 - -/** - * Source or listener position. - * Type: ALfloat[3], ALint[3] - * Default: {0, 0, 0} - * - * The source or listener location in three dimensional space. - * - * OpenAL, like OpenGL, uses a right handed coordinate system, where in a - * frontal default view X (thumb) points right, Y points up (index finger), and - * Z points towards the viewer/camera (middle finger). - * - * To switch from a left handed coordinate system, flip the sign on the Z - * coordinate. - */ -#define AL_POSITION 0x1004 - -/** - * Source direction. - * Type: ALfloat[3], ALint[3] - * Default: {0, 0, 0} - * - * Specifies the current direction in local space. - * A zero-length vector specifies an omni-directional source (cone is ignored). - */ -#define AL_DIRECTION 0x1005 - -/** - * Source or listener velocity. - * Type: ALfloat[3], ALint[3] - * Default: {0, 0, 0} - * - * Specifies the current velocity in local space. - */ -#define AL_VELOCITY 0x1006 - -/** - * Source looping. - * Type: ALboolean - * Range: [AL_TRUE, AL_FALSE] - * Default: AL_FALSE - * - * Specifies whether source is looping. - */ -#define AL_LOOPING 0x1007 - -/** - * Source buffer. - * Type: ALuint - * Range: any valid Buffer. - * - * Specifies the buffer to provide sound samples. - */ -#define AL_BUFFER 0x1009 - -/** - * Source or listener gain. - * Type: ALfloat - * Range: [0.0 - ] - * - * A value of 1.0 means unattenuated. Each division by 2 equals an attenuation - * of about -6dB. Each multiplicaton by 2 equals an amplification of about - * +6dB. - * - * A value of 0.0 is meaningless with respect to a logarithmic scale; it is - * silent. - */ -#define AL_GAIN 0x100A - -/** - * Minimum source gain. - * Type: ALfloat - * Range: [0.0 - 1.0] - * - * The minimum gain allowed for a source, after distance and cone attenation is - * applied (if applicable). - */ -#define AL_MIN_GAIN 0x100D - -/** - * Maximum source gain. - * Type: ALfloat - * Range: [0.0 - 1.0] - * - * The maximum gain allowed for a source, after distance and cone attenation is - * applied (if applicable). - */ -#define AL_MAX_GAIN 0x100E - -/** - * Listener orientation. - * Type: ALfloat[6] - * Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0} - * - * Effectively two three dimensional vectors. The first vector is the front (or - * "at") and the second is the top (or "up"). - * - * Both vectors are in local space. - */ -#define AL_ORIENTATION 0x100F - -/** - * Source state (query only). - * Type: ALint - * Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED] - */ -#define AL_SOURCE_STATE 0x1010 - -/** Source state value. */ -#define AL_INITIAL 0x1011 -#define AL_PLAYING 0x1012 -#define AL_PAUSED 0x1013 -#define AL_STOPPED 0x1014 - -/** - * Source Buffer Queue size (query only). - * Type: ALint - * - * The number of buffers queued using alSourceQueueBuffers, minus the buffers - * removed with alSourceUnqueueBuffers. - */ -#define AL_BUFFERS_QUEUED 0x1015 - -/** - * Source Buffer Queue processed count (query only). - * Type: ALint - * - * The number of queued buffers that have been fully processed, and can be - * removed with alSourceUnqueueBuffers. - * - * Looping sources will never fully process buffers because they will be set to - * play again for when the source loops. - */ -#define AL_BUFFERS_PROCESSED 0x1016 - -/** - * Source reference distance. - * Type: ALfloat - * Range: [0.0 - ] - * Default: 1.0 - * - * The distance in units that no attenuation occurs. - * - * At 0.0, no distance attenuation ever occurs on non-linear attenuation models. - */ -#define AL_REFERENCE_DISTANCE 0x1020 - -/** - * Source rolloff factor. - * Type: ALfloat - * Range: [0.0 - ] - * Default: 1.0 - * - * Multiplier to exaggerate or diminish distance attenuation. - * - * At 0.0, no distance attenuation ever occurs. - */ -#define AL_ROLLOFF_FACTOR 0x1021 - -/** - * Outer cone gain. - * Type: ALfloat - * Range: [0.0 - 1.0] - * Default: 0.0 - * - * The gain attenuation applied when the listener is outside of the source's - * outer cone. - */ -#define AL_CONE_OUTER_GAIN 0x1022 - -/** - * Source maximum distance. - * Type: ALfloat - * Range: [0.0 - ] - * Default: +inf - * - * The distance above which the source is not attenuated any further with a - * clamped distance model, or where attenuation reaches 0.0 gain for linear - * distance models with a default rolloff factor. - */ -#define AL_MAX_DISTANCE 0x1023 - -/** Source buffer position, in seconds */ -#define AL_SEC_OFFSET 0x1024 -/** Source buffer position, in sample frames */ -#define AL_SAMPLE_OFFSET 0x1025 -/** Source buffer position, in bytes */ -#define AL_BYTE_OFFSET 0x1026 - -/** - * Source type (query only). - * Type: ALint - * Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED] - * - * A Source is Static if a Buffer has been attached using AL_BUFFER. - * - * A Source is Streaming if one or more Buffers have been attached using - * alSourceQueueBuffers. - * - * A Source is Undetermined when it has the NULL buffer attached using - * AL_BUFFER. - */ -#define AL_SOURCE_TYPE 0x1027 - -/** Source type value. */ -#define AL_STATIC 0x1028 -#define AL_STREAMING 0x1029 -#define AL_UNDETERMINED 0x1030 - -/** Buffer format specifier. */ -#define AL_FORMAT_MONO8 0x1100 -#define AL_FORMAT_MONO16 0x1101 -#define AL_FORMAT_STEREO8 0x1102 -#define AL_FORMAT_STEREO16 0x1103 - -/** Buffer frequency (query only). */ -#define AL_FREQUENCY 0x2001 -/** Buffer bits per sample (query only). */ -#define AL_BITS 0x2002 -/** Buffer channel count (query only). */ -#define AL_CHANNELS 0x2003 -/** Buffer data size (query only). */ -#define AL_SIZE 0x2004 - -/** - * Buffer state. - * - * Not for public use. - */ -#define AL_UNUSED 0x2010 -#define AL_PENDING 0x2011 -#define AL_PROCESSED 0x2012 - - -/** No error. */ -#define AL_NO_ERROR 0 - -/** Invalid name paramater passed to AL call. */ -#define AL_INVALID_NAME 0xA001 - -/** Invalid enum parameter passed to AL call. */ -#define AL_INVALID_ENUM 0xA002 - -/** Invalid value parameter passed to AL call. */ -#define AL_INVALID_VALUE 0xA003 - -/** Illegal AL call. */ -#define AL_INVALID_OPERATION 0xA004 - -/** Not enough memory. */ -#define AL_OUT_OF_MEMORY 0xA005 - - -/** Context string: Vendor ID. */ -#define AL_VENDOR 0xB001 -/** Context string: Version. */ -#define AL_VERSION 0xB002 -/** Context string: Renderer ID. */ -#define AL_RENDERER 0xB003 -/** Context string: Space-separated extension list. */ -#define AL_EXTENSIONS 0xB004 - - -/** - * Doppler scale. - * Type: ALfloat - * Range: [0.0 - ] - * Default: 1.0 - * - * Scale for source and listener velocities. - */ -#define AL_DOPPLER_FACTOR 0xC000 -AL_API void AL_APIENTRY alDopplerFactor(ALfloat value); - -/** - * Doppler velocity (deprecated). - * - * A multiplier applied to the Speed of Sound. - */ -#define AL_DOPPLER_VELOCITY 0xC001 -AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value); - -/** - * Speed of Sound, in units per second. - * Type: ALfloat - * Range: [0.0001 - ] - * Default: 343.3 - * - * The speed at which sound waves are assumed to travel, when calculating the - * doppler effect. - */ -#define AL_SPEED_OF_SOUND 0xC003 -AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value); - -/** - * Distance attenuation model. - * Type: ALint - * Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED, - * AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED, - * AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED] - * Default: AL_INVERSE_DISTANCE_CLAMPED - * - * The model by which sources attenuate with distance. - * - * None - No distance attenuation. - * Inverse - Doubling the distance halves the source gain. - * Linear - Linear gain scaling between the reference and max distances. - * Exponent - Exponential gain dropoff. - * - * Clamped variations work like the non-clamped counterparts, except the - * distance calculated is clamped between the reference and max distances. - */ -#define AL_DISTANCE_MODEL 0xD000 -AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel); - -/** Distance model value. */ -#define AL_INVERSE_DISTANCE 0xD001 -#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 -#define AL_LINEAR_DISTANCE 0xD003 -#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 -#define AL_EXPONENT_DISTANCE 0xD005 -#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 - -/** Renderer State management. */ -AL_API void AL_APIENTRY alEnable(ALenum capability); -AL_API void AL_APIENTRY alDisable(ALenum capability); -AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability); - -/** State retrieval. */ -AL_API const ALchar* AL_APIENTRY alGetString(ALenum param); -AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values); -AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values); -AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values); -AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param); -AL_API ALint AL_APIENTRY alGetInteger(ALenum param); -AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param); -AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param); - -/** - * Error retrieval. - * - * Obtain the first error generated in the AL context since the last check. - */ -AL_API ALenum AL_APIENTRY alGetError(void); - -/** - * Extension support. - * - * Query for the presence of an extension, and obtain any appropriate function - * pointers and enum values. - */ -AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname); -AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname); -AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename); - - -/** Set Listener parameters */ -AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value); -AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values); -AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value); -AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3); -AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values); - -/** Get Listener parameters */ -AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value); -AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value); -AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3); -AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values); - - -/** Create Source objects. */ -AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources); -/** Delete Source objects. */ -AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources); -/** Verify a handle is a valid Source. */ -AL_API ALboolean AL_APIENTRY alIsSource(ALuint source); - -/** Set Source parameters. */ -AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value); -AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values); -AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value); -AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); -AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values); - -/** Get Source parameters. */ -AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value); -AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value); -AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); -AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values); - - -/** Play, replay, or resume (if paused) a list of Sources */ -AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources); -/** Stop a list of Sources */ -AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources); -/** Rewind a list of Sources */ -AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources); -/** Pause a list of Sources */ -AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources); - -/** Play, replay, or resume a Source */ -AL_API void AL_APIENTRY alSourcePlay(ALuint source); -/** Stop a Source */ -AL_API void AL_APIENTRY alSourceStop(ALuint source); -/** Rewind a Source (set playback postiton to beginning) */ -AL_API void AL_APIENTRY alSourceRewind(ALuint source); -/** Pause a Source */ -AL_API void AL_APIENTRY alSourcePause(ALuint source); - -/** Queue buffers onto a source */ -AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers); -/** Unqueue processed buffers from a source */ -AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers); - - -/** Create Buffer objects */ -AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers); -/** Delete Buffer objects */ -AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers); -/** Verify a handle is a valid Buffer */ -AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer); - -/** Specifies the data to be copied into a buffer */ -AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); - -/** Set Buffer parameters, */ -AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value); -AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values); -AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value); -AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); -AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values); - -/** Get Buffer parameters. */ -AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value); -AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value); -AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); -AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values); - -/** Pointer-to-function type, useful for dynamically getting AL entry points. */ -typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability); -typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability); -typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability); -typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param); -typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values); -typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values); -typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param); -typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param); -typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param); -typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param); -typedef ALenum (AL_APIENTRY *LPALGETERROR)(void); -typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname); -typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname); -typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename); -typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values); -typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3); -typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values); -typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value); -typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value); -typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3); -typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources); -typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources); -typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values); -typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); -typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values); -typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value); -typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value); -typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); -typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers); -typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers); -typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers); -typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers); -typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer); -typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); -typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values); -typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); -typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values); -typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value); -typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value); -typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); -typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value); -typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value); -typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value); -typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel); - -#if defined(__cplusplus) -} /* extern "C" */ -#endif - -#endif /* AL_AL_H */ diff --git a/third_party/windows/OpenAL/include/AL/alc.h b/third_party/windows/OpenAL/include/AL/alc.h deleted file mode 100644 index 294e8b3..0000000 --- a/third_party/windows/OpenAL/include/AL/alc.h +++ /dev/null @@ -1,237 +0,0 @@ -#ifndef AL_ALC_H -#define AL_ALC_H - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef ALC_API - #if defined(AL_LIBTYPE_STATIC) - #define ALC_API - #elif defined(_WIN32) - #define ALC_API __declspec(dllimport) - #else - #define ALC_API extern - #endif -#endif - -#if defined(_WIN32) - #define ALC_APIENTRY __cdecl -#else - #define ALC_APIENTRY -#endif - - -/** Deprecated macro. */ -#define ALCAPI ALC_API -#define ALCAPIENTRY ALC_APIENTRY -#define ALC_INVALID 0 - -/** Supported ALC version? */ -#define ALC_VERSION_0_1 1 - -/** Opaque device handle */ -typedef struct ALCdevice_struct ALCdevice; -/** Opaque context handle */ -typedef struct ALCcontext_struct ALCcontext; - -/** 8-bit boolean */ -typedef char ALCboolean; - -/** character */ -typedef char ALCchar; - -/** signed 8-bit 2's complement integer */ -typedef signed char ALCbyte; - -/** unsigned 8-bit integer */ -typedef unsigned char ALCubyte; - -/** signed 16-bit 2's complement integer */ -typedef short ALCshort; - -/** unsigned 16-bit integer */ -typedef unsigned short ALCushort; - -/** signed 32-bit 2's complement integer */ -typedef int ALCint; - -/** unsigned 32-bit integer */ -typedef unsigned int ALCuint; - -/** non-negative 32-bit binary integer size */ -typedef int ALCsizei; - -/** enumerated 32-bit value */ -typedef int ALCenum; - -/** 32-bit IEEE754 floating-point */ -typedef float ALCfloat; - -/** 64-bit IEEE754 floating-point */ -typedef double ALCdouble; - -/** void type (for opaque pointers only) */ -typedef void ALCvoid; - - -/* Enumerant values begin at column 50. No tabs. */ - -/** Boolean False. */ -#define ALC_FALSE 0 - -/** Boolean True. */ -#define ALC_TRUE 1 - -/** Context attribute: Hz. */ -#define ALC_FREQUENCY 0x1007 - -/** Context attribute: Hz. */ -#define ALC_REFRESH 0x1008 - -/** Context attribute: AL_TRUE or AL_FALSE. */ -#define ALC_SYNC 0x1009 - -/** Context attribute: requested Mono (3D) Sources. */ -#define ALC_MONO_SOURCES 0x1010 - -/** Context attribute: requested Stereo Sources. */ -#define ALC_STEREO_SOURCES 0x1011 - -/** No error. */ -#define ALC_NO_ERROR 0 - -/** Invalid device handle. */ -#define ALC_INVALID_DEVICE 0xA001 - -/** Invalid context handle. */ -#define ALC_INVALID_CONTEXT 0xA002 - -/** Invalid enum parameter passed to an ALC call. */ -#define ALC_INVALID_ENUM 0xA003 - -/** Invalid value parameter passed to an ALC call. */ -#define ALC_INVALID_VALUE 0xA004 - -/** Out of memory. */ -#define ALC_OUT_OF_MEMORY 0xA005 - - -/** Runtime ALC version. */ -#define ALC_MAJOR_VERSION 0x1000 -#define ALC_MINOR_VERSION 0x1001 - -/** Context attribute list properties. */ -#define ALC_ATTRIBUTES_SIZE 0x1002 -#define ALC_ALL_ATTRIBUTES 0x1003 - -/** String for the default device specifier. */ -#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 -/** - * String for the given device's specifier. - * - * If device handle is NULL, it is instead a null-char separated list of - * strings of known device specifiers (list ends with an empty string). - */ -#define ALC_DEVICE_SPECIFIER 0x1005 -/** String for space-separated list of ALC extensions. */ -#define ALC_EXTENSIONS 0x1006 - - -/** Capture extension */ -#define ALC_EXT_CAPTURE 1 -/** - * String for the given capture device's specifier. - * - * If device handle is NULL, it is instead a null-char separated list of - * strings of known capture device specifiers (list ends with an empty string). - */ -#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 -/** String for the default capture device specifier. */ -#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 -/** Number of sample frames available for capture. */ -#define ALC_CAPTURE_SAMPLES 0x312 - - -/** Enumerate All extension */ -#define ALC_ENUMERATE_ALL_EXT 1 -/** String for the default extended device specifier. */ -#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012 -/** - * String for the given extended device's specifier. - * - * If device handle is NULL, it is instead a null-char separated list of - * strings of known extended device specifiers (list ends with an empty string). - */ -#define ALC_ALL_DEVICES_SPECIFIER 0x1013 - - -/** Context management. */ -ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint* attrlist); -ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context); -ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context); -ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context); -ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context); -ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void); -ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context); - -/** Device management. */ -ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename); -ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device); - - -/** - * Error support. - * - * Obtain the most recent Device error. - */ -ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device); - -/** - * Extension support. - * - * Query for the presence of an extension, and obtain any appropriate - * function pointers and enum values. - */ -ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname); -ALC_API void* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname); -ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname); - -/** Query function. */ -ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param); -ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values); - -/** Capture function. */ -ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize); -ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device); -ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device); -ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device); -ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); - -/** Pointer-to-function type, useful for dynamically getting ALC entry points. */ -typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist); -typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context); -typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context); -typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)(ALCcontext *context); -typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)(ALCcontext *context); -typedef ALCcontext* (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)(void); -typedef ALCdevice* (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)(ALCcontext *context); -typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename); -typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device); -typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device); -typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname); -typedef void* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname); -typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname); -typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param); -typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values); -typedef ALCdevice* (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize); -typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)(ALCdevice *device); -typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device); -typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device); -typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); - -#if defined(__cplusplus) -} -#endif - -#endif /* AL_ALC_H */ diff --git a/third_party/windows/OpenAL/include/AL/alext.h b/third_party/windows/OpenAL/include/AL/alext.h deleted file mode 100644 index 4b9a155..0000000 --- a/third_party/windows/OpenAL/include/AL/alext.h +++ /dev/null @@ -1,466 +0,0 @@ -/** - * OpenAL cross platform audio library - * Copyright (C) 2008 by authors. - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * Or go to http://www.gnu.org/copyleft/lgpl.html - */ - -#ifndef AL_ALEXT_H -#define AL_ALEXT_H - -#include -/* Define int64_t and uint64_t types */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include -#endif - -#include "alc.h" -#include "al.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef AL_LOKI_IMA_ADPCM_format -#define AL_LOKI_IMA_ADPCM_format 1 -#define AL_FORMAT_IMA_ADPCM_MONO16_EXT 0x10000 -#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT 0x10001 -#endif - -#ifndef AL_LOKI_WAVE_format -#define AL_LOKI_WAVE_format 1 -#define AL_FORMAT_WAVE_EXT 0x10002 -#endif - -#ifndef AL_EXT_vorbis -#define AL_EXT_vorbis 1 -#define AL_FORMAT_VORBIS_EXT 0x10003 -#endif - -#ifndef AL_LOKI_quadriphonic -#define AL_LOKI_quadriphonic 1 -#define AL_FORMAT_QUAD8_LOKI 0x10004 -#define AL_FORMAT_QUAD16_LOKI 0x10005 -#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_double -#define AL_EXT_double 1 -#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012 -#define AL_FORMAT_STEREO_DOUBLE_EXT 0x10013 -#endif - -#ifndef AL_EXT_MULAW -#define AL_EXT_MULAW 1 -#define AL_FORMAT_MONO_MULAW_EXT 0x10014 -#define AL_FORMAT_STEREO_MULAW_EXT 0x10015 -#endif - -#ifndef AL_EXT_ALAW -#define AL_EXT_ALAW 1 -#define AL_FORMAT_MONO_ALAW_EXT 0x10016 -#define AL_FORMAT_STEREO_ALAW_EXT 0x10017 -#endif - -#ifndef ALC_LOKI_audio_channel -#define ALC_LOKI_audio_channel 1 -#define ALC_CHAN_MAIN_LOKI 0x500001 -#define ALC_CHAN_PCM_LOKI 0x500002 -#define ALC_CHAN_CD_LOKI 0x500003 -#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 - -#ifndef AL_EXT_MULAW_MCFORMATS -#define AL_EXT_MULAW_MCFORMATS 1 -#define AL_FORMAT_MONO_MULAW 0x10014 -#define AL_FORMAT_STEREO_MULAW 0x10015 -#define AL_FORMAT_QUAD_MULAW 0x10021 -#define AL_FORMAT_REAR_MULAW 0x10022 -#define AL_FORMAT_51CHN_MULAW 0x10023 -#define AL_FORMAT_61CHN_MULAW 0x10024 -#define AL_FORMAT_71CHN_MULAW 0x10025 -#endif - -#ifndef AL_EXT_IMA4 -#define AL_EXT_IMA4 1 -#define AL_FORMAT_MONO_IMA4 0x1300 -#define AL_FORMAT_STEREO_IMA4 0x1301 -#endif - -#ifndef AL_EXT_STATIC_BUFFER -#define AL_EXT_STATIC_BUFFER 1 -typedef ALvoid (AL_APIENTRY*PFNALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq); -#endif -#endif - -#ifndef ALC_EXT_EFX -#define ALC_EXT_EFX 1 -#include "efx.h" -#endif - -#ifndef ALC_EXT_disconnect -#define ALC_EXT_disconnect 1 -#define ALC_CONNECTED 0x313 -#endif - -#ifndef ALC_EXT_thread_local_context -#define ALC_EXT_thread_local_context 1 -typedef ALCboolean (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context); -typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context); -ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void); -#endif -#endif - -#ifndef AL_EXT_source_distance_model -#define AL_EXT_source_distance_model 1 -#define AL_SOURCE_DISTANCE_MODEL 0x200 -#endif - -#ifndef AL_SOFT_buffer_sub_data -#define AL_SOFT_buffer_sub_data 1 -#define AL_BYTE_RW_OFFSETS_SOFT 0x1031 -#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032 -typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length); -#endif -#endif - -#ifndef AL_SOFT_loop_points -#define AL_SOFT_loop_points 1 -#define AL_LOOP_POINTS_SOFT 0x2015 -#endif - -#ifndef AL_EXT_FOLDBACK -#define AL_EXT_FOLDBACK 1 -#define AL_EXT_FOLDBACK_NAME "AL_EXT_FOLDBACK" -#define AL_FOLDBACK_EVENT_BLOCK 0x4112 -#define AL_FOLDBACK_EVENT_START 0x4111 -#define AL_FOLDBACK_EVENT_STOP 0x4113 -#define AL_FOLDBACK_MODE_MONO 0x4101 -#define AL_FOLDBACK_MODE_STEREO 0x4102 -typedef void (AL_APIENTRY*LPALFOLDBACKCALLBACK)(ALenum,ALsizei); -typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTART)(ALenum,ALsizei,ALsizei,ALfloat*,LPALFOLDBACKCALLBACK); -typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTOP)(void); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alRequestFoldbackStart(ALenum mode,ALsizei count,ALsizei length,ALfloat *mem,LPALFOLDBACKCALLBACK callback); -AL_API void AL_APIENTRY alRequestFoldbackStop(void); -#endif -#endif - -#ifndef ALC_EXT_DEDICATED -#define ALC_EXT_DEDICATED 1 -#define AL_DEDICATED_GAIN 0x0001 -#define AL_EFFECT_DEDICATED_DIALOGUE 0x9001 -#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000 -#endif - -#ifndef AL_SOFT_buffer_samples -#define AL_SOFT_buffer_samples 1 -/* Channel configurations */ -#define AL_MONO_SOFT 0x1500 -#define AL_STEREO_SOFT 0x1501 -#define AL_REAR_SOFT 0x1502 -#define AL_QUAD_SOFT 0x1503 -#define AL_5POINT1_SOFT 0x1504 -#define AL_6POINT1_SOFT 0x1505 -#define AL_7POINT1_SOFT 0x1506 - -/* Sample types */ -#define AL_BYTE_SOFT 0x1400 -#define AL_UNSIGNED_BYTE_SOFT 0x1401 -#define AL_SHORT_SOFT 0x1402 -#define AL_UNSIGNED_SHORT_SOFT 0x1403 -#define AL_INT_SOFT 0x1404 -#define AL_UNSIGNED_INT_SOFT 0x1405 -#define AL_FLOAT_SOFT 0x1406 -#define AL_DOUBLE_SOFT 0x1407 -#define AL_BYTE3_SOFT 0x1408 -#define AL_UNSIGNED_BYTE3_SOFT 0x1409 - -/* Storage formats */ -#define AL_MONO8_SOFT 0x1100 -#define AL_MONO16_SOFT 0x1101 -#define AL_MONO32F_SOFT 0x10010 -#define AL_STEREO8_SOFT 0x1102 -#define AL_STEREO16_SOFT 0x1103 -#define AL_STEREO32F_SOFT 0x10011 -#define AL_QUAD8_SOFT 0x1204 -#define AL_QUAD16_SOFT 0x1205 -#define AL_QUAD32F_SOFT 0x1206 -#define AL_REAR8_SOFT 0x1207 -#define AL_REAR16_SOFT 0x1208 -#define AL_REAR32F_SOFT 0x1209 -#define AL_5POINT1_8_SOFT 0x120A -#define AL_5POINT1_16_SOFT 0x120B -#define AL_5POINT1_32F_SOFT 0x120C -#define AL_6POINT1_8_SOFT 0x120D -#define AL_6POINT1_16_SOFT 0x120E -#define AL_6POINT1_32F_SOFT 0x120F -#define AL_7POINT1_8_SOFT 0x1210 -#define AL_7POINT1_16_SOFT 0x1211 -#define AL_7POINT1_32F_SOFT 0x1212 - -/* Buffer attributes */ -#define AL_INTERNAL_FORMAT_SOFT 0x2008 -#define AL_BYTE_LENGTH_SOFT 0x2009 -#define AL_SAMPLE_LENGTH_SOFT 0x200A -#define AL_SEC_LENGTH_SOFT 0x200B - -typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*); -typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*); -typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*); -typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data); -AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data); -AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data); -AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format); -#endif -#endif - -#ifndef AL_SOFT_direct_channels -#define AL_SOFT_direct_channels 1 -#define AL_DIRECT_CHANNELS_SOFT 0x1033 -#endif - -#ifndef ALC_SOFT_loopback -#define ALC_SOFT_loopback 1 -#define ALC_FORMAT_CHANNELS_SOFT 0x1990 -#define ALC_FORMAT_TYPE_SOFT 0x1991 - -/* Sample types */ -#define ALC_BYTE_SOFT 0x1400 -#define ALC_UNSIGNED_BYTE_SOFT 0x1401 -#define ALC_SHORT_SOFT 0x1402 -#define ALC_UNSIGNED_SHORT_SOFT 0x1403 -#define ALC_INT_SOFT 0x1404 -#define ALC_UNSIGNED_INT_SOFT 0x1405 -#define ALC_FLOAT_SOFT 0x1406 - -/* Channel configurations */ -#define ALC_MONO_SOFT 0x1500 -#define ALC_STEREO_SOFT 0x1501 -#define ALC_QUAD_SOFT 0x1503 -#define ALC_5POINT1_SOFT 0x1504 -#define ALC_6POINT1_SOFT 0x1505 -#define ALC_7POINT1_SOFT 0x1506 - -typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*); -typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum); -typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName); -ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type); -ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); -#endif -#endif - -#ifndef AL_EXT_STEREO_ANGLES -#define AL_EXT_STEREO_ANGLES 1 -#define AL_STEREO_ANGLES 0x1030 -#endif - -#ifndef AL_EXT_SOURCE_RADIUS -#define AL_EXT_SOURCE_RADIUS 1 -#define AL_SOURCE_RADIUS 0x1031 -#endif - -#ifndef AL_SOFT_source_latency -#define AL_SOFT_source_latency 1 -#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200 -#define AL_SEC_OFFSET_LATENCY_SOFT 0x1201 -typedef int64_t ALint64SOFT; -typedef uint64_t ALuint64SOFT; -typedef void (AL_APIENTRY*LPALSOURCEDSOFT)(ALuint,ALenum,ALdouble); -typedef void (AL_APIENTRY*LPALSOURCE3DSOFT)(ALuint,ALenum,ALdouble,ALdouble,ALdouble); -typedef void (AL_APIENTRY*LPALSOURCEDVSOFT)(ALuint,ALenum,const ALdouble*); -typedef void (AL_APIENTRY*LPALGETSOURCEDSOFT)(ALuint,ALenum,ALdouble*); -typedef void (AL_APIENTRY*LPALGETSOURCE3DSOFT)(ALuint,ALenum,ALdouble*,ALdouble*,ALdouble*); -typedef void (AL_APIENTRY*LPALGETSOURCEDVSOFT)(ALuint,ALenum,ALdouble*); -typedef void (AL_APIENTRY*LPALSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT); -typedef void (AL_APIENTRY*LPALSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT,ALint64SOFT,ALint64SOFT); -typedef void (AL_APIENTRY*LPALSOURCEI64VSOFT)(ALuint,ALenum,const ALint64SOFT*); -typedef void (AL_APIENTRY*LPALGETSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT*); -typedef void (AL_APIENTRY*LPALGETSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT*,ALint64SOFT*,ALint64SOFT*); -typedef void (AL_APIENTRY*LPALGETSOURCEI64VSOFT)(ALuint,ALenum,ALint64SOFT*); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alSourcedSOFT(ALuint source, ALenum param, ALdouble value); -AL_API void AL_APIENTRY alSource3dSOFT(ALuint source, ALenum param, ALdouble value1, ALdouble value2, ALdouble value3); -AL_API void AL_APIENTRY alSourcedvSOFT(ALuint source, ALenum param, const ALdouble *values); -AL_API void AL_APIENTRY alGetSourcedSOFT(ALuint source, ALenum param, ALdouble *value); -AL_API void AL_APIENTRY alGetSource3dSOFT(ALuint source, ALenum param, ALdouble *value1, ALdouble *value2, ALdouble *value3); -AL_API void AL_APIENTRY alGetSourcedvSOFT(ALuint source, ALenum param, ALdouble *values); -AL_API void AL_APIENTRY alSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT value); -AL_API void AL_APIENTRY alSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT value1, ALint64SOFT value2, ALint64SOFT value3); -AL_API void AL_APIENTRY alSourcei64vSOFT(ALuint source, ALenum param, const ALint64SOFT *values); -AL_API void AL_APIENTRY alGetSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT *value); -AL_API void AL_APIENTRY alGetSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT *value1, ALint64SOFT *value2, ALint64SOFT *value3); -AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64SOFT *values); -#endif -#endif - -#ifndef ALC_EXT_DEFAULT_FILTER_ORDER -#define ALC_EXT_DEFAULT_FILTER_ORDER 1 -#define ALC_DEFAULT_FILTER_ORDER 0x1100 -#endif - -#ifndef AL_SOFT_deferred_updates -#define AL_SOFT_deferred_updates 1 -#define AL_DEFERRED_UPDATES_SOFT 0xC002 -typedef ALvoid (AL_APIENTRY*LPALDEFERUPDATESSOFT)(void); -typedef ALvoid (AL_APIENTRY*LPALPROCESSUPDATESSOFT)(void); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void); -AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void); -#endif -#endif - -#ifndef AL_SOFT_block_alignment -#define AL_SOFT_block_alignment 1 -#define AL_UNPACK_BLOCK_ALIGNMENT_SOFT 0x200C -#define AL_PACK_BLOCK_ALIGNMENT_SOFT 0x200D -#endif - -#ifndef AL_SOFT_MSADPCM -#define AL_SOFT_MSADPCM 1 -#define AL_FORMAT_MONO_MSADPCM_SOFT 0x1302 -#define AL_FORMAT_STEREO_MSADPCM_SOFT 0x1303 -#endif - -#ifndef AL_SOFT_source_length -#define AL_SOFT_source_length 1 -/*#define AL_BYTE_LENGTH_SOFT 0x2009*/ -/*#define AL_SAMPLE_LENGTH_SOFT 0x200A*/ -/*#define AL_SEC_LENGTH_SOFT 0x200B*/ -#endif - -#ifndef ALC_SOFT_pause_device -#define ALC_SOFT_pause_device 1 -typedef void (ALC_APIENTRY*LPALCDEVICEPAUSESOFT)(ALCdevice *device); -typedef void (ALC_APIENTRY*LPALCDEVICERESUMESOFT)(ALCdevice *device); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API void ALC_APIENTRY alcDevicePauseSOFT(ALCdevice *device); -ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device); -#endif -#endif - -#ifndef AL_EXT_BFORMAT -#define AL_EXT_BFORMAT 1 -#define AL_FORMAT_BFORMAT2D_8 0x20021 -#define AL_FORMAT_BFORMAT2D_16 0x20022 -#define AL_FORMAT_BFORMAT2D_FLOAT32 0x20023 -#define AL_FORMAT_BFORMAT3D_8 0x20031 -#define AL_FORMAT_BFORMAT3D_16 0x20032 -#define AL_FORMAT_BFORMAT3D_FLOAT32 0x20033 -#endif - -#ifndef AL_EXT_MULAW_BFORMAT -#define AL_EXT_MULAW_BFORMAT 1 -#define AL_FORMAT_BFORMAT2D_MULAW 0x10031 -#define AL_FORMAT_BFORMAT3D_MULAW 0x10032 -#endif - -#ifndef ALC_SOFT_HRTF -#define ALC_SOFT_HRTF 1 -#define ALC_HRTF_SOFT 0x1992 -#define ALC_DONT_CARE_SOFT 0x0002 -#define ALC_HRTF_STATUS_SOFT 0x1993 -#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 -#define ALC_NUM_HRTF_SPECIFIERS_SOFT 0x1994 -#define ALC_HRTF_SPECIFIER_SOFT 0x1995 -#define ALC_HRTF_ID_SOFT 0x1996 -typedef const ALCchar* (ALC_APIENTRY*LPALCGETSTRINGISOFT)(ALCdevice *device, ALCenum paramName, ALCsizei index); -typedef ALCboolean (ALC_APIENTRY*LPALCRESETDEVICESOFT)(ALCdevice *device, const ALCint *attribs); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API const ALCchar* ALC_APIENTRY alcGetStringiSOFT(ALCdevice *device, ALCenum paramName, ALCsizei index); -ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCint *attribs); -#endif -#endif - -#ifndef AL_SOFT_gain_clamp_ex -#define AL_SOFT_gain_clamp_ex 1 -#define AL_GAIN_LIMIT_SOFT 0x200E -#endif - -#ifndef AL_SOFT_source_resampler -#define AL_SOFT_source_resampler -#define AL_NUM_RESAMPLERS_SOFT 0x1210 -#define AL_DEFAULT_RESAMPLER_SOFT 0x1211 -#define AL_SOURCE_RESAMPLER_SOFT 0x1212 -#define AL_RESAMPLER_NAME_SOFT 0x1213 -typedef const ALchar* (AL_APIENTRY*LPALGETSTRINGISOFT)(ALenum pname, ALsizei index); -#ifdef AL_ALEXT_PROTOTYPES -AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index); -#endif -#endif - -#ifndef AL_SOFT_source_spatialize -#define AL_SOFT_source_spatialize -#define AL_SOURCE_SPATIALIZE_SOFT 0x1214 -#define AL_AUTO_SOFT 0x0002 -#endif - -#ifndef ALC_SOFT_output_limiter -#define ALC_SOFT_output_limiter -#define ALC_OUTPUT_LIMITER_SOFT 0x199A -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/third_party/windows/OpenAL/include/AL/efx-creative.h b/third_party/windows/OpenAL/include/AL/efx-creative.h deleted file mode 100644 index 0a04c98..0000000 --- a/third_party/windows/OpenAL/include/AL/efx-creative.h +++ /dev/null @@ -1,3 +0,0 @@ -/* The tokens that would be defined here are already defined in efx.h. This - * empty file is here to provide compatibility with Windows-based projects - * that would include it. */ diff --git a/third_party/windows/OpenAL/include/AL/efx-presets.h b/third_party/windows/OpenAL/include/AL/efx-presets.h deleted file mode 100644 index 8539fd5..0000000 --- a/third_party/windows/OpenAL/include/AL/efx-presets.h +++ /dev/null @@ -1,402 +0,0 @@ -/* Reverb presets for EFX */ - -#ifndef EFX_PRESETS_H -#define EFX_PRESETS_H - -#ifndef EFXEAXREVERBPROPERTIES_DEFINED -#define EFXEAXREVERBPROPERTIES_DEFINED -typedef struct { - float flDensity; - float flDiffusion; - float flGain; - float flGainHF; - float flGainLF; - float flDecayTime; - float flDecayHFRatio; - float flDecayLFRatio; - float flReflectionsGain; - float flReflectionsDelay; - float flReflectionsPan[3]; - float flLateReverbGain; - float flLateReverbDelay; - float flLateReverbPan[3]; - float flEchoTime; - float flEchoDepth; - float flModulationTime; - float flModulationDepth; - float flAirAbsorptionGainHF; - float flHFReference; - float flLFReference; - float flRoomRolloffFactor; - int iDecayHFLimit; -} EFXEAXREVERBPROPERTIES, *LPEFXEAXREVERBPROPERTIES; -#endif - -/* Default Presets */ - -#define EFX_REVERB_PRESET_GENERIC \ - { 1.0000f, 1.0000f, 0.3162f, 0.8913f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PADDEDCELL \ - { 0.1715f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.1700f, 0.1000f, 1.0000f, 0.2500f, 0.0010f, { 0.0000f, 0.0000f, 0.0000f }, 1.2691f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ROOM \ - { 0.4287f, 1.0000f, 0.3162f, 0.5929f, 1.0000f, 0.4000f, 0.8300f, 1.0000f, 0.1503f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.0629f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_BATHROOM \ - { 0.1715f, 1.0000f, 0.3162f, 0.2512f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.6531f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 3.2734f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_LIVINGROOM \ - { 0.9766f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.5000f, 0.1000f, 1.0000f, 0.2051f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2805f, 0.0040f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_STONEROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 2.3100f, 0.6400f, 1.0000f, 0.4411f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1003f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_AUDITORIUM \ - { 1.0000f, 1.0000f, 0.3162f, 0.5781f, 1.0000f, 4.3200f, 0.5900f, 1.0000f, 0.4032f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7170f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CONCERTHALL \ - { 1.0000f, 1.0000f, 0.3162f, 0.5623f, 1.0000f, 3.9200f, 0.7000f, 1.0000f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.9977f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CAVE \ - { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 2.9100f, 1.3000f, 1.0000f, 0.5000f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.7063f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_ARENA \ - { 1.0000f, 1.0000f, 0.3162f, 0.4477f, 1.0000f, 7.2400f, 0.3300f, 1.0000f, 0.2612f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.0186f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_HANGAR \ - { 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 10.0500f, 0.2300f, 1.0000f, 0.5000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2560f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CARPETEDHALLWAY \ - { 0.4287f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 0.3000f, 0.1000f, 1.0000f, 0.1215f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.1531f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_HALLWAY \ - { 0.3645f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 1.4900f, 0.5900f, 1.0000f, 0.2458f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.6615f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_STONECORRIDOR \ - { 1.0000f, 1.0000f, 0.3162f, 0.7612f, 1.0000f, 2.7000f, 0.7900f, 1.0000f, 0.2472f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 1.5758f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ALLEY \ - { 1.0000f, 0.3000f, 0.3162f, 0.7328f, 1.0000f, 1.4900f, 0.8600f, 1.0000f, 0.2500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.9954f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.9500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FOREST \ - { 1.0000f, 0.3000f, 0.3162f, 0.0224f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.0525f, 0.1620f, { 0.0000f, 0.0000f, 0.0000f }, 0.7682f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY \ - { 1.0000f, 0.5000f, 0.3162f, 0.3981f, 1.0000f, 1.4900f, 0.6700f, 1.0000f, 0.0730f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1427f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_MOUNTAINS \ - { 1.0000f, 0.2700f, 0.3162f, 0.0562f, 1.0000f, 1.4900f, 0.2100f, 1.0000f, 0.0407f, 0.3000f, { 0.0000f, 0.0000f, 0.0000f }, 0.1919f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_QUARRY \ - { 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0000f, 0.0610f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.7000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PLAIN \ - { 1.0000f, 0.2100f, 0.3162f, 0.1000f, 1.0000f, 1.4900f, 0.5000f, 1.0000f, 0.0585f, 0.1790f, { 0.0000f, 0.0000f, 0.0000f }, 0.1089f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PARKINGLOT \ - { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 1.6500f, 1.5000f, 1.0000f, 0.2082f, 0.0080f, { 0.0000f, 0.0000f, 0.0000f }, 0.2652f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_SEWERPIPE \ - { 0.3071f, 0.8000f, 0.3162f, 0.3162f, 1.0000f, 2.8100f, 0.1400f, 1.0000f, 1.6387f, 0.0140f, { 0.0000f, 0.0000f, 0.0000f }, 3.2471f, 0.0210f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_UNDERWATER \ - { 0.3645f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 1.4900f, 0.1000f, 1.0000f, 0.5963f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 7.0795f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 1.1800f, 0.3480f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRUGGED \ - { 0.4287f, 0.5000f, 0.3162f, 1.0000f, 1.0000f, 8.3900f, 1.3900f, 1.0000f, 0.8760f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 3.1081f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DIZZY \ - { 0.3645f, 0.6000f, 0.3162f, 0.6310f, 1.0000f, 17.2300f, 0.5600f, 1.0000f, 0.1392f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4937f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.8100f, 0.3100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PSYCHOTIC \ - { 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -/* Castle Presets */ - -#define EFX_REVERB_PRESET_CASTLE_SMALLROOM \ - { 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 1.2200f, 0.8300f, 0.3100f, 0.8913f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_SHORTPASSAGE \ - { 1.0000f, 0.8900f, 0.3162f, 0.3162f, 0.1000f, 2.3200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_MEDIUMROOM \ - { 1.0000f, 0.9300f, 0.3162f, 0.2818f, 0.1000f, 2.0400f, 0.8300f, 0.4600f, 0.6310f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1550f, 0.0300f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_LARGEROOM \ - { 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.1259f, 2.5300f, 0.8300f, 0.5000f, 0.4467f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1850f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_LONGPASSAGE \ - { 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 3.4200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_HALL \ - { 1.0000f, 0.8100f, 0.3162f, 0.2818f, 0.1778f, 3.1400f, 0.7900f, 0.6200f, 0.1778f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_CUPBOARD \ - { 1.0000f, 0.8900f, 0.3162f, 0.2818f, 0.1000f, 0.6700f, 0.8700f, 0.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 3.5481f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_COURTYARD \ - { 1.0000f, 0.4200f, 0.3162f, 0.4467f, 0.1995f, 2.1300f, 0.6100f, 0.2300f, 0.2239f, 0.1600f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3700f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_CASTLE_ALCOVE \ - { 1.0000f, 0.8900f, 0.3162f, 0.5012f, 0.1000f, 1.6400f, 0.8700f, 0.3100f, 1.0000f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -/* Factory Presets */ - -#define EFX_REVERB_PRESET_FACTORY_SMALLROOM \ - { 0.3645f, 0.8200f, 0.3162f, 0.7943f, 0.5012f, 1.7200f, 0.6500f, 1.3100f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.1190f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_SHORTPASSAGE \ - { 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 2.5300f, 0.6500f, 1.3100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_MEDIUMROOM \ - { 0.4287f, 0.8200f, 0.2512f, 0.7943f, 0.5012f, 2.7600f, 0.6500f, 1.3100f, 0.2818f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1740f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_LARGEROOM \ - { 0.4287f, 0.7500f, 0.2512f, 0.7079f, 0.6310f, 4.2400f, 0.5100f, 1.3100f, 0.1778f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2310f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_LONGPASSAGE \ - { 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 4.0600f, 0.6500f, 1.3100f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_HALL \ - { 0.4287f, 0.7500f, 0.3162f, 0.7079f, 0.6310f, 7.4300f, 0.5100f, 1.3100f, 0.0631f, 0.0730f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_CUPBOARD \ - { 0.3071f, 0.6300f, 0.2512f, 0.7943f, 0.5012f, 0.4900f, 0.6500f, 1.3100f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.1070f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_COURTYARD \ - { 0.3071f, 0.5700f, 0.3162f, 0.3162f, 0.6310f, 2.3200f, 0.2900f, 0.5600f, 0.2239f, 0.1400f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2900f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_ALCOVE \ - { 0.3645f, 0.5900f, 0.2512f, 0.7943f, 0.5012f, 3.1400f, 0.6500f, 1.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1140f, 0.1000f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -/* Ice Palace Presets */ - -#define EFX_REVERB_PRESET_ICEPALACE_SMALLROOM \ - { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 1.5100f, 1.5300f, 0.2700f, 0.8913f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1640f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_SHORTPASSAGE \ - { 1.0000f, 0.7500f, 0.3162f, 0.5623f, 0.2818f, 1.7900f, 1.4600f, 0.2800f, 0.5012f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_MEDIUMROOM \ - { 1.0000f, 0.8700f, 0.3162f, 0.5623f, 0.4467f, 2.2200f, 1.5300f, 0.3200f, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_LARGEROOM \ - { 1.0000f, 0.8100f, 0.3162f, 0.5623f, 0.4467f, 3.1400f, 1.5300f, 0.3200f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_LONGPASSAGE \ - { 1.0000f, 0.7700f, 0.3162f, 0.5623f, 0.3981f, 3.0100f, 1.4600f, 0.2800f, 0.7943f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.0400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_HALL \ - { 1.0000f, 0.7600f, 0.3162f, 0.4467f, 0.5623f, 5.4900f, 1.5300f, 0.3800f, 0.1122f, 0.0540f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0520f, { 0.0000f, 0.0000f, 0.0000f }, 0.2260f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_CUPBOARD \ - { 1.0000f, 0.8300f, 0.3162f, 0.5012f, 0.2239f, 0.7600f, 1.5300f, 0.2600f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1430f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_COURTYARD \ - { 1.0000f, 0.5900f, 0.3162f, 0.2818f, 0.3162f, 2.0400f, 1.2000f, 0.3800f, 0.3162f, 0.1730f, { 0.0000f, 0.0000f, 0.0000f }, 0.3162f, 0.0430f, { 0.0000f, 0.0000f, 0.0000f }, 0.2350f, 0.4800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_ALCOVE \ - { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 2.7600f, 1.4600f, 0.2800f, 1.1220f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1610f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -/* Space Station Presets */ - -#define EFX_REVERB_PRESET_SPACESTATION_SMALLROOM \ - { 0.2109f, 0.7000f, 0.3162f, 0.7079f, 0.8913f, 1.7200f, 0.8200f, 0.5500f, 0.7943f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 0.1880f, 0.2600f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_SHORTPASSAGE \ - { 0.2109f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 3.5700f, 0.5000f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1720f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_MEDIUMROOM \ - { 0.2109f, 0.7500f, 0.3162f, 0.6310f, 0.8913f, 3.0100f, 0.5000f, 0.5500f, 0.3981f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2090f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_LARGEROOM \ - { 0.3645f, 0.8100f, 0.3162f, 0.6310f, 0.8913f, 3.8900f, 0.3800f, 0.6100f, 0.3162f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2330f, 0.2800f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_LONGPASSAGE \ - { 0.4287f, 0.8200f, 0.3162f, 0.6310f, 0.8913f, 4.6200f, 0.6200f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_HALL \ - { 0.4287f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 7.1100f, 0.3800f, 0.6100f, 0.1778f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2500f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_CUPBOARD \ - { 0.1715f, 0.5600f, 0.3162f, 0.7079f, 0.8913f, 0.7900f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1810f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_ALCOVE \ - { 0.2109f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.1600f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1920f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -/* Wooden Galleon Presets */ - -#define EFX_REVERB_PRESET_WOODEN_SMALLROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.1122f, 0.3162f, 0.7900f, 0.3200f, 0.8700f, 1.0000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_SHORTPASSAGE \ - { 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.7500f, 0.5000f, 0.8700f, 0.8913f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_MEDIUMROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.2818f, 1.4700f, 0.4200f, 0.8200f, 0.8913f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_LARGEROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.2818f, 2.6500f, 0.3300f, 0.8200f, 0.8913f, 0.0660f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_LONGPASSAGE \ - { 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.3162f, 1.9900f, 0.4000f, 0.7900f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4467f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_HALL \ - { 1.0000f, 1.0000f, 0.3162f, 0.0794f, 0.2818f, 3.4500f, 0.3000f, 0.8200f, 0.8913f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_CUPBOARD \ - { 1.0000f, 1.0000f, 0.3162f, 0.1413f, 0.3162f, 0.5600f, 0.4600f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_COURTYARD \ - { 1.0000f, 0.6500f, 0.3162f, 0.0794f, 0.3162f, 1.7900f, 0.3500f, 0.7900f, 0.5623f, 0.1230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_ALCOVE \ - { 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.2200f, 0.6200f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -/* Sports Presets */ - -#define EFX_REVERB_PRESET_SPORT_EMPTYSTADIUM \ - { 1.0000f, 1.0000f, 0.3162f, 0.4467f, 0.7943f, 6.2600f, 0.5100f, 1.1000f, 0.0631f, 0.1830f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_SQUASHCOURT \ - { 1.0000f, 0.7500f, 0.3162f, 0.3162f, 0.7943f, 2.2200f, 0.9100f, 1.1600f, 0.4467f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1260f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL \ - { 1.0000f, 0.7000f, 0.3162f, 0.7943f, 0.8913f, 2.7600f, 1.2500f, 1.1400f, 0.6310f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_SPORT_LARGESWIMMINGPOOL \ - { 1.0000f, 0.8200f, 0.3162f, 0.7943f, 1.0000f, 5.4900f, 1.3100f, 1.1400f, 0.4467f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2220f, 0.5500f, 1.1590f, 0.2100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_SPORT_GYMNASIUM \ - { 1.0000f, 0.8100f, 0.3162f, 0.4467f, 0.8913f, 3.1400f, 1.0600f, 1.3500f, 0.3981f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0450f, { 0.0000f, 0.0000f, 0.0000f }, 0.1460f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_FULLSTADIUM \ - { 1.0000f, 1.0000f, 0.3162f, 0.0708f, 0.7943f, 5.2500f, 0.1700f, 0.8000f, 0.1000f, 0.1880f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_STADIUMTANNOY \ - { 1.0000f, 0.7800f, 0.3162f, 0.5623f, 0.5012f, 2.5300f, 0.8800f, 0.6800f, 0.2818f, 0.2300f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -/* Prefab Presets */ - -#define EFX_REVERB_PRESET_PREFAB_WORKSHOP \ - { 0.4287f, 1.0000f, 0.3162f, 0.1413f, 0.3981f, 0.7600f, 1.0000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PREFAB_SCHOOLROOM \ - { 0.4022f, 0.6900f, 0.3162f, 0.6310f, 0.5012f, 0.9800f, 0.4500f, 0.1800f, 1.4125f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PREFAB_PRACTISEROOM \ - { 0.4022f, 0.8700f, 0.3162f, 0.3981f, 0.5012f, 1.1200f, 0.5600f, 0.1800f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PREFAB_OUTHOUSE \ - { 1.0000f, 0.8200f, 0.3162f, 0.1122f, 0.1585f, 1.3800f, 0.3800f, 0.3500f, 0.8913f, 0.0240f, { 0.0000f, 0.0000f, -0.0000f }, 0.6310f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.1210f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PREFAB_CARAVAN \ - { 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.1259f, 0.4300f, 1.5000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -/* Dome and Pipe Presets */ - -#define EFX_REVERB_PRESET_DOME_TOMB \ - { 1.0000f, 0.7900f, 0.3162f, 0.3548f, 0.2239f, 4.1800f, 0.2100f, 0.1000f, 0.3868f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 1.6788f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PIPE_SMALL \ - { 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 5.0400f, 0.1000f, 0.1000f, 0.5012f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 2.5119f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DOME_SAINTPAULS \ - { 1.0000f, 0.8700f, 0.3162f, 0.3548f, 0.2239f, 10.4800f, 0.1900f, 0.1000f, 0.1778f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0420f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PIPE_LONGTHIN \ - { 0.2560f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 9.2100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PIPE_LARGE \ - { 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 8.4500f, 0.1000f, 0.1000f, 0.3981f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PIPE_RESONANT \ - { 0.1373f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 6.8100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } - -/* Outdoors Presets */ - -#define EFX_REVERB_PRESET_OUTDOORS_BACKYARD \ - { 1.0000f, 0.4500f, 0.3162f, 0.2512f, 0.5012f, 1.1200f, 0.3400f, 0.4600f, 0.4467f, 0.0690f, { 0.0000f, 0.0000f, -0.0000f }, 0.7079f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_ROLLINGPLAINS \ - { 1.0000f, 0.0000f, 0.3162f, 0.0112f, 0.6310f, 2.1300f, 0.2100f, 0.4600f, 0.1778f, 0.3000f, { 0.0000f, 0.0000f, -0.0000f }, 0.4467f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_DEEPCANYON \ - { 1.0000f, 0.7400f, 0.3162f, 0.1778f, 0.6310f, 3.8900f, 0.2100f, 0.4600f, 0.3162f, 0.2230f, { 0.0000f, 0.0000f, -0.0000f }, 0.3548f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_CREEK \ - { 1.0000f, 0.3500f, 0.3162f, 0.1778f, 0.5012f, 2.1300f, 0.2100f, 0.4600f, 0.3981f, 0.1150f, { 0.0000f, 0.0000f, -0.0000f }, 0.1995f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_VALLEY \ - { 1.0000f, 0.2800f, 0.3162f, 0.0282f, 0.1585f, 2.8800f, 0.2600f, 0.3500f, 0.1413f, 0.2630f, { 0.0000f, 0.0000f, -0.0000f }, 0.3981f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -/* Mood Presets */ - -#define EFX_REVERB_PRESET_MOOD_HEAVEN \ - { 1.0000f, 0.9400f, 0.3162f, 0.7943f, 0.4467f, 5.0400f, 1.1200f, 0.5600f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0800f, 2.7420f, 0.0500f, 0.9977f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_MOOD_HELL \ - { 1.0000f, 0.5700f, 0.3162f, 0.3548f, 0.4467f, 3.5700f, 0.4900f, 2.0000f, 0.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1100f, 0.0400f, 2.1090f, 0.5200f, 0.9943f, 5000.0000f, 139.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_MOOD_MEMORY \ - { 1.0000f, 0.8500f, 0.3162f, 0.6310f, 0.3548f, 4.0600f, 0.8200f, 0.5600f, 0.0398f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.4740f, 0.4500f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -/* Driving Presets */ - -#define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \ - { 1.0000f, 0.0000f, 0.3162f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_PITGARAGE \ - { 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DRIVING_INCAR_RACER \ - { 0.0832f, 0.8000f, 0.3162f, 1.0000f, 0.7943f, 0.1700f, 2.0000f, 0.4100f, 1.7783f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_INCAR_SPORTS \ - { 0.0832f, 0.8000f, 0.3162f, 0.6310f, 1.0000f, 0.1700f, 0.7500f, 0.4100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_INCAR_LUXURY \ - { 0.2560f, 1.0000f, 0.3162f, 0.1000f, 0.5012f, 0.1300f, 0.4100f, 0.4600f, 0.7943f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_FULLGRANDSTAND \ - { 1.0000f, 1.0000f, 0.3162f, 0.2818f, 0.6310f, 3.0100f, 1.3700f, 1.2800f, 0.3548f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.1778f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DRIVING_EMPTYGRANDSTAND \ - { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 0.7943f, 4.6200f, 1.7500f, 1.4000f, 0.2082f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DRIVING_TUNNEL \ - { 1.0000f, 0.8100f, 0.3162f, 0.3981f, 0.8913f, 3.4200f, 0.9400f, 1.3100f, 0.7079f, 0.0510f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.0500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 155.3000f, 0.0000f, 0x1 } - -/* City Presets */ - -#define EFX_REVERB_PRESET_CITY_STREETS \ - { 1.0000f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.7900f, 1.1200f, 0.9100f, 0.2818f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 0.1995f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY_SUBWAY \ - { 1.0000f, 0.7400f, 0.3162f, 0.7079f, 0.8913f, 3.0100f, 1.2300f, 0.9100f, 0.7079f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY_MUSEUM \ - { 1.0000f, 0.8200f, 0.3162f, 0.1778f, 0.1778f, 3.2800f, 1.4000f, 0.5700f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_CITY_LIBRARY \ - { 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.0891f, 2.7600f, 0.8900f, 0.4100f, 0.3548f, 0.0290f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_CITY_UNDERPASS \ - { 1.0000f, 0.8200f, 0.3162f, 0.4467f, 0.8913f, 3.5700f, 1.1200f, 0.9100f, 0.3981f, 0.0590f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1400f, 0.2500f, 0.0000f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY_ABANDONED \ - { 1.0000f, 0.6900f, 0.3162f, 0.7943f, 0.8913f, 3.2800f, 1.1700f, 0.9100f, 0.4467f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9966f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -/* Misc. Presets */ - -#define EFX_REVERB_PRESET_DUSTYROOM \ - { 0.3645f, 0.5600f, 0.3162f, 0.7943f, 0.7079f, 1.7900f, 0.3800f, 0.2100f, 0.5012f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0060f, { 0.0000f, 0.0000f, 0.0000f }, 0.2020f, 0.0500f, 0.2500f, 0.0000f, 0.9886f, 13046.0000f, 163.3000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CHAPEL \ - { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 1.0000f, 4.6200f, 0.6400f, 1.2300f, 0.4467f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.1100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SMALLWATERROOM \ - { 1.0000f, 0.7000f, 0.3162f, 0.4477f, 1.0000f, 1.5100f, 1.2500f, 1.1400f, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#endif /* EFX_PRESETS_H */ diff --git a/third_party/windows/OpenAL/include/AL/efx.h b/third_party/windows/OpenAL/include/AL/efx.h deleted file mode 100644 index 5776698..0000000 --- a/third_party/windows/OpenAL/include/AL/efx.h +++ /dev/null @@ -1,761 +0,0 @@ -#ifndef AL_EFX_H -#define AL_EFX_H - - -#include "alc.h" -#include "al.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, const ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint); -typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, const ALint*); -typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, const 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, const ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint); -typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, const ALint*); -typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, const 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, const ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, const ALint*); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, const 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, const 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, const ALint *piValues); -AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const 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, const 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, const ALint *piValues); -AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const 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, const 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, const ALint *piValues); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const 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 AL_LOWPASS_MIN_GAIN (0.0f) -#define AL_LOWPASS_MAX_GAIN (1.0f) -#define AL_LOWPASS_DEFAULT_GAIN (1.0f) - -#define AL_LOWPASS_MIN_GAINHF (0.0f) -#define AL_LOWPASS_MAX_GAINHF (1.0f) -#define AL_LOWPASS_DEFAULT_GAINHF (1.0f) - -/* Highpass filter */ -#define AL_HIGHPASS_MIN_GAIN (0.0f) -#define AL_HIGHPASS_MAX_GAIN (1.0f) -#define AL_HIGHPASS_DEFAULT_GAIN (1.0f) - -#define AL_HIGHPASS_MIN_GAINLF (0.0f) -#define AL_HIGHPASS_MAX_GAINLF (1.0f) -#define AL_HIGHPASS_DEFAULT_GAINLF (1.0f) - -/* Bandpass filter */ -#define AL_BANDPASS_MIN_GAIN (0.0f) -#define AL_BANDPASS_MAX_GAIN (1.0f) -#define AL_BANDPASS_DEFAULT_GAIN (1.0f) - -#define AL_BANDPASS_MIN_GAINHF (0.0f) -#define AL_BANDPASS_MAX_GAINHF (1.0f) -#define AL_BANDPASS_DEFAULT_GAINHF (1.0f) - -#define AL_BANDPASS_MIN_GAINLF (0.0f) -#define AL_BANDPASS_MAX_GAINLF (1.0f) -#define AL_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 */ diff --git a/third_party/windows/OpenAL/lib/OpenAL32.lib b/third_party/windows/OpenAL/lib/OpenAL32.lib deleted file mode 100644 index 2b9f4c1..0000000 Binary files a/third_party/windows/OpenAL/lib/OpenAL32.lib and /dev/null differ diff --git a/third_party/windows/Soloud/include/soloud.h b/third_party/windows/Soloud/include/soloud.h new file mode 100644 index 0000000..bc5c83d --- /dev/null +++ b/third_party/windows/Soloud/include/soloud.h @@ -0,0 +1,481 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_H +#define SOLOUD_H + +#include // rand +#include // sin + +#ifndef M_PI +#define M_PI 3.14159265359 +#endif + +#if defined(_WIN32)||defined(_WIN64) +#define WINDOWS_VERSION +#endif + +#if !defined(DISABLE_SIMD) +#if defined(__x86_64__) || defined( _M_X64 ) || defined( __i386 ) || defined( _M_IX86 ) +#define SOLOUD_SSE_INTRINSICS +#endif +#endif + +#define SOLOUD_VERSION 111 + +///////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////// +// Configuration defines + +// Maximum number of filters per stream +#define FILTERS_PER_STREAM 8 + +// Number of samples to process on one go +#define SAMPLE_GRANULARITY 512 + +// Maximum number of concurrent voices (hard limit is 4095) +#define VOICE_COUNT 1024 + +// Use linear resampler +#define RESAMPLER_LINEAR + +// 1)mono, 2)stereo 4)quad 6)5.1 +#define MAX_CHANNELS 6 + +// +///////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////// + +// Typedefs have to be made before the includes, as the +// includes depend on them. +namespace SoLoud +{ + class Soloud; + typedef void (*mutexCallFunction)(void *aMutexPtr); + typedef void (*soloudCallFunction)(Soloud *aSoloud); + typedef unsigned int result; + typedef unsigned int handle; + typedef double time; +}; + +namespace SoLoud +{ + // Class that handles aligned allocations to support vectorized operations + class AlignedFloatBuffer + { + public: + float *mData; // aligned pointer + unsigned char *mBasePtr; // raw allocated pointer (for delete) + + // ctor + AlignedFloatBuffer(); + // Allocate and align buffer + result init(unsigned int aFloats); + // dtor + ~AlignedFloatBuffer(); + }; +}; + +#include "soloud_filter.h" +#include "soloud_fader.h" +#include "soloud_audiosource.h" +#include "soloud_bus.h" +#include "soloud_error.h" + +namespace SoLoud +{ + + // Soloud core class. + class Soloud + { + public: + // Back-end data; content is up to the back-end implementation. + void * mBackendData; + // Pointer for the audio thread mutex. + void * mAudioThreadMutex; + // Called by SoLoud to shut down the back-end. If NULL, not called. Should be set by back-end. + soloudCallFunction mBackendCleanupFunc; + + // CTor + Soloud(); + // DTor + ~Soloud(); + + enum BACKENDS + { + AUTO = 0, + SDL, + SDL2, + PORTAUDIO, + WINMM, + XAUDIO2, + WASAPI, + ALSA, + OSS, + OPENAL, + COREAUDIO, + OPENSLES, + VITA_HOMEBREW, + NULLDRIVER, + BACKEND_MAX, + }; + + enum FLAGS + { + // Use round-off clipper + CLIP_ROUNDOFF = 1, + ENABLE_VISUALIZATION = 2, + LEFT_HANDED_3D = 4 + }; + + // Initialize SoLoud. Must be called before SoLoud can be used. + result init(unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aBackend = Soloud::AUTO, unsigned int aSamplerate = Soloud::AUTO, unsigned int aBufferSize = Soloud::AUTO, unsigned int aChannels = 2); + + // Deinitialize SoLoud. Must be called before shutting down. + void deinit(); + + // Query SoLoud version number (should equal to SOLOUD_VERSION macro) + unsigned int getVersion() const; + + // Translate error number to an asciiz string + const char * getErrorString(result aErrorCode) const; + + // Returns current backend ID (BACKENDS enum) + unsigned int getBackendId(); + // Returns current backend string. May be NULL. + const char * getBackendString(); + // Returns current backend channel count (1 mono, 2 stereo, etc) + unsigned int getBackendChannels(); + // Returns current backend sample rate + unsigned int getBackendSamplerate(); + // Returns current backend buffer size + unsigned int getBackendBufferSize(); + + // Set speaker position in 3d space + result setSpeakerPosition(unsigned int aChannel, float aX, float aY, float aZ); + + // Start playing a sound. Returns voice handle, which can be ignored or used to alter the playing sound's parameters. Negative volume means to use default. + handle play(AudioSource &aSound, float aVolume = -1.0f, float aPan = 0.0f, bool aPaused = 0, unsigned int aBus = 0); + // Start playing a sound delayed in relation to other sounds called via this function. Negative volume means to use default. + handle playClocked(time aSoundTime, AudioSource &aSound, float aVolume = -1.0f, float aPan = 0.0f, unsigned int aBus = 0); + // Start playing a 3d audio source + handle play3d(AudioSource &aSound, float aPosX, float aPosY, float aPosZ, float aVelX = 0.0f, float aVelY = 0.0f, float aVelZ = 0.0f, float aVolume = 1.0f, bool aPaused = 0, unsigned int aBus = 0); + // Start playing a 3d audio source, delayed in relation to other sounds called via this function. + handle play3dClocked(time aSoundTime, AudioSource &aSound, float aPosX, float aPosY, float aPosZ, float aVelX = 0.0f, float aVelY = 0.0f, float aVelZ = 0.0f, float aVolume = 1.0f, unsigned int aBus = 0); + // Start playing a sound without any panning. It will be played at full volume. + handle playBackground(AudioSource &aSound, float aVolume = -1.0f, bool aPaused = 0, unsigned int aBus = 0); + + // Seek the audio stream to certain point in time. Some streams can't seek backwards. Relative play speed affects time. + void seek(handle aVoiceHandle, time aSeconds); + // Stop the sound. + void stop(handle aVoiceHandle); + // Stop all voices. + void stopAll(); + // Stop all voices that play this sound source + void stopAudioSource(AudioSource &aSound); + + // Set a live filter parameter. Use 0 for the global filters. + void setFilterParameter(handle aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId, float aValue); + // Get a live filter parameter. Use 0 for the global filters. + float getFilterParameter(handle aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId); + // Fade a live filter parameter. Use 0 for the global filters. + void fadeFilterParameter(handle aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId, float aTo, time aTime); + // Oscillate a live filter parameter. Use 0 for the global filters. + void oscillateFilterParameter(handle aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId, float aFrom, float aTo, time aTime); + + // Get current play time, in seconds. + time getStreamTime(handle aVoiceHandle); + // Get current pause state. + bool getPause(handle aVoiceHandle); + // Get current volume. + float getVolume(handle aVoiceHandle); + // Get current overall volume (set volume * 3d volume) + float getOverallVolume(handle aVoiceHandle); + // Get current pan. + float getPan(handle aVoiceHandle); + // Get current sample rate. + float getSamplerate(handle aVoiceHandle); + // Get current voice protection state. + bool getProtectVoice(handle aVoiceHandle); + // Get the current number of busy voices. + unsigned int getActiveVoiceCount(); + // Get the current number of voices in SoLoud + unsigned int getVoiceCount(); + // Check if the handle is still valid, or if the sound has stopped. + bool isValidVoiceHandle(handle aVoiceHandle); + // Get current relative play speed. + float getRelativePlaySpeed(handle aVoiceHandle); + // Get current post-clip scaler value. + float getPostClipScaler() const; + // Get current global volume + float getGlobalVolume() const; + // Get current maximum active voice setting + unsigned int getMaxActiveVoiceCount() const; + // Query whether a voice is set to loop. + bool getLooping(handle aVoiceHandle); + + // Set voice's loop state + void setLooping(handle aVoiceHandle, bool aLooping); + // Set current maximum active voice setting + result setMaxActiveVoiceCount(unsigned int aVoiceCount); + // Set behavior for inaudible sounds + void setInaudibleBehavior(handle aVoiceHandle, bool aMustTick, bool aKill); + // Set the global volume + void setGlobalVolume(float aVolume); + // Set the post clip scaler value + void setPostClipScaler(float aScaler); + // Set the pause state + void setPause(handle aVoiceHandle, bool aPause); + // Pause all voices + void setPauseAll(bool aPause); + // Set the relative play speed + result setRelativePlaySpeed(handle aVoiceHandle, float aSpeed); + // Set the voice protection state + void setProtectVoice(handle aVoiceHandle, bool aProtect); + // Set the sample rate + void setSamplerate(handle aVoiceHandle, float aSamplerate); + // Set panning value; -1 is left, 0 is center, 1 is right + void setPan(handle aVoiceHandle, float aPan); + // Set absolute left/right volumes + void setPanAbsolute(handle aVoiceHandle, float aLVolume, float aRVolume, float aLBVolume = 0, float aRBVolume = 0, float aCVolume = 0, float aSVolume = 0); + // Set overall volume + void setVolume(handle aVoiceHandle, float aVolume); + // Set delay, in samples, before starting to play samples. Calling this on a live sound will cause glitches. + void setDelaySamples(handle aVoiceHandle, unsigned int aSamples); + + // Set up volume fader + void fadeVolume(handle aVoiceHandle, float aTo, time aTime); + // Set up panning fader + void fadePan(handle aVoiceHandle, float aTo, time aTime); + // Set up relative play speed fader + void fadeRelativePlaySpeed(handle aVoiceHandle, float aTo, time aTime); + // Set up global volume fader + void fadeGlobalVolume(float aTo, time aTime); + // Schedule a stream to pause + void schedulePause(handle aVoiceHandle, time aTime); + // Schedule a stream to stop + void scheduleStop(handle aVoiceHandle, time aTime); + + // Set up volume oscillator + void oscillateVolume(handle aVoiceHandle, float aFrom, float aTo, time aTime); + // Set up panning oscillator + void oscillatePan(handle aVoiceHandle, float aFrom, float aTo, time aTime); + // Set up relative play speed oscillator + void oscillateRelativePlaySpeed(handle aVoiceHandle, float aFrom, float aTo, time aTime); + // Set up global volume oscillator + void oscillateGlobalVolume(float aFrom, float aTo, time aTime); + + // Set global filters. Set to NULL to clear the filter. + void setGlobalFilter(unsigned int aFilterId, Filter *aFilter); + + // Enable or disable visualization data gathering + void setVisualizationEnable(bool aEnable); + + // Calculate and get 256 floats of FFT data for visualization. Visualization has to be enabled before use. + float *calcFFT(); + + // Get 256 floats of wave data for visualization. Visualization has to be enabled before use. + float *getWave(); + + // Get current loop count. Returns 0 if handle is not valid. (All audio sources may not update loop count) + unsigned int getLoopCount(handle aVoiceHandle); + + // Get audiosource-specific information from a voice. + float getInfo(handle aVoiceHandle, unsigned int aInfoKey); + + // Create a voice group. Returns 0 if unable (out of voice groups / out of memory) + handle createVoiceGroup(); + // Destroy a voice group. + result destroyVoiceGroup(handle aVoiceGroupHandle); + // Add a voice handle to a voice group + result addVoiceToGroup(handle aVoiceGroupHandle, handle aVoiceHandle); + // Is this handle a valid voice group? + bool isVoiceGroup(handle aVoiceGroupHandle); + // Is this voice group empty? + bool isVoiceGroupEmpty(handle aVoiceGroupHandle); + + // Perform 3d audio parameter update + void update3dAudio(); + + // Set the speed of sound constant for doppler + result set3dSoundSpeed(float aSpeed); + // Get the current speed of sound constant for doppler + float get3dSoundSpeed(); + // Set 3d listener parameters + void set3dListenerParameters(float aPosX, float aPosY, float aPosZ, float aAtX, float aAtY, float aAtZ, float aUpX, float aUpY, float aUpZ, float aVelocityX = 0.0f, float aVelocityY = 0.0f, float aVelocityZ = 0.0f); + // Set 3d listener position + void set3dListenerPosition(float aPosX, float aPosY, float aPosZ); + // Set 3d listener "at" vector + void set3dListenerAt(float aAtX, float aAtY, float aAtZ); + // set 3d listener "up" vector + void set3dListenerUp(float aUpX, float aUpY, float aUpZ); + // Set 3d listener velocity + void set3dListenerVelocity(float aVelocityX, float aVelocityY, float aVelocityZ); + + // Set 3d audio source parameters + void set3dSourceParameters(handle aVoiceHandle, float aPosX, float aPosY, float aPosZ, float aVelocityX = 0.0f, float aVelocityY = 0.0f, float aVelocityZ = 0.0f); + // Set 3d audio source position + void set3dSourcePosition(handle aVoiceHandle, float aPosX, float aPosY, float aPosZ); + // Set 3d audio source velocity + void set3dSourceVelocity(handle aVoiceHandle, float aVelocityX, float aVelocityY, float aVelocityZ); + // Set 3d audio source min/max distance (distance < min means max volume) + void set3dSourceMinMaxDistance(handle aVoiceHandle, float aMinDistance, float aMaxDistance); + // Set 3d audio source attenuation parameters + void set3dSourceAttenuation(handle aVoiceHandle, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); + // Set 3d audio source doppler factor to reduce or enhance doppler effect. Default = 1.0 + void set3dSourceDopplerFactor(handle aVoiceHandle, float aDopplerFactor); + + // Rest of the stuff is used internally. + + // Returns mixed float samples in buffer. Called by the back-end, or user with null driver. + void mix(float *aBuffer, unsigned int aSamples); + // Returns mixed 16-bit signed integer samples in buffer. Called by the back-end, or user with null driver. + void mixSigned16(short *aBuffer, unsigned int aSamples); + public: + // Mix N samples * M channels. Called by other mix_ functions. + void mix_internal(unsigned int aSamples); + + // Handle rest of initialization (called from backend) + void postinit(unsigned int aSamplerate, unsigned int aBufferSize, unsigned int aFlags, unsigned int aChannels); + + // Update list of active voices + void calcActiveVoices(); + // Perform mixing for a specific bus + void mixBus(float *aBuffer, unsigned int aSamples, float *aScratch, unsigned int aBus, float aSamplerate, unsigned int aChannels); + // Max. number of active voices. Busses and tickable inaudibles also count against this. + unsigned int mMaxActiveVoices; + // Highest voice in use so far + unsigned int mHighestVoice; + // Scratch buffer, used for resampling. + AlignedFloatBuffer mScratch; + // Current size of the scratch, in samples. + unsigned int mScratchSize; + // Amount of scratch needed. + unsigned int mScratchNeeded; + // Output scratch buffer, used in mix_(). + AlignedFloatBuffer mOutputScratch; + // Audio voices. + AudioSourceInstance *mVoice[VOICE_COUNT]; + // Output sample rate (not float) + unsigned int mSamplerate; + // Output channel count + unsigned int mChannels; + // Current backend ID + unsigned int mBackendID; + // Current backend string + const char * mBackendString; + // Maximum size of output buffer; used to calculate needed scratch. + unsigned int mBufferSize; + // Flags; see Soloud::FLAGS + unsigned int mFlags; + // Global volume. Applied before clipping. + float mGlobalVolume; + // Post-clip scaler. Applied after clipping. + float mPostClipScaler; + // Current play index. Used to create audio handles. + unsigned int mPlayIndex; + // Current sound source index. Used to create sound source IDs. + unsigned int mAudioSourceID; + // Fader for the global volume. + Fader mGlobalVolumeFader; + // Global stream time, for the global volume fader. + time mStreamTime; + // Last time seen by the playClocked call + time mLastClockedTime; + // Global filter + Filter *mFilter[FILTERS_PER_STREAM]; + // Global filter instance + FilterInstance *mFilterInstance[FILTERS_PER_STREAM]; + // Find a free voice, stopping the oldest if no free voice is found. + int findFreeVoice(); + // Converts handle to voice, if the handle is valid. Returns -1 if not. + int getVoiceFromHandle(handle aVoiceHandle) const; + // Converts voice + playindex into handle + handle getHandleFromVoice(unsigned int aVoice) const; + // Stop voice (not handle). + void stopVoice(unsigned int aVoice); + // Set voice (not handle) pan. + void setVoicePan(unsigned int aVoice, float aPan); + // Set voice (not handle) relative play speed. + result setVoiceRelativePlaySpeed(unsigned int aVoice, float aSpeed); + // Set voice (not handle) volume. + void setVoiceVolume(unsigned int aVoice, float aVolume); + // Set voice (not handle) pause state. + void setVoicePause(unsigned int aVoice, int aPause); + // Update overall volume from set and 3d volumes + void updateVoiceVolume(unsigned int aVoice); + // Update overall relative play speed from set and 3d speeds + void updateVoiceRelativePlaySpeed(unsigned int aVoice); + // Perform 3d audio calculation for array of voices + void update3dVoices(unsigned int *aVoiceList, unsigned int aVoiceCount); + // Clip the samples in the buffer + void clip(AlignedFloatBuffer &aBuffer, AlignedFloatBuffer &aDestBuffer, unsigned int aSamples, float aVolume0, float aVolume1); + // Mono-mixed wave data for visualization and for visualization FFT input + float mVisualizationWaveData[256]; + // FFT output data + float mFFTData[256]; + // Snapshot of wave data for visualization + float mWaveData[256]; + + // 3d listener position + float m3dPosition[3]; + // 3d listener look-at + float m3dAt[3]; + // 3d listener up + float m3dUp[3]; + // 3d listener velocity + float m3dVelocity[3]; + // 3d speed of sound (for doppler) + float m3dSoundSpeed; + + // 3d position of speakers + float m3dSpeakerPosition[3 * MAX_CHANNELS]; + + // Data related to 3d processing, separate from AudioSource so we can do 3d calculations without audio mutex. + AudioSourceInstance3dData m3dData[VOICE_COUNT]; + + // For each voice group, first int is number of ints alocated. + unsigned int **mVoiceGroup; + unsigned int mVoiceGroupCount; + + // List of currently active voices + unsigned int mActiveVoice[VOICE_COUNT]; + // Number of currently active voices + unsigned int mActiveVoiceCount; + // Active voices list needs to be recalculated + bool mActiveVoiceDirty; + + // Remove all non-active voices from group + void trimVoiceGroup(handle aVoiceGroupHandle); + // Get pointer to the zero-terminated array of voice handles in a voice group + handle * voiceGroupHandleToArray(handle aVoiceGroupHandle) const; + + // Lock audio thread mutex. + void lockAudioMutex(); + // Unlock audio thread mutex. + void unlockAudioMutex(); + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_audiosource.h b/third_party/windows/Soloud/include/soloud_audiosource.h new file mode 100644 index 0000000..0b39bc2 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_audiosource.h @@ -0,0 +1,313 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_AUDIOSOURCE_H +#define SOLOUD_AUDIOSOURCE_H + +#include "soloud.h" +#include "soloud_fader.h" +#include "soloud_filter.h" + +namespace SoLoud +{ + class AudioSource; + class AudioSourceInstance; + class AudioSourceInstance3dData; + + struct AudioSourceResampleData + { + AudioSourceResampleData(); + ~AudioSourceResampleData(); + float *mBuffer; + }; + + class AudioCollider + { + public: + // Calculate volume multiplier. Assumed to return value between 0 and 1. + virtual float collide(Soloud *aSoloud, AudioSourceInstance3dData *aAudioInstance3dData, int aUserData) = 0; + }; + + class AudioAttenuator + { + public: + virtual float attenuate(float aDistance, float aMinDistance, float aMaxDistance, float aRolloffFactor) = 0; + }; + + class AudioSourceInstance3dData + { + public: + // ctor + AudioSourceInstance3dData(); + // Set settings from audiosource + void init(AudioSource &aSource); + // 3d position + float m3dPosition[3]; + // 3d velocity + float m3dVelocity[3]; + // 3d cone direction + /* + float m3dConeDirection[3]; + // 3d cone inner angle + float m3dConeInnerAngle; + // 3d cone outer angle + float m3dConeOuterAngle; + // 3d cone outer volume multiplier + float m3dConeOuterVolume; + */ + // 3d min distance + float m3dMinDistance; + // 3d max distance + float m3dMaxDistance; + // 3d attenuation rolloff factor + float m3dAttenuationRolloff; + // 3d attenuation model + unsigned int m3dAttenuationModel; + // 3d doppler factor + float m3dDopplerFactor; + // Pointer to a custom audio collider object + AudioCollider *mCollider; + // Pointer to a custom audio attenuator object + AudioAttenuator *mAttenuator; + // User data related to audio collider + int mColliderData; + + // Doppler sample rate multiplier + float mDopplerValue; + // Overall 3d volume + float m3dVolume; + // Channel volume + float mChannelVolume[MAX_CHANNELS]; + // Copy of flags + unsigned int mFlags; + // Latest handle for this voice + handle mHandle; + }; + + // Base class for audio instances + class AudioSourceInstance + { + public: + enum FLAGS + { + // This audio instance loops (if supported) + LOOPING = 1, + // This audio instance is protected - won't get stopped if we run out of voices + PROTECTED = 2, + // This audio instance is paused + PAUSED = 4, + // This audio instance is affected by 3d processing + PROCESS_3D = 8, + // This audio instance has listener-relative 3d coordinates + LISTENER_RELATIVE = 16, + // Currently inaudible + INAUDIBLE = 32, + // If inaudible, should be killed (default = don't kill kill) + INAUDIBLE_KILL = 64, + // If inaudible, should still be ticked (default = pause) + INAUDIBLE_TICK = 128 + }; + // Ctor + AudioSourceInstance(); + // Dtor + virtual ~AudioSourceInstance(); + // Play index; used to identify instances from handles + unsigned int mPlayIndex; + // Loop count + unsigned int mLoopCount; + // Flags; see AudioSourceInstance::FLAGS + unsigned int mFlags; + // Pan value, for getPan() + float mPan; + // Volume for each channel (panning) + float mChannelVolume[MAX_CHANNELS]; + // Set volume + float mSetVolume; + // Overall volume overall = set * 3d + float mOverallVolume; + // Base samplerate; samplerate = base samplerate * relative play speed + float mBaseSamplerate; + // Samplerate; samplerate = base samplerate * relative play speed + float mSamplerate; + // Number of channels this audio source produces + unsigned int mChannels; + // Relative play speed; samplerate = base samplerate * relative play speed + float mSetRelativePlaySpeed; + // Overall relative plays peed; overall = set * 3d + float mOverallRelativePlaySpeed; + // How long this stream has played, in seconds. + time mStreamTime; + // Fader for the audio panning + Fader mPanFader; + // Fader for the audio volume + Fader mVolumeFader; + // Fader for the relative play speed + Fader mRelativePlaySpeedFader; + // Fader used to schedule pausing of the stream + Fader mPauseScheduler; + // Fader used to schedule stopping of the stream + Fader mStopScheduler; + // Affected by some fader + int mActiveFader; + // Current channel volumes, used to ramp the volume changes to avoid clicks + float mCurrentChannelVolume[MAX_CHANNELS]; + // ID of the sound source that generated this instance + unsigned int mAudioSourceID; + // Handle of the bus this audio instance is playing on. 0 for root. + unsigned int mBusHandle; + // Filter pointer + FilterInstance *mFilter[FILTERS_PER_STREAM]; + // Initialize instance. Mostly internal use. + void init(AudioSource &aSource, int aPlayIndex); + // Buffers for the resampler + AudioSourceResampleData *mResampleData[2]; + // Sub-sample playhead; 16.16 fixed point + unsigned int mSrcOffset; + // Samples left over from earlier pass + unsigned int mLeftoverSamples; + // Number of samples to delay streaming + unsigned int mDelaySamples; + + // Get N samples from the stream to the buffer + virtual void getAudio(float *aBuffer, unsigned int aSamples) = 0; + // Has the stream ended? + virtual bool hasEnded() = 0; + // Seek to certain place in the stream. Base implementation is generic "tape" seek (and slow). + virtual void seek(time aSeconds, float *mScratch, unsigned int mScratchSize); + // Rewind stream. Base implementation returns NOT_IMPLEMENTED, meaning it can't rewind. + virtual result rewind(); + // Get information. Returns 0 by default. + virtual float getInfo(unsigned int aInfoKey); + }; + + class Soloud; + + // Base class for audio sources + class AudioSource + { + public: + enum FLAGS + { + // The instances from this audio source should loop + SHOULD_LOOP = 1, + // Only one instance of this audio source should play at the same time + SINGLE_INSTANCE = 2, + // Visualization data gathering enabled. Only for busses. + VISUALIZATION_DATA = 4, + // Audio instances created from this source are affected by 3d processing + PROCESS_3D = 8, + // Audio instances created from this source have listener-relative 3d coordinates + LISTENER_RELATIVE = 16, + // Delay start of sound by the distance from listener + DISTANCE_DELAY = 32, + // If inaudible, should be killed (default) + INAUDIBLE_KILL = 64, + // If inaudible, should still be ticked (default = pause) + INAUDIBLE_TICK = 128 + }; + enum ATTENUATION_MODELS + { + // No attenuation + NO_ATTENUATION = 0, + // Inverse distance attenuation model + INVERSE_DISTANCE = 1, + // Linear distance attenuation model + LINEAR_DISTANCE = 2, + // Exponential distance attenuation model + EXPONENTIAL_DISTANCE = 3 + }; + + // Flags. See AudioSource::FLAGS + unsigned int mFlags; + // Base sample rate, used to initialize instances + float mBaseSamplerate; + // Default volume for created instances + float mVolume; + // Number of channels this audio source produces + unsigned int mChannels; + // Sound source ID. Assigned by SoLoud the first time it's played. + unsigned int mAudioSourceID; + // 3d min distance + float m3dMinDistance; + // 3d max distance + float m3dMaxDistance; + // 3d attenuation rolloff factor + float m3dAttenuationRolloff; + // 3d attenuation model + unsigned int m3dAttenuationModel; + // 3d doppler factor + float m3dDopplerFactor; + // Filter pointer + Filter *mFilter[FILTERS_PER_STREAM]; + // Pointer to the Soloud object. Needed to stop all instances in dtor. + Soloud *mSoloud; + // Pointer to a custom audio collider object + AudioCollider *mCollider; + // Pointer to custom attenuator object + AudioAttenuator *mAttenuator; + // User data related to audio collider + int mColliderData; + + // CTor + AudioSource(); + // Set default volume for instances + void setVolume(float aVolume); + // Set the looping of the instances created from this audio source + void setLooping(bool aLoop); + // Set whether only one instance of this sound should ever be playing at the same time + void setSingleInstance(bool aSingleInstance); + + // Set the minimum and maximum distances for 3d audio source (closer to min distance = max vol) + void set3dMinMaxDistance(float aMinDistance, float aMaxDistance); + // Set attenuation model and rolloff factor for 3d audio source + void set3dAttenuation(unsigned int aAttenuationModel, float aAttenuationRolloffFactor); + // Set doppler factor to reduce or enhance doppler effect, default = 1.0 + void set3dDopplerFactor(float aDopplerFactor); + // Enable 3d processing. Implicitly set by play3d calls. + void set3dProcessing(bool aDo3dProcessing); + // Set the coordinates for this audio source to be relative to listener's coordinates. + void set3dListenerRelative(bool aListenerRelative); + // Enable delaying the start of the sound based on the distance. + void set3dDistanceDelay(bool aDistanceDelay); + + // Set a custom 3d audio collider. Set to NULL to disable. + void set3dCollider(AudioCollider *aCollider, int aUserData = 0); + // Set a custom attenuator. Set to NULL to disable. + void set3dAttenuator(AudioAttenuator *aAttenuator); + + // Set behavior for inaudible sounds + void setInaudibleBehavior(bool aMustTick, bool aKill); + + // Set filter. Set to NULL to clear the filter. + virtual void setFilter(unsigned int aFilterId, Filter *aFilter); + // DTor + virtual ~AudioSource(); + // Create instance from the audio source. Called from within Soloud class. + virtual AudioSourceInstance *createInstance() = 0; + // Stop all instances of this audio source + void stop(); + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_bassboostfilter.h b/third_party/windows/Soloud/include/soloud_bassboostfilter.h new file mode 100644 index 0000000..ec91b04 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_bassboostfilter.h @@ -0,0 +1,63 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_BASSBOOSTFILTER_H +#define SOLOUD_BASSBOOSTFILTER_H + +#include "soloud.h" +#include "soloud_fftfilter.h" + +namespace SoLoud +{ + class BassboostFilter; + + class BassboostFilterInstance : public FFTFilterInstance + { + enum FILTERATTRIBUTE + { + WET = 0, + BOOST = 1 + }; + BassboostFilter *mParent; + public: + virtual void fftFilterChannel(float *aFFTBuffer, unsigned int aSamples, float aSamplerate, time aTime, unsigned int aChannel, unsigned int aChannels); + BassboostFilterInstance(BassboostFilter *aParent); + }; + + class BassboostFilter : public FFTFilter + { + public: + enum FILTERATTRIBUTE + { + WET = 0, + BOOST = 1 + }; + float mBoost; + result setParams(float aBoost); + virtual FilterInstance *createInstance(); + BassboostFilter(); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_biquadresonantfilter.h b/third_party/windows/Soloud/include/soloud_biquadresonantfilter.h new file mode 100644 index 0000000..cdf4a45 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_biquadresonantfilter.h @@ -0,0 +1,91 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_BQRFILTER_H +#define SOLOUD_BQRFILTER_H + +#include "soloud.h" + +namespace SoLoud +{ + class BiquadResonantFilter; + + struct BQRStateData + { + float mY1, mY2, mX1, mX2; + }; + + class BiquadResonantFilterInstance : public FilterInstance + { + enum FILTERATTRIBUTE + { + WET = 0, + SAMPLERATE = 1, + FREQUENCY = 2, + RESONANCE = 3 + }; + + int mActive; + BQRStateData mState[2]; + float mA0, mA1, mA2, mB1, mB2; + int mDirty; + int mFilterType; + + BiquadResonantFilter *mParent; + void calcBQRParams(); + public: + virtual void filterChannel(float *aBuffer, unsigned int aSamples, float aSamplerate, time aTime, unsigned int aChannel, unsigned int aChannels); + virtual ~BiquadResonantFilterInstance(); + BiquadResonantFilterInstance(BiquadResonantFilter *aParent); + }; + + class BiquadResonantFilter : public Filter + { + public: + enum FILTERTYPE + { + NONE = 0, + LOWPASS = 1, + HIGHPASS = 2, + BANDPASS = 3 + }; + enum FILTERATTRIBUTE + { + WET = 0, + SAMPLERATE = 1, + FREQUENCY = 2, + RESONANCE = 3 + }; + int mFilterType; + float mSampleRate; + float mFrequency; + float mResonance; + virtual BiquadResonantFilterInstance *createInstance(); + BiquadResonantFilter(); + result setParams(int aType, float aSampleRate, float aFrequency, float aResonance); + virtual ~BiquadResonantFilter(); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_bus.h b/third_party/windows/Soloud/include/soloud_bus.h new file mode 100644 index 0000000..495c154 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_bus.h @@ -0,0 +1,86 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_BUS_H +#define SOLOUD_BUS_H + +#include "soloud.h" + +namespace SoLoud +{ + class Bus; + + class BusInstance : public AudioSourceInstance + { + Bus *mParent; + unsigned int mScratchSize; + AlignedFloatBuffer mScratch; + public: + // Mono-mixed wave data for visualization and for visualization FFT input + float mVisualizationWaveData[256]; + + BusInstance(Bus *aParent); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual bool hasEnded(); + virtual ~BusInstance(); + }; + + class Bus : public AudioSource + { + public: + Bus(); + virtual BusInstance *createInstance(); + // Set filter. Set to NULL to clear the filter. + virtual void setFilter(unsigned int aFilterId, Filter *aFilter); + // Play sound through the bus + handle play(AudioSource &aSound, float aVolume = 1.0f, float aPan = 0.0f, bool aPaused = 0); + // Play sound through the bus, delayed in relation to other sounds called via this function. + handle playClocked(time aSoundTime, AudioSource &aSound, float aVolume = 1.0f, float aPan = 0.0f); + // Start playing a 3d audio source through the bus + handle play3d(AudioSource &aSound, float aPosX, float aPosY, float aPosZ, float aVelX = 0.0f, float aVelY = 0.0f, float aVelZ = 0.0f, float aVolume = 1.0f, bool aPaused = 0); + // Start playing a 3d audio source through the bus, delayed in relation to other sounds called via this function. + handle play3dClocked(time aSoundTime, AudioSource &aSound, float aPosX, float aPosY, float aPosZ, float aVelX = 0.0f, float aVelY = 0.0f, float aVelZ = 0.0f, float aVolume = 1.0f); + // Set number of channels for the bus (default 2) + result setChannels(unsigned int aChannels); + // Enable or disable visualization data gathering + void setVisualizationEnable(bool aEnable); + + // Calculate and get 256 floats of FFT data for visualization. Visualization has to be enabled before use. + float *calcFFT(); + + // Get 256 floats of wave data for visualization. Visualization has to be enabled before use. + float *getWave(); + public: + BusInstance *mInstance; + unsigned int mChannelHandle; + // FFT output data + float mFFTData[256]; + // Snapshot of wave data for visualization + float mWaveData[256]; + // Internal: find the bus' channel + void findBusHandle(); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_c.h b/third_party/windows/Soloud/include/soloud_c.h new file mode 100644 index 0000000..45dc57c --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_c.h @@ -0,0 +1,490 @@ +/* ************************************************** + * WARNING: this is a generated file. Do not edit. * + * Any edits will be overwritten by the generator. * + ************************************************** */ + +/* +SoLoud audio engine +Copyright (c) 2013-2016 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +/* SoLoud C-Api Code Generator (c)2013-2016 Jari Komppa http://iki.fi/sol/ */ + +#ifndef SOLOUD_C_H_INCLUDED +#define SOLOUD_C_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif +// Collected enumerations +enum SOLOUD_ENUMS +{ + SOLOUD_AUTO = 0, + SOLOUD_SDL = 1, + SOLOUD_SDL2 = 2, + SOLOUD_PORTAUDIO = 3, + SOLOUD_WINMM = 4, + SOLOUD_XAUDIO2 = 5, + SOLOUD_WASAPI = 6, + SOLOUD_ALSA = 7, + SOLOUD_OSS = 8, + SOLOUD_OPENAL = 9, + SOLOUD_COREAUDIO = 10, + SOLOUD_OPENSLES = 11, + SOLOUD_NULLDRIVER = 12, + SOLOUD_BACKEND_MAX = 13, + SOLOUD_CLIP_ROUNDOFF = 1, + SOLOUD_ENABLE_VISUALIZATION = 2, + SOLOUD_LEFT_HANDED_3D = 4, + BIQUADRESONANTFILTER_NONE = 0, + BIQUADRESONANTFILTER_LOWPASS = 1, + BIQUADRESONANTFILTER_HIGHPASS = 2, + BIQUADRESONANTFILTER_BANDPASS = 3, + BIQUADRESONANTFILTER_WET = 0, + BIQUADRESONANTFILTER_SAMPLERATE = 1, + BIQUADRESONANTFILTER_FREQUENCY = 2, + BIQUADRESONANTFILTER_RESONANCE = 3, + LOFIFILTER_WET = 0, + LOFIFILTER_SAMPLERATE = 1, + LOFIFILTER_BITDEPTH = 2, + BASSBOOSTFILTER_WET = 0, + BASSBOOSTFILTER_BOOST = 1, + SFXR_COIN = 0, + SFXR_LASER = 1, + SFXR_EXPLOSION = 2, + SFXR_POWERUP = 3, + SFXR_HURT = 4, + SFXR_JUMP = 5, + SFXR_BLIP = 6, + FLANGERFILTER_WET = 0, + FLANGERFILTER_DELAY = 1, + FLANGERFILTER_FREQ = 2, + MONOTONE_SQUARE = 0, + MONOTONE_SAW = 1, + MONOTONE_SIN = 2, + MONOTONE_SAWSIN = 3 +}; + +// Object handle typedefs +typedef void * AlignedFloatBuffer; +typedef void * Soloud; +typedef void * AudioCollider; +typedef void * AudioAttenuator; +typedef void * AudioSource; +typedef void * BiquadResonantFilter; +typedef void * LofiFilter; +typedef void * Bus; +typedef void * EchoFilter; +typedef void * Fader; +typedef void * FFTFilter; +typedef void * BassboostFilter; +typedef void * Filter; +typedef void * Speech; +typedef void * Wav; +typedef void * WavStream; +typedef void * Prg; +typedef void * Sfxr; +typedef void * FlangerFilter; +typedef void * DCRemovalFilter; +typedef void * Openmpt; +typedef void * Monotone; +typedef void * TedSid; +typedef void * File; + +/* + * Soloud + */ +void Soloud_destroy(Soloud * aSoloud); +Soloud * Soloud_create(); +int Soloud_init(Soloud * aSoloud); +int Soloud_initEx(Soloud * aSoloud, unsigned int aFlags /* = Soloud::CLIP_ROUNDOFF */, unsigned int aBackend /* = Soloud::AUTO */, unsigned int aSamplerate /* = Soloud::AUTO */, unsigned int aBufferSize /* = Soloud::AUTO */, unsigned int aChannels /* = 2 */); +void Soloud_deinit(Soloud * aSoloud); +unsigned int Soloud_getVersion(Soloud * aSoloud); +const char * Soloud_getErrorString(Soloud * aSoloud, int aErrorCode); +unsigned int Soloud_getBackendId(Soloud * aSoloud); +const char * Soloud_getBackendString(Soloud * aSoloud); +unsigned int Soloud_getBackendChannels(Soloud * aSoloud); +unsigned int Soloud_getBackendSamplerate(Soloud * aSoloud); +unsigned int Soloud_getBackendBufferSize(Soloud * aSoloud); +int Soloud_setSpeakerPosition(Soloud * aSoloud, unsigned int aChannel, float aX, float aY, float aZ); +unsigned int Soloud_play(Soloud * aSoloud, AudioSource * aSound); +unsigned int Soloud_playEx(Soloud * aSoloud, AudioSource * aSound, float aVolume /* = -1.0f */, float aPan /* = 0.0f */, int aPaused /* = 0 */, unsigned int aBus /* = 0 */); +unsigned int Soloud_playClocked(Soloud * aSoloud, double aSoundTime, AudioSource * aSound); +unsigned int Soloud_playClockedEx(Soloud * aSoloud, double aSoundTime, AudioSource * aSound, float aVolume /* = -1.0f */, float aPan /* = 0.0f */, unsigned int aBus /* = 0 */); +unsigned int Soloud_play3d(Soloud * aSoloud, AudioSource * aSound, float aPosX, float aPosY, float aPosZ); +unsigned int Soloud_play3dEx(Soloud * aSoloud, AudioSource * aSound, float aPosX, float aPosY, float aPosZ, float aVelX /* = 0.0f */, float aVelY /* = 0.0f */, float aVelZ /* = 0.0f */, float aVolume /* = 1.0f */, int aPaused /* = 0 */, unsigned int aBus /* = 0 */); +unsigned int Soloud_play3dClocked(Soloud * aSoloud, double aSoundTime, AudioSource * aSound, float aPosX, float aPosY, float aPosZ); +unsigned int Soloud_play3dClockedEx(Soloud * aSoloud, double aSoundTime, AudioSource * aSound, float aPosX, float aPosY, float aPosZ, float aVelX /* = 0.0f */, float aVelY /* = 0.0f */, float aVelZ /* = 0.0f */, float aVolume /* = 1.0f */, unsigned int aBus /* = 0 */); +void Soloud_seek(Soloud * aSoloud, unsigned int aVoiceHandle, double aSeconds); +void Soloud_stop(Soloud * aSoloud, unsigned int aVoiceHandle); +void Soloud_stopAll(Soloud * aSoloud); +void Soloud_stopAudioSource(Soloud * aSoloud, AudioSource * aSound); +void Soloud_setFilterParameter(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId, float aValue); +float Soloud_getFilterParameter(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId); +void Soloud_fadeFilterParameter(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId, float aTo, double aTime); +void Soloud_oscillateFilterParameter(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aFilterId, unsigned int aAttributeId, float aFrom, float aTo, double aTime); +double Soloud_getStreamTime(Soloud * aSoloud, unsigned int aVoiceHandle); +int Soloud_getPause(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getVolume(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getOverallVolume(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getPan(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getSamplerate(Soloud * aSoloud, unsigned int aVoiceHandle); +int Soloud_getProtectVoice(Soloud * aSoloud, unsigned int aVoiceHandle); +unsigned int Soloud_getActiveVoiceCount(Soloud * aSoloud); +unsigned int Soloud_getVoiceCount(Soloud * aSoloud); +int Soloud_isValidVoiceHandle(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getRelativePlaySpeed(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getPostClipScaler(Soloud * aSoloud); +float Soloud_getGlobalVolume(Soloud * aSoloud); +unsigned int Soloud_getMaxActiveVoiceCount(Soloud * aSoloud); +int Soloud_getLooping(Soloud * aSoloud, unsigned int aVoiceHandle); +void Soloud_setLooping(Soloud * aSoloud, unsigned int aVoiceHandle, int aLooping); +int Soloud_setMaxActiveVoiceCount(Soloud * aSoloud, unsigned int aVoiceCount); +void Soloud_setInaudibleBehavior(Soloud * aSoloud, unsigned int aVoiceHandle, int aMustTick, int aKill); +void Soloud_setGlobalVolume(Soloud * aSoloud, float aVolume); +void Soloud_setPostClipScaler(Soloud * aSoloud, float aScaler); +void Soloud_setPause(Soloud * aSoloud, unsigned int aVoiceHandle, int aPause); +void Soloud_setPauseAll(Soloud * aSoloud, int aPause); +int Soloud_setRelativePlaySpeed(Soloud * aSoloud, unsigned int aVoiceHandle, float aSpeed); +void Soloud_setProtectVoice(Soloud * aSoloud, unsigned int aVoiceHandle, int aProtect); +void Soloud_setSamplerate(Soloud * aSoloud, unsigned int aVoiceHandle, float aSamplerate); +void Soloud_setPan(Soloud * aSoloud, unsigned int aVoiceHandle, float aPan); +void Soloud_setPanAbsolute(Soloud * aSoloud, unsigned int aVoiceHandle, float aLVolume, float aRVolume); +void Soloud_setPanAbsoluteEx(Soloud * aSoloud, unsigned int aVoiceHandle, float aLVolume, float aRVolume, float aLBVolume /* = 0 */, float aRBVolume /* = 0 */, float aCVolume /* = 0 */, float aSVolume /* = 0 */); +void Soloud_setVolume(Soloud * aSoloud, unsigned int aVoiceHandle, float aVolume); +void Soloud_setDelaySamples(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aSamples); +void Soloud_fadeVolume(Soloud * aSoloud, unsigned int aVoiceHandle, float aTo, double aTime); +void Soloud_fadePan(Soloud * aSoloud, unsigned int aVoiceHandle, float aTo, double aTime); +void Soloud_fadeRelativePlaySpeed(Soloud * aSoloud, unsigned int aVoiceHandle, float aTo, double aTime); +void Soloud_fadeGlobalVolume(Soloud * aSoloud, float aTo, double aTime); +void Soloud_schedulePause(Soloud * aSoloud, unsigned int aVoiceHandle, double aTime); +void Soloud_scheduleStop(Soloud * aSoloud, unsigned int aVoiceHandle, double aTime); +void Soloud_oscillateVolume(Soloud * aSoloud, unsigned int aVoiceHandle, float aFrom, float aTo, double aTime); +void Soloud_oscillatePan(Soloud * aSoloud, unsigned int aVoiceHandle, float aFrom, float aTo, double aTime); +void Soloud_oscillateRelativePlaySpeed(Soloud * aSoloud, unsigned int aVoiceHandle, float aFrom, float aTo, double aTime); +void Soloud_oscillateGlobalVolume(Soloud * aSoloud, float aFrom, float aTo, double aTime); +void Soloud_setGlobalFilter(Soloud * aSoloud, unsigned int aFilterId, Filter * aFilter); +void Soloud_setVisualizationEnable(Soloud * aSoloud, int aEnable); +float * Soloud_calcFFT(Soloud * aSoloud); +float * Soloud_getWave(Soloud * aSoloud); +unsigned int Soloud_getLoopCount(Soloud * aSoloud, unsigned int aVoiceHandle); +float Soloud_getInfo(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aInfoKey); +unsigned int Soloud_createVoiceGroup(Soloud * aSoloud); +int Soloud_destroyVoiceGroup(Soloud * aSoloud, unsigned int aVoiceGroupHandle); +int Soloud_addVoiceToGroup(Soloud * aSoloud, unsigned int aVoiceGroupHandle, unsigned int aVoiceHandle); +int Soloud_isVoiceGroup(Soloud * aSoloud, unsigned int aVoiceGroupHandle); +int Soloud_isVoiceGroupEmpty(Soloud * aSoloud, unsigned int aVoiceGroupHandle); +void Soloud_update3dAudio(Soloud * aSoloud); +int Soloud_set3dSoundSpeed(Soloud * aSoloud, float aSpeed); +float Soloud_get3dSoundSpeed(Soloud * aSoloud); +void Soloud_set3dListenerParameters(Soloud * aSoloud, float aPosX, float aPosY, float aPosZ, float aAtX, float aAtY, float aAtZ, float aUpX, float aUpY, float aUpZ); +void Soloud_set3dListenerParametersEx(Soloud * aSoloud, float aPosX, float aPosY, float aPosZ, float aAtX, float aAtY, float aAtZ, float aUpX, float aUpY, float aUpZ, float aVelocityX /* = 0.0f */, float aVelocityY /* = 0.0f */, float aVelocityZ /* = 0.0f */); +void Soloud_set3dListenerPosition(Soloud * aSoloud, float aPosX, float aPosY, float aPosZ); +void Soloud_set3dListenerAt(Soloud * aSoloud, float aAtX, float aAtY, float aAtZ); +void Soloud_set3dListenerUp(Soloud * aSoloud, float aUpX, float aUpY, float aUpZ); +void Soloud_set3dListenerVelocity(Soloud * aSoloud, float aVelocityX, float aVelocityY, float aVelocityZ); +void Soloud_set3dSourceParameters(Soloud * aSoloud, unsigned int aVoiceHandle, float aPosX, float aPosY, float aPosZ); +void Soloud_set3dSourceParametersEx(Soloud * aSoloud, unsigned int aVoiceHandle, float aPosX, float aPosY, float aPosZ, float aVelocityX /* = 0.0f */, float aVelocityY /* = 0.0f */, float aVelocityZ /* = 0.0f */); +void Soloud_set3dSourcePosition(Soloud * aSoloud, unsigned int aVoiceHandle, float aPosX, float aPosY, float aPosZ); +void Soloud_set3dSourceVelocity(Soloud * aSoloud, unsigned int aVoiceHandle, float aVelocityX, float aVelocityY, float aVelocityZ); +void Soloud_set3dSourceMinMaxDistance(Soloud * aSoloud, unsigned int aVoiceHandle, float aMinDistance, float aMaxDistance); +void Soloud_set3dSourceAttenuation(Soloud * aSoloud, unsigned int aVoiceHandle, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Soloud_set3dSourceDopplerFactor(Soloud * aSoloud, unsigned int aVoiceHandle, float aDopplerFactor); +void Soloud_mix(Soloud * aSoloud, float * aBuffer, unsigned int aSamples); +void Soloud_mixSigned16(Soloud * aSoloud, short * aBuffer, unsigned int aSamples); + +/* + * AudioAttenuator + */ +void AudioAttenuator_destroy(AudioAttenuator * aAudioAttenuator); +float AudioAttenuator_attenuate(AudioAttenuator * aAudioAttenuator, float aDistance, float aMinDistance, float aMaxDistance, float aRolloffFactor); + +/* + * BiquadResonantFilter + */ +void BiquadResonantFilter_destroy(BiquadResonantFilter * aBiquadResonantFilter); +BiquadResonantFilter * BiquadResonantFilter_create(); +int BiquadResonantFilter_setParams(BiquadResonantFilter * aBiquadResonantFilter, int aType, float aSampleRate, float aFrequency, float aResonance); + +/* + * LofiFilter + */ +void LofiFilter_destroy(LofiFilter * aLofiFilter); +LofiFilter * LofiFilter_create(); +int LofiFilter_setParams(LofiFilter * aLofiFilter, float aSampleRate, float aBitdepth); + +/* + * Bus + */ +void Bus_destroy(Bus * aBus); +Bus * Bus_create(); +void Bus_setFilter(Bus * aBus, unsigned int aFilterId, Filter * aFilter); +unsigned int Bus_play(Bus * aBus, AudioSource * aSound); +unsigned int Bus_playEx(Bus * aBus, AudioSource * aSound, float aVolume /* = 1.0f */, float aPan /* = 0.0f */, int aPaused /* = 0 */); +unsigned int Bus_playClocked(Bus * aBus, double aSoundTime, AudioSource * aSound); +unsigned int Bus_playClockedEx(Bus * aBus, double aSoundTime, AudioSource * aSound, float aVolume /* = 1.0f */, float aPan /* = 0.0f */); +unsigned int Bus_play3d(Bus * aBus, AudioSource * aSound, float aPosX, float aPosY, float aPosZ); +unsigned int Bus_play3dEx(Bus * aBus, AudioSource * aSound, float aPosX, float aPosY, float aPosZ, float aVelX /* = 0.0f */, float aVelY /* = 0.0f */, float aVelZ /* = 0.0f */, float aVolume /* = 1.0f */, int aPaused /* = 0 */); +unsigned int Bus_play3dClocked(Bus * aBus, double aSoundTime, AudioSource * aSound, float aPosX, float aPosY, float aPosZ); +unsigned int Bus_play3dClockedEx(Bus * aBus, double aSoundTime, AudioSource * aSound, float aPosX, float aPosY, float aPosZ, float aVelX /* = 0.0f */, float aVelY /* = 0.0f */, float aVelZ /* = 0.0f */, float aVolume /* = 1.0f */); +int Bus_setChannels(Bus * aBus, unsigned int aChannels); +void Bus_setVisualizationEnable(Bus * aBus, int aEnable); +float * Bus_calcFFT(Bus * aBus); +float * Bus_getWave(Bus * aBus); +void Bus_setVolume(Bus * aBus, float aVolume); +void Bus_setLooping(Bus * aBus, int aLoop); +void Bus_set3dMinMaxDistance(Bus * aBus, float aMinDistance, float aMaxDistance); +void Bus_set3dAttenuation(Bus * aBus, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Bus_set3dDopplerFactor(Bus * aBus, float aDopplerFactor); +void Bus_set3dProcessing(Bus * aBus, int aDo3dProcessing); +void Bus_set3dListenerRelative(Bus * aBus, int aListenerRelative); +void Bus_set3dDistanceDelay(Bus * aBus, int aDistanceDelay); +void Bus_set3dCollider(Bus * aBus, AudioCollider * aCollider); +void Bus_set3dColliderEx(Bus * aBus, AudioCollider * aCollider, int aUserData /* = 0 */); +void Bus_set3dAttenuator(Bus * aBus, AudioAttenuator * aAttenuator); +void Bus_setInaudibleBehavior(Bus * aBus, int aMustTick, int aKill); +void Bus_stop(Bus * aBus); + +/* + * EchoFilter + */ +void EchoFilter_destroy(EchoFilter * aEchoFilter); +EchoFilter * EchoFilter_create(); +int EchoFilter_setParams(EchoFilter * aEchoFilter, float aDelay); +int EchoFilter_setParamsEx(EchoFilter * aEchoFilter, float aDelay, float aDecay /* = 0.7f */, float aFilter /* = 0.0f */); + +/* + * FFTFilter + */ +void FFTFilter_destroy(FFTFilter * aFFTFilter); +FFTFilter * FFTFilter_create(); + +/* + * BassboostFilter + */ +void BassboostFilter_destroy(BassboostFilter * aBassboostFilter); +int BassboostFilter_setParams(BassboostFilter * aBassboostFilter, float aBoost); +BassboostFilter * BassboostFilter_create(); + +/* + * Speech + */ +void Speech_destroy(Speech * aSpeech); +Speech * Speech_create(); +int Speech_setText(Speech * aSpeech, const char * aText); +void Speech_setVolume(Speech * aSpeech, float aVolume); +void Speech_setLooping(Speech * aSpeech, int aLoop); +void Speech_set3dMinMaxDistance(Speech * aSpeech, float aMinDistance, float aMaxDistance); +void Speech_set3dAttenuation(Speech * aSpeech, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Speech_set3dDopplerFactor(Speech * aSpeech, float aDopplerFactor); +void Speech_set3dProcessing(Speech * aSpeech, int aDo3dProcessing); +void Speech_set3dListenerRelative(Speech * aSpeech, int aListenerRelative); +void Speech_set3dDistanceDelay(Speech * aSpeech, int aDistanceDelay); +void Speech_set3dCollider(Speech * aSpeech, AudioCollider * aCollider); +void Speech_set3dColliderEx(Speech * aSpeech, AudioCollider * aCollider, int aUserData /* = 0 */); +void Speech_set3dAttenuator(Speech * aSpeech, AudioAttenuator * aAttenuator); +void Speech_setInaudibleBehavior(Speech * aSpeech, int aMustTick, int aKill); +void Speech_setFilter(Speech * aSpeech, unsigned int aFilterId, Filter * aFilter); +void Speech_stop(Speech * aSpeech); + +/* + * Wav + */ +void Wav_destroy(Wav * aWav); +Wav * Wav_create(); +int Wav_load(Wav * aWav, const char * aFilename); +int Wav_loadMem(Wav * aWav, unsigned char * aMem, unsigned int aLength); +int Wav_loadMemEx(Wav * aWav, unsigned char * aMem, unsigned int aLength, int aCopy /* = false */, int aTakeOwnership /* = true */); +int Wav_loadFile(Wav * aWav, File * aFile); +double Wav_getLength(Wav * aWav); +void Wav_setVolume(Wav * aWav, float aVolume); +void Wav_setLooping(Wav * aWav, int aLoop); +void Wav_set3dMinMaxDistance(Wav * aWav, float aMinDistance, float aMaxDistance); +void Wav_set3dAttenuation(Wav * aWav, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Wav_set3dDopplerFactor(Wav * aWav, float aDopplerFactor); +void Wav_set3dProcessing(Wav * aWav, int aDo3dProcessing); +void Wav_set3dListenerRelative(Wav * aWav, int aListenerRelative); +void Wav_set3dDistanceDelay(Wav * aWav, int aDistanceDelay); +void Wav_set3dCollider(Wav * aWav, AudioCollider * aCollider); +void Wav_set3dColliderEx(Wav * aWav, AudioCollider * aCollider, int aUserData /* = 0 */); +void Wav_set3dAttenuator(Wav * aWav, AudioAttenuator * aAttenuator); +void Wav_setInaudibleBehavior(Wav * aWav, int aMustTick, int aKill); +void Wav_setFilter(Wav * aWav, unsigned int aFilterId, Filter * aFilter); +void Wav_stop(Wav * aWav); + +/* + * WavStream + */ +void WavStream_destroy(WavStream * aWavStream); +WavStream * WavStream_create(); +int WavStream_load(WavStream * aWavStream, const char * aFilename); +int WavStream_loadMem(WavStream * aWavStream, unsigned char * aData, unsigned int aDataLen); +int WavStream_loadMemEx(WavStream * aWavStream, unsigned char * aData, unsigned int aDataLen, int aCopy /* = false */, int aTakeOwnership /* = true */); +int WavStream_loadToMem(WavStream * aWavStream, const char * aFilename); +int WavStream_loadFile(WavStream * aWavStream, File * aFile); +int WavStream_loadFileToMem(WavStream * aWavStream, File * aFile); +double WavStream_getLength(WavStream * aWavStream); +void WavStream_setVolume(WavStream * aWavStream, float aVolume); +void WavStream_setLooping(WavStream * aWavStream, int aLoop); +void WavStream_set3dMinMaxDistance(WavStream * aWavStream, float aMinDistance, float aMaxDistance); +void WavStream_set3dAttenuation(WavStream * aWavStream, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void WavStream_set3dDopplerFactor(WavStream * aWavStream, float aDopplerFactor); +void WavStream_set3dProcessing(WavStream * aWavStream, int aDo3dProcessing); +void WavStream_set3dListenerRelative(WavStream * aWavStream, int aListenerRelative); +void WavStream_set3dDistanceDelay(WavStream * aWavStream, int aDistanceDelay); +void WavStream_set3dCollider(WavStream * aWavStream, AudioCollider * aCollider); +void WavStream_set3dColliderEx(WavStream * aWavStream, AudioCollider * aCollider, int aUserData /* = 0 */); +void WavStream_set3dAttenuator(WavStream * aWavStream, AudioAttenuator * aAttenuator); +void WavStream_setInaudibleBehavior(WavStream * aWavStream, int aMustTick, int aKill); +void WavStream_setFilter(WavStream * aWavStream, unsigned int aFilterId, Filter * aFilter); +void WavStream_stop(WavStream * aWavStream); + +/* + * Prg + */ +void Prg_destroy(Prg * aPrg); +Prg * Prg_create(); +unsigned int Prg_rand(Prg * aPrg); +void Prg_srand(Prg * aPrg, int aSeed); + +/* + * Sfxr + */ +void Sfxr_destroy(Sfxr * aSfxr); +Sfxr * Sfxr_create(); +void Sfxr_resetParams(Sfxr * aSfxr); +int Sfxr_loadParams(Sfxr * aSfxr, const char * aFilename); +int Sfxr_loadParamsMem(Sfxr * aSfxr, unsigned char * aMem, unsigned int aLength); +int Sfxr_loadParamsMemEx(Sfxr * aSfxr, unsigned char * aMem, unsigned int aLength, int aCopy /* = false */, int aTakeOwnership /* = true */); +int Sfxr_loadParamsFile(Sfxr * aSfxr, File * aFile); +int Sfxr_loadPreset(Sfxr * aSfxr, int aPresetNo, int aRandSeed); +void Sfxr_setVolume(Sfxr * aSfxr, float aVolume); +void Sfxr_setLooping(Sfxr * aSfxr, int aLoop); +void Sfxr_set3dMinMaxDistance(Sfxr * aSfxr, float aMinDistance, float aMaxDistance); +void Sfxr_set3dAttenuation(Sfxr * aSfxr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Sfxr_set3dDopplerFactor(Sfxr * aSfxr, float aDopplerFactor); +void Sfxr_set3dProcessing(Sfxr * aSfxr, int aDo3dProcessing); +void Sfxr_set3dListenerRelative(Sfxr * aSfxr, int aListenerRelative); +void Sfxr_set3dDistanceDelay(Sfxr * aSfxr, int aDistanceDelay); +void Sfxr_set3dCollider(Sfxr * aSfxr, AudioCollider * aCollider); +void Sfxr_set3dColliderEx(Sfxr * aSfxr, AudioCollider * aCollider, int aUserData /* = 0 */); +void Sfxr_set3dAttenuator(Sfxr * aSfxr, AudioAttenuator * aAttenuator); +void Sfxr_setInaudibleBehavior(Sfxr * aSfxr, int aMustTick, int aKill); +void Sfxr_setFilter(Sfxr * aSfxr, unsigned int aFilterId, Filter * aFilter); +void Sfxr_stop(Sfxr * aSfxr); + +/* + * FlangerFilter + */ +void FlangerFilter_destroy(FlangerFilter * aFlangerFilter); +FlangerFilter * FlangerFilter_create(); +int FlangerFilter_setParams(FlangerFilter * aFlangerFilter, float aDelay, float aFreq); + +/* + * DCRemovalFilter + */ +void DCRemovalFilter_destroy(DCRemovalFilter * aDCRemovalFilter); +DCRemovalFilter * DCRemovalFilter_create(); +int DCRemovalFilter_setParams(DCRemovalFilter * aDCRemovalFilter); +int DCRemovalFilter_setParamsEx(DCRemovalFilter * aDCRemovalFilter, float aLength /* = 0.1f */); + +/* + * Openmpt + */ +void Openmpt_destroy(Openmpt * aOpenmpt); +Openmpt * Openmpt_create(); +int Openmpt_load(Openmpt * aOpenmpt, const char * aFilename); +int Openmpt_loadMem(Openmpt * aOpenmpt, unsigned char * aMem, unsigned int aLength); +int Openmpt_loadMemEx(Openmpt * aOpenmpt, unsigned char * aMem, unsigned int aLength, int aCopy /* = false */, int aTakeOwnership /* = true */); +int Openmpt_loadFile(Openmpt * aOpenmpt, File * aFile); +void Openmpt_setVolume(Openmpt * aOpenmpt, float aVolume); +void Openmpt_setLooping(Openmpt * aOpenmpt, int aLoop); +void Openmpt_set3dMinMaxDistance(Openmpt * aOpenmpt, float aMinDistance, float aMaxDistance); +void Openmpt_set3dAttenuation(Openmpt * aOpenmpt, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Openmpt_set3dDopplerFactor(Openmpt * aOpenmpt, float aDopplerFactor); +void Openmpt_set3dProcessing(Openmpt * aOpenmpt, int aDo3dProcessing); +void Openmpt_set3dListenerRelative(Openmpt * aOpenmpt, int aListenerRelative); +void Openmpt_set3dDistanceDelay(Openmpt * aOpenmpt, int aDistanceDelay); +void Openmpt_set3dCollider(Openmpt * aOpenmpt, AudioCollider * aCollider); +void Openmpt_set3dColliderEx(Openmpt * aOpenmpt, AudioCollider * aCollider, int aUserData /* = 0 */); +void Openmpt_set3dAttenuator(Openmpt * aOpenmpt, AudioAttenuator * aAttenuator); +void Openmpt_setInaudibleBehavior(Openmpt * aOpenmpt, int aMustTick, int aKill); +void Openmpt_setFilter(Openmpt * aOpenmpt, unsigned int aFilterId, Filter * aFilter); +void Openmpt_stop(Openmpt * aOpenmpt); + +/* + * Monotone + */ +void Monotone_destroy(Monotone * aMonotone); +Monotone * Monotone_create(); +int Monotone_setParams(Monotone * aMonotone, int aHardwareChannels); +int Monotone_setParamsEx(Monotone * aMonotone, int aHardwareChannels, int aWaveform /* = SQUARE */); +int Monotone_load(Monotone * aMonotone, const char * aFilename); +int Monotone_loadMem(Monotone * aMonotone, unsigned char * aMem, unsigned int aLength); +int Monotone_loadMemEx(Monotone * aMonotone, unsigned char * aMem, unsigned int aLength, int aCopy /* = false */, int aTakeOwnership /* = true */); +int Monotone_loadFile(Monotone * aMonotone, File * aFile); +void Monotone_setVolume(Monotone * aMonotone, float aVolume); +void Monotone_setLooping(Monotone * aMonotone, int aLoop); +void Monotone_set3dMinMaxDistance(Monotone * aMonotone, float aMinDistance, float aMaxDistance); +void Monotone_set3dAttenuation(Monotone * aMonotone, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void Monotone_set3dDopplerFactor(Monotone * aMonotone, float aDopplerFactor); +void Monotone_set3dProcessing(Monotone * aMonotone, int aDo3dProcessing); +void Monotone_set3dListenerRelative(Monotone * aMonotone, int aListenerRelative); +void Monotone_set3dDistanceDelay(Monotone * aMonotone, int aDistanceDelay); +void Monotone_set3dCollider(Monotone * aMonotone, AudioCollider * aCollider); +void Monotone_set3dColliderEx(Monotone * aMonotone, AudioCollider * aCollider, int aUserData /* = 0 */); +void Monotone_set3dAttenuator(Monotone * aMonotone, AudioAttenuator * aAttenuator); +void Monotone_setInaudibleBehavior(Monotone * aMonotone, int aMustTick, int aKill); +void Monotone_setFilter(Monotone * aMonotone, unsigned int aFilterId, Filter * aFilter); +void Monotone_stop(Monotone * aMonotone); + +/* + * TedSid + */ +void TedSid_destroy(TedSid * aTedSid); +TedSid * TedSid_create(); +int TedSid_load(TedSid * aTedSid, const char * aFilename); +int TedSid_loadToMem(TedSid * aTedSid, const char * aFilename); +int TedSid_loadMem(TedSid * aTedSid, unsigned char * aMem, unsigned int aLength); +int TedSid_loadMemEx(TedSid * aTedSid, unsigned char * aMem, unsigned int aLength, int aCopy /* = false */, int aTakeOwnership /* = true */); +int TedSid_loadFileToMem(TedSid * aTedSid, File * aFile); +int TedSid_loadFile(TedSid * aTedSid, File * aFile); +void TedSid_setVolume(TedSid * aTedSid, float aVolume); +void TedSid_setLooping(TedSid * aTedSid, int aLoop); +void TedSid_set3dMinMaxDistance(TedSid * aTedSid, float aMinDistance, float aMaxDistance); +void TedSid_set3dAttenuation(TedSid * aTedSid, unsigned int aAttenuationModel, float aAttenuationRolloffFactor); +void TedSid_set3dDopplerFactor(TedSid * aTedSid, float aDopplerFactor); +void TedSid_set3dProcessing(TedSid * aTedSid, int aDo3dProcessing); +void TedSid_set3dListenerRelative(TedSid * aTedSid, int aListenerRelative); +void TedSid_set3dDistanceDelay(TedSid * aTedSid, int aDistanceDelay); +void TedSid_set3dCollider(TedSid * aTedSid, AudioCollider * aCollider); +void TedSid_set3dColliderEx(TedSid * aTedSid, AudioCollider * aCollider, int aUserData /* = 0 */); +void TedSid_set3dAttenuator(TedSid * aTedSid, AudioAttenuator * aAttenuator); +void TedSid_setInaudibleBehavior(TedSid * aTedSid, int aMustTick, int aKill); +void TedSid_setFilter(TedSid * aTedSid, unsigned int aFilterId, Filter * aFilter); +void TedSid_stop(TedSid * aTedSid); +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // SOLOUD_C_H_INCLUDED + diff --git a/third_party/windows/Soloud/include/soloud_dcremovalfilter.h b/third_party/windows/Soloud/include/soloud_dcremovalfilter.h new file mode 100644 index 0000000..c9ecef1 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_dcremovalfilter.h @@ -0,0 +1,58 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_DCREMOVAL_H +#define SOLOUD_DCREMOVAL_H + +#include "soloud.h" + +namespace SoLoud +{ + class DCRemovalFilter; + + class DCRemovalFilterInstance : public FilterInstance + { + float *mBuffer; + float *mTotals; + int mBufferLength; + DCRemovalFilter *mParent; + int mOffset; + + public: + virtual void filter(float *aBuffer, unsigned int aSamples, unsigned int aChannels, float aSamplerate, time aTime); + virtual ~DCRemovalFilterInstance(); + DCRemovalFilterInstance(DCRemovalFilter *aParent); + }; + + class DCRemovalFilter : public Filter + { + public: + float mLength; + virtual FilterInstance *createInstance(); + DCRemovalFilter(); + result setParams(float aLength = 0.1f); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_echofilter.h b/third_party/windows/Soloud/include/soloud_echofilter.h new file mode 100644 index 0000000..a73dc50 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_echofilter.h @@ -0,0 +1,59 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_ECHOFILTER_H +#define SOLOUD_ECHOFILTER_H + +#include "soloud.h" + +namespace SoLoud +{ + class EchoFilter; + + class EchoFilterInstance : public FilterInstance + { + float *mBuffer; + int mBufferLength; + EchoFilter *mParent; + int mOffset; + + public: + virtual void filter(float *aBuffer, unsigned int aSamples, unsigned int aChannels, float aSamplerate, time aTime); + virtual ~EchoFilterInstance(); + EchoFilterInstance(EchoFilter *aParent); + }; + + class EchoFilter : public Filter + { + public: + float mDelay; + float mDecay; + float mFilter; + virtual FilterInstance *createInstance(); + EchoFilter(); + result setParams(float aDelay, float aDecay = 0.7f, float aFilter = 0.0f); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_error.h b/third_party/windows/Soloud/include/soloud_error.h new file mode 100644 index 0000000..a0be65d --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_error.h @@ -0,0 +1,41 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ +#ifndef SOLOUD_ERROR_H +#define SOLOUD_ERROR_H + +namespace SoLoud +{ + enum SOLOUD_ERRORS + { + SO_NO_ERROR = 0, // No error + INVALID_PARAMETER = 1, // Some parameter is invalid + FILE_NOT_FOUND = 2, // File not found + FILE_LOAD_FAILED = 3, // File found, but could not be loaded + DLL_NOT_FOUND = 4, // DLL not found, or wrong DLL + OUT_OF_MEMORY = 5, // Out of memory + NOT_IMPLEMENTED = 6, // Feature not implemented + UNKNOWN_ERROR = 7 // Other error + }; +}; +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_fader.h b/third_party/windows/Soloud/include/soloud_fader.h new file mode 100644 index 0000000..a4de6a6 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_fader.h @@ -0,0 +1,63 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_FADER_H +#define SOLOUD_FADER_H + +#include "soloud.h" + +namespace SoLoud +{ + // Helper class to process faders + class Fader + { + public: + // Value to fade from + float mFrom; + // Value to fade to + float mTo; + // Delta between from and to + float mDelta; + // Total time to fade + time mTime; + // Time fading started + time mStartTime; + // Time fading will end + time mEndTime; + // Current value. Used in case time rolls over. + float mCurrent; + // Active flag; 0 means disabled, 1 is active, 2 is LFO, -1 means was active, but stopped + int mActive; + // Ctor + Fader(); + // Set up LFO + void setLFO(float aFrom, float aTo, time aTime, time aStartTime); + // Set up fader + void set(float aFrom, float aTo, time aTime, time aStartTime); + // Get the current fading value + float get(time aCurrentTime); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_fft.h b/third_party/windows/Soloud/include/soloud_fft.h new file mode 100644 index 0000000..fcdc8f9 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_fft.h @@ -0,0 +1,45 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_FFT_H +#define SOLOUD_FFT_H + +#include "soloud.h" + +namespace SoLoud +{ + namespace FFT + { + // Perform 1024 unit FFT. Buffer must have 1024 floats, and will be overwritten + void fft1024(float *aBuffer); + + // Perform 256 unit FFT. Buffer must have 256 floats, and will be overwritten + void fft256(float *aBuffer); + + // Perform 256 unit IFFT. Buffer must have 256 floats, and will be overwritten + void ifft256(float *aBuffer); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_fftfilter.h b/third_party/windows/Soloud/include/soloud_fftfilter.h new file mode 100644 index 0000000..543ab3c --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_fftfilter.h @@ -0,0 +1,57 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_FFTFILTER_H +#define SOLOUD_FFTFILTER_H + +#include "soloud.h" + +namespace SoLoud +{ + class FFTFilter; + + class FFTFilterInstance : public FilterInstance + { + float *mTemp; + float *mInputBuffer; + float *mMixBuffer; + unsigned int mOffset[MAX_CHANNELS]; + FFTFilter *mParent; + public: + virtual void fftFilterChannel(float *aFFTBuffer, unsigned int aSamples, float aSamplerate, time aTime, unsigned int aChannel, unsigned int aChannels); + virtual void filterChannel(float *aBuffer, unsigned int aSamples, float aSamplerate, time aTime, unsigned int aChannel, unsigned int aChannels); + virtual ~FFTFilterInstance(); + FFTFilterInstance(FFTFilter *aParent); + FFTFilterInstance(); + }; + + class FFTFilter : public Filter + { + public: + virtual FilterInstance *createInstance(); + FFTFilter(); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_file.h b/third_party/windows/Soloud/include/soloud_file.h new file mode 100644 index 0000000..6b5cd6c --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_file.h @@ -0,0 +1,90 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_FILE_H +#define SOLOUD_FILE_H + +#include +#include "soloud.h" + +typedef void* Soloud_Filehack; + +namespace SoLoud +{ + class File + { + public: + virtual ~File() {} + unsigned int read8(); + unsigned int read16(); + unsigned int read32(); + virtual int eof() = 0; + virtual unsigned int read(unsigned char *aDst, unsigned int aBytes) = 0; + virtual unsigned int length() = 0; + virtual void seek(int aOffset) = 0; + virtual unsigned int pos() = 0; + virtual FILE * getFilePtr() { return 0; } + virtual unsigned char * getMemPtr() { return 0; } + }; + + class DiskFile : public File + { + public: + FILE *mFileHandle; + + virtual int eof(); + virtual unsigned int read(unsigned char *aDst, unsigned int aBytes); + virtual unsigned int length(); + virtual void seek(int aOffset); + virtual unsigned int pos(); + virtual ~DiskFile(); + DiskFile(); + DiskFile(FILE *fp); + result open(const char *aFilename); + virtual FILE * getFilePtr(); + }; + + class MemoryFile : public File + { + public: + unsigned char *mDataPtr; + unsigned int mDataLength; + unsigned int mOffset; + bool mDataOwned; + + virtual int eof(); + virtual unsigned int read(unsigned char *aDst, unsigned int aBytes); + virtual unsigned int length(); + virtual void seek(int aOffset); + virtual unsigned int pos(); + virtual unsigned char * getMemPtr(); + virtual ~MemoryFile(); + MemoryFile(); + result openMem(unsigned char *aData, unsigned int aDataLength, bool aCopy=false, bool aTakeOwnership=true); + result openToMem(const char *aFilename); + result openFileToMem(File *aFile); + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_file_hack_off.h b/third_party/windows/Soloud/include/soloud_file_hack_off.h new file mode 100644 index 0000000..6c75180 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_file_hack_off.h @@ -0,0 +1,35 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +/* +See soloud_file_hack_on.h +*/ + +#undef FILE +#undef fgetc +#undef fread +#undef fseek +#undef ftell +#undef fclose +#undef fopen diff --git a/third_party/windows/Soloud/include/soloud_file_hack_on.h b/third_party/windows/Soloud/include/soloud_file_hack_on.h new file mode 100644 index 0000000..a7efe99 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_file_hack_on.h @@ -0,0 +1,58 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +/* +This is a "hack" header to fool third party code to use our File stuff instead +of stdio FILE* stuff. +You can use soloud_file_hack_off.h to undef the stuff defined here. +*/ + +#ifndef SEEK_SET +#error soloud_file_hack_on must be included after stdio, otherwise the #define hacks will break stdio. +#endif + +typedef void* Soloud_Filehack; + +#ifdef __cplusplus +extern "C" { +#endif + +extern int Soloud_Filehack_fgetc(Soloud_Filehack *f); +extern int Soloud_Filehack_fread(void *dst, int s, int c, Soloud_Filehack *f); +extern int Soloud_Filehack_fseek(Soloud_Filehack *f, int idx, int base); +extern int Soloud_Filehack_ftell(Soloud_Filehack *f); +extern int Soloud_Filehack_fclose(Soloud_Filehack *f); +extern Soloud_Filehack * Soloud_Filehack_fopen(const char *aFilename, char *aMode); + +#ifdef __cplusplus +} +#endif + +#define FILE Soloud_Filehack +#define fgetc Soloud_Filehack_fgetc +#define fread Soloud_Filehack_fread +#define fseek Soloud_Filehack_fseek +#define ftell Soloud_Filehack_ftell +#define fclose Soloud_Filehack_fclose +#define fopen Soloud_Filehack_fopen diff --git a/third_party/windows/Soloud/include/soloud_filter.h b/third_party/windows/Soloud/include/soloud_filter.h new file mode 100644 index 0000000..887d3fa --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_filter.h @@ -0,0 +1,64 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_FILTER_H +#define SOLOUD_FILTER_H + +#include "soloud.h" + +namespace SoLoud +{ + class Fader; + + class FilterInstance + { + public: + unsigned int mNumParams; + unsigned int mParamChanged; + float *mParam; + Fader *mParamFader; + + + FilterInstance(); + virtual result initParams(int aNumParams); + virtual void updateParams(time aTime); + virtual void filter(float *aBuffer, unsigned int aSamples, unsigned int aChannels, float aSamplerate, time aTime); + virtual void filterChannel(float *aBuffer, unsigned int aSamples, float aSamplerate, time aTime, unsigned int aChannel, unsigned int aChannels); + virtual float getFilterParameter(unsigned int aAttributeId); + virtual void setFilterParameter(unsigned int aAttributeId, float aValue); + virtual void fadeFilterParameter(unsigned int aAttributeId, float aTo, time aTime, time aStartTime); + virtual void oscillateFilterParameter(unsigned int aAttributeId, float aFrom, float aTo, time aTime, time aStartTime); + virtual ~FilterInstance(); + }; + + class Filter + { + public: + Filter(); + virtual FilterInstance *createInstance() = 0; + virtual ~Filter(); + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_flangerfilter.h b/third_party/windows/Soloud/include/soloud_flangerfilter.h new file mode 100644 index 0000000..7eb4adb --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_flangerfilter.h @@ -0,0 +1,65 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_FLANGERFILTER_H +#define SOLOUD_FLANGERFILTER_H + +#include "soloud.h" + +namespace SoLoud +{ + class FlangerFilter; + + class FlangerFilterInstance : public FilterInstance + { + float *mBuffer; + int mBufferLength; + FlangerFilter *mParent; + int mOffset; + double mIndex; + + public: + virtual void filter(float *aBuffer, unsigned int aSamples, unsigned int aChannels, float aSamplerate, time aTime); + virtual ~FlangerFilterInstance(); + FlangerFilterInstance(FlangerFilter *aParent); + }; + + class FlangerFilter : public Filter + { + public: + enum FILTERPARAMS + { + WET, + DELAY, + FREQ + }; + float mDelay; + float mFreq; + virtual FilterInstance *createInstance(); + FlangerFilter(); + result setParams(float aDelay, float aFreq); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_internal.h b/third_party/windows/Soloud/include/soloud_internal.h new file mode 100644 index 0000000..d510693 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_internal.h @@ -0,0 +1,118 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_INTERNAL_H +#define SOLOUD_INTERNAL_H + +#include "soloud.h" + +namespace SoLoud +{ + // SDL back-end initialization call + result sdl_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // SDL "non-dynamic" back-end initialization call + result sdlstatic_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // SDL2 "non-dynamic" back-end initialization call + result sdl2static_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // OpenAL back-end initialization call + result openal_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // Core Audio driver back-end initialization call + result coreaudio_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // OpenSL ES back-end initialization call + result opensles_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // PortAudio back-end initialization call + result portaudio_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // WinMM back-end initialization call + result winmm_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 4096, unsigned int aChannels = 2); + + // XAudio2 back-end initialization call + result xaudio2_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // WASAPI back-end initialization call + result wasapi_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 4096, unsigned int aChannels = 2); + + // OSS back-end initialization call + result oss_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // PS Vita homebrew back-end initialization call + result vita_homebrew_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // ALSA back-end initialization call + result alsa_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // null driver back-end initialization call + result null_init(SoLoud::Soloud *aSoloud, unsigned int aFlags = Soloud::CLIP_ROUNDOFF, unsigned int aSamplerate = 44100, unsigned int aBuffer = 2048, unsigned int aChannels = 2); + + // Deinterlace samples in a buffer. From 12121212 to 11112222 + void deinterlace_samples_float(const float *aSourceBuffer, float *aDestBuffer, unsigned int aSamples, unsigned int aChannels); + + // Interlace samples in a buffer. From 11112222 to 12121212 + void interlace_samples_float(const float *aSourceBuffer, float *aDestBuffer, unsigned int aSamples, unsigned int aChannels); + + // Convert to 16-bit and interlace samples in a buffer. From 11112222 to 12121212 + void interlace_samples_s16(const float *aSourceBuffer, short *aDestBuffer, unsigned int aSamples, unsigned int aChannels); +}; + +#define FOR_ALL_VOICES_PRE \ + handle *h_ = NULL; \ + handle th_[2] = { aVoiceHandle, 0 }; \ + lockAudioMutex(); \ + h_ = voiceGroupHandleToArray(aVoiceHandle); \ + if (h_ == NULL) h_ = th_; \ + while (*h_) \ + { \ + int ch = getVoiceFromHandle(*h_); \ + if (ch != -1) \ + { + +#define FOR_ALL_VOICES_POST \ + } \ + h_++; \ + } \ + unlockAudioMutex(); + +#define FOR_ALL_VOICES_PRE_3D \ + handle *h_ = NULL; \ + handle th_[2] = { aVoiceHandle, 0 }; \ + h_ = voiceGroupHandleToArray(aVoiceHandle); \ + if (h_ == NULL) h_ = th_; \ + while (*h_) \ + { \ + int ch = (*h_ & 0xfff) - 1; \ + if (ch != -1 && m3dData[ch].mHandle == *h_) \ + { + +#define FOR_ALL_VOICES_POST_3D \ + } \ + h_++; \ + } + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_lofifilter.h b/third_party/windows/Soloud/include/soloud_lofifilter.h new file mode 100644 index 0000000..627ab6c --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_lofifilter.h @@ -0,0 +1,75 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_LOFIFILTER_H +#define SOLOUD_LOFIFILTER_H + +#include "soloud.h" + +namespace SoLoud +{ + class LofiFilter; + + struct LofiChannelData + { + float mSample; + float mSamplesToSkip; + }; + + class LofiFilterInstance : public FilterInstance + { + enum FILTERPARAMS + { + WET, + SAMPLERATE, + BITDEPTH + }; + LofiChannelData mChannelData[2]; + + LofiFilter *mParent; + public: + virtual void filterChannel(float *aBuffer, unsigned int aSamples, float aSamplerate, time aTime, unsigned int aChannel, unsigned int aChannels); + virtual ~LofiFilterInstance(); + LofiFilterInstance(LofiFilter *aParent); + }; + + class LofiFilter : public Filter + { + public: + enum FILTERPARAMS + { + WET, + SAMPLERATE, + BITDEPTH + }; + float mSampleRate; + float mBitdepth; + virtual LofiFilterInstance *createInstance(); + LofiFilter(); + result setParams(float aSampleRate, float aBitdepth); + virtual ~LofiFilter(); + }; +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_monotone.h b/third_party/windows/Soloud/include/soloud_monotone.h new file mode 100644 index 0000000..d86ca92 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_monotone.h @@ -0,0 +1,116 @@ +/* +MONOTONE module for SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef MONOTONE_H +#define MONOTONE_H + +#include "soloud.h" + +namespace SoLoud +{ + class Monotone; + class File; + + struct MonotoneSong + { + char *mTitle; + char *mComment; + unsigned char mVersion; // must be 1 + unsigned char mTotalPatterns; + unsigned char mTotalTracks; + unsigned char mCellSize; // must be 2 for version 1 + unsigned char mOrder[256]; + unsigned int *mPatternData; // 64 rows * mTotalPatterns * mTotalTracks + }; + + struct MonotoneChannel + { + int mEnabled; + int mActive; + int mFreq[3]; + int mPortamento; + int mArpCounter; + int mArp; + int mLastNote; + int mPortamentoToNote; + int mVibrato; + int mVibratoIndex; + int mVibratoDepth; + int mVibratoSpeed; + }; + + struct MonotoneHardwareChannel + { + int mEnabled; + float mSamplePos; + float mSamplePosInc; + }; + + class MonotoneInstance : public AudioSourceInstance + { + Monotone *mParent; + public: + MonotoneChannel mChannel[12]; + MonotoneHardwareChannel mOutput[12]; + int mNextChannel; + int mTempo; // ticks / row. Tick = 60hz. Default 4. + int mOrder; + int mRow; + int mSampleCount; + int mRowTick; + + MonotoneInstance(Monotone *aParent); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual bool hasEnded(); + }; + + class Monotone : public AudioSource + { + public: + enum MONOTONE_WAVEFORMS + { + SQUARE = 0, + SAW = 1, + SIN = 2, + SAWSIN = 3 + }; + + int mNotesHz[800]; + int mVibTable[32]; + int mHardwareChannels; + int mWaveform; + MonotoneSong mSong; + Monotone(); + ~Monotone(); + result setParams(int aHardwareChannels, int aWaveform = SQUARE); + result load(const char *aFilename); + result loadMem(unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true); + result loadFile(File *aFile); + virtual AudioSourceInstance *createInstance(); + public: + void clear(); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_openmpt.h b/third_party/windows/Soloud/include/soloud_openmpt.h new file mode 100644 index 0000000..aa0fdbc --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_openmpt.h @@ -0,0 +1,62 @@ +/* +Openmpt module for SoLoud audio engine +Copyright (c) 2016 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef OPENMPT_H +#define OPENMPT_H + +#include "soloud.h" + +namespace SoLoud +{ + class Openmpt; + class File; + + class OpenmptInstance : public AudioSourceInstance + { + Openmpt *mParent; + void *mModfile; + int mPlaying; + + public: + OpenmptInstance(Openmpt *aParent); + virtual ~OpenmptInstance(); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual bool hasEnded(); + }; + + class Openmpt : public AudioSource + { + public: + char *mData; + unsigned int mDataLen; + Openmpt(); + virtual ~Openmpt(); + result load(const char* aFilename); + result loadMem(unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true); + result loadFile(File *aFile); + virtual AudioSourceInstance *createInstance(); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_sfxr.h b/third_party/windows/Soloud/include/soloud_sfxr.h new file mode 100644 index 0000000..dd3a5ce --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_sfxr.h @@ -0,0 +1,169 @@ +/* +SFXR module for SoLoud audio engine +Copyright (c) 2014 Jari Komppa +Based on code (c) by Tomas Pettersson, re-licensed under zlib by permission + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SFXR_H +#define SFXR_H + +#include "soloud.h" + +namespace SoLoud +{ + class File; + + class Prg + { + public: + // random generator + Prg(); + unsigned int state[16]; + unsigned int index; + unsigned int rand(); + void srand(int aSeed); + }; + + struct SfxrParams + { + int wave_type; + + float p_base_freq; + float p_freq_limit; + float p_freq_ramp; + float p_freq_dramp; + float p_duty; + float p_duty_ramp; + + float p_vib_strength; + float p_vib_speed; + float p_vib_delay; + + float p_env_attack; + float p_env_sustain; + float p_env_decay; + float p_env_punch; + + bool filter_on; + float p_lpf_resonance; + float p_lpf_freq; + float p_lpf_ramp; + float p_hpf_freq; + float p_hpf_ramp; + + float p_pha_offset; + float p_pha_ramp; + + float p_repeat_speed; + + float p_arp_speed; + float p_arp_mod; + + float master_vol; + + float sound_vol; + }; + + class Sfxr; + + class SfxrInstance : public AudioSourceInstance + { + Sfxr *mParent; + + Prg mRand; + SfxrParams mParams; + + bool playing_sample; + int phase; + double fperiod; + double fmaxperiod; + double fslide; + double fdslide; + int period; + float square_duty; + float square_slide; + int env_stage; + int env_time; + int env_length[3]; + float env_vol; + float fphase; + float fdphase; + int iphase; + float phaser_buffer[1024]; + int ipp; + float noise_buffer[32]; + float fltp; + float fltdp; + float fltw; + float fltw_d; + float fltdmp; + float fltphp; + float flthp; + float flthp_d; + float vib_phase; + float vib_speed; + float vib_amp; + int rep_time; + int rep_limit; + int arp_time; + int arp_limit; + double arp_mod; + + void resetSample(bool aRestart); + + public: + SfxrInstance(Sfxr *aParent); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual bool hasEnded(); + }; + + class Sfxr : public AudioSource + { + public: + SfxrParams mParams; + + enum SFXR_PRESETS + { + COIN, + LASER, + EXPLOSION, + POWERUP, + HURT, + JUMP, + BLIP + }; + + Prg mRand; + + Sfxr(); + virtual ~Sfxr(); + void resetParams(); + result loadParams(const char* aFilename); + result loadParamsMem(unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true); + result loadParamsFile(File *aFile); + + result loadPreset(int aPresetNo, int aRandSeed); + virtual AudioSourceInstance *createInstance(); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_speech.h b/third_party/windows/Soloud/include/soloud_speech.h new file mode 100644 index 0000000..680d1e0 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_speech.h @@ -0,0 +1,63 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ +#ifndef SOLOUD_SPEECH_H +#define SOLOUD_SPEECH_H + +#include "soloud.h" +#include "../src/audiosource/speech/darray.h" +#include "../src/audiosource/speech/klatt.h" +#include "../src/audiosource/speech/tts.h" + +namespace SoLoud +{ + class Speech; + + class Speech : public AudioSource + { + public: + int mFrames; + darray mElement; + Speech(); + result setText(const char *aText); + virtual ~Speech(); + virtual AudioSourceInstance *createInstance(); + }; + + class SpeechInstance : public AudioSourceInstance + { + klatt mSynth; + Speech *mParent; + short *mSample; + int mSampleCount; + int mOffset; + public: + SpeechInstance(Speech *aParent); + virtual ~SpeechInstance(); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual result rewind(); + virtual bool hasEnded(); + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_tedsid.h b/third_party/windows/Soloud/include/soloud_tedsid.h new file mode 100644 index 0000000..72d8748 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_tedsid.h @@ -0,0 +1,74 @@ +/* +TED/SID module for SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef TEDSID_H +#define TEDSID_H + +#include "soloud.h" + +class SIDsound; +class TED; + +namespace SoLoud +{ + class TedSid; + class File; + + class TedSidInstance : public AudioSourceInstance + { + TedSid *mParent; + SIDsound *mSID; + TED *mTED; + unsigned int mSampleCount; + int mNextReg; + int mNextVal; + int mRegValues[128]; + public: + + TedSidInstance(TedSid *aParent); + ~TedSidInstance(); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual void tick(); + virtual bool hasEnded(); + virtual float getInfo(unsigned int aInfoKey); + }; + + class TedSid : public AudioSource + { + public: + File *mFile; + int mModel; + bool mFileOwned; + TedSid(); + ~TedSid(); + result load(const char *aFilename); + result loadToMem(const char *aFilename); + result loadMem(unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true); + result loadFileToMem(File *aFile); + result loadFile(File *aFile); + virtual AudioSourceInstance *createInstance(); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_thread.h b/third_party/windows/Soloud/include/soloud_thread.h new file mode 100644 index 0000000..b89eb62 --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_thread.h @@ -0,0 +1,83 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2014 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_THREAD_H +#define SOLOUD_THREAD_H + +#include "soloud.h" + +namespace SoLoud +{ + namespace Thread + { + typedef void (*threadFunction)(void *aParam); + + struct ThreadHandleData; + typedef ThreadHandleData* ThreadHandle; + + void * createMutex(); + void destroyMutex(void *aHandle); + void lockMutex(void *aHandle); + void unlockMutex(void *aHandle); + + ThreadHandle createThread(threadFunction aThreadFunction, void *aParameter); + + void sleep(int aMSec); + void wait(ThreadHandle aThreadHandle); + void release(ThreadHandle aThreadHandle); + +#define MAX_THREADPOOL_TASKS 1024 + + class PoolTask + { + public: + virtual void work() = 0; + }; + + class Pool + { + public: + // Initialize and run thread pool. For thread count 0, work is done at addWork call. + void init(int aThreadCount); + // Ctor, sets known state + Pool(); + // Dtor. Waits for the threads to finish. Work may be unfinished. + ~Pool(); + // Add work to work list. Object is not automatically deleted when work is done. + void addWork(PoolTask *aTask); + // Called from worker thread to get a new task. Returns null if no work available. + PoolTask *getWork(); + public: + int mThreadCount; // number of threads + ThreadHandle *mThread; // array of thread handles + void *mWorkMutex; // mutex to protect task array/maxtask + PoolTask *mTaskArray[MAX_THREADPOOL_TASKS]; // pointers to tasks + int mMaxTask; // how many tasks are pending + int mRobin; // cyclic counter, used to pick jobs for threads + volatile int mRunning; // running flag, used to flag threads to stop + }; + } +} + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/include/soloud_vic.h b/third_party/windows/Soloud/include/soloud_vic.h new file mode 100644 index 0000000..dd8845c --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_vic.h @@ -0,0 +1,108 @@ +/* +SoLoud audio engine +Copyright (c) 2015 Jari Komppa + +VIC 6560/6561 sound chip emulator +Copyright (c) 2015 Petri Hakkinen + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_VIC_H +#define SOLOUD_VIC_H + +#include "soloud.h" + +/* +A very bare bones emulator for Commodore VIC-20 sound chip. Supports both PAL and NTSC models. +Bass, alto and soprano should be quite close to original vic, noise probably not so. + +The first three channels (bass, alto and soprano) are square waveform generators with 7-bit frequency. +The highest bit of each oscillator register switches the oscillator on/off. +The fourth oscillator generates a noise waveform. + +VIC-20 does not have per channel volume control, only global volume, +which you can change by setting audio source's volume. + +To get that authentic moldy VIC-20 sound, the audio source should be coupled with a biquad resonant filter +with the following params: type = LOWPASS, sample rate = 44100, frequency = 1500, resonance = 2.0. +*/ + +namespace SoLoud +{ + class Vic; + + class VicInstance : public AudioSourceInstance + { + public: + VicInstance(Vic *aParent); + ~VicInstance(); + + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual bool hasEnded(); + + private: + Vic* m_parent; + unsigned int m_phase[4]; + unsigned int m_noisePos; + }; + + class Vic : public AudioSource + { + public: + // VIC model + enum + { + PAL = 0, + NTSC, + }; + + // VIC sound registers + enum + { + BASS = 0, + ALTO, + SOPRANO, + NOISE, + MAX_REGS + }; + + Vic(); + virtual ~Vic(); + + void setModel(int model); + int getModel() const; + + void setRegister(int reg, unsigned char value) { m_regs[reg] = value; } + unsigned char getRegister(int reg) const { return m_regs[reg]; } + + virtual AudioSourceInstance *createInstance(); + + private: + friend class VicInstance; + + int m_model; + float m_clocks[4]; // base clock frequencies for oscillators, dependent on VIC model + unsigned char m_regs[MAX_REGS]; + unsigned char m_noise[8192]; + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_wav.h b/third_party/windows/Soloud/include/soloud_wav.h new file mode 100644 index 0000000..a76cf2f --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_wav.h @@ -0,0 +1,68 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_WAV_H +#define SOLOUD_WAV_H + +#include "soloud.h" + +struct stb_vorbis; + +namespace SoLoud +{ + class Wav; + class File; + + class WavInstance : public AudioSourceInstance + { + Wav *mParent; + unsigned int mOffset; + public: + WavInstance(Wav *aParent); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual result rewind(); + virtual bool hasEnded(); + }; + + class Wav : public AudioSource + { + result loadwav(File *aReader); + result loadogg(File *aReader); + result testAndLoadFile(File *aReader); + public: + float *mData; + unsigned int mSampleCount; + + Wav(); + virtual ~Wav(); + result load(const char *aFilename); + result loadMem(unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true); + result loadFile(File *aFile); + + virtual AudioSourceInstance *createInstance(); + time getLength(); + }; +}; + +#endif diff --git a/third_party/windows/Soloud/include/soloud_wavstream.h b/third_party/windows/Soloud/include/soloud_wavstream.h new file mode 100644 index 0000000..81ee17e --- /dev/null +++ b/third_party/windows/Soloud/include/soloud_wavstream.h @@ -0,0 +1,83 @@ +/* +SoLoud audio engine +Copyright (c) 2013-2015 Jari Komppa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef SOLOUD_WAVSTREAM_H +#define SOLOUD_WAVSTREAM_H + +#include +#include "soloud.h" + + +struct stb_vorbis; + +namespace SoLoud +{ + class WavStream; + class File; + + class WavStreamInstance : public AudioSourceInstance + { + WavStream *mParent; + unsigned int mOffset; + File *mFile; + stb_vorbis *mOgg; + unsigned int mOggFrameSize; + unsigned int mOggFrameOffset; + float **mOggOutputs; + public: + WavStreamInstance(WavStream *aParent); + virtual void getAudio(float *aBuffer, unsigned int aSamples); + virtual result rewind(); + virtual bool hasEnded(); + virtual ~WavStreamInstance(); + }; + + class WavStream : public AudioSource + { + result loadwav(File * fp); + result loadogg(File * fp); + public: + int mOgg; + char *mFilename; + File *mMemFile; + File *mStreamFile; + unsigned int mDataOffset; + unsigned int mBits; + unsigned int mSampleCount; + + WavStream(); + virtual ~WavStream(); + result load(const char *aFilename); + result loadMem(unsigned char *aData, unsigned int aDataLen, bool aCopy = false, bool aTakeOwnership = true); + result loadToMem(const char *aFilename); + result loadFile(File *aFile); + result loadFileToMem(File *aFile); + virtual AudioSourceInstance *createInstance(); + time getLength(); + public: + result parse(File *aFile); + }; +}; + +#endif \ No newline at end of file diff --git a/third_party/windows/Soloud/lib/soloud_x64.dll b/third_party/windows/Soloud/lib/soloud_x64.dll new file mode 100644 index 0000000..e25c171 Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64.dll differ diff --git a/third_party/windows/Soloud/lib/soloud_x64.exp b/third_party/windows/Soloud/lib/soloud_x64.exp new file mode 100644 index 0000000..2db2ffc Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64.exp differ diff --git a/third_party/windows/Soloud/lib/soloud_x64.lib b/third_party/windows/Soloud/lib/soloud_x64.lib new file mode 100644 index 0000000..254d485 Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64.lib differ diff --git a/third_party/windows/Soloud/lib/soloud_x64_d.dll b/third_party/windows/Soloud/lib/soloud_x64_d.dll new file mode 100644 index 0000000..ebc68a9 Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64_d.dll differ diff --git a/third_party/windows/Soloud/lib/soloud_x64_d.exp b/third_party/windows/Soloud/lib/soloud_x64_d.exp new file mode 100644 index 0000000..1933887 Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64_d.exp differ diff --git a/third_party/windows/Soloud/lib/soloud_x64_d.ilk b/third_party/windows/Soloud/lib/soloud_x64_d.ilk new file mode 100644 index 0000000..b779c9a Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64_d.ilk differ diff --git a/third_party/windows/Soloud/lib/soloud_x64_d.lib b/third_party/windows/Soloud/lib/soloud_x64_d.lib new file mode 100644 index 0000000..627534b Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64_d.lib differ diff --git a/third_party/windows/Soloud/lib/soloud_x64_d.pdb b/third_party/windows/Soloud/lib/soloud_x64_d.pdb new file mode 100644 index 0000000..4258ee1 Binary files /dev/null and b/third_party/windows/Soloud/lib/soloud_x64_d.pdb differ