From 90dd6b61b45ff6049fac6491896bf84c0fa9b0ba Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 2 Feb 2016 10:29:23 +0200 Subject: [PATCH 1/3] Fixed build with Creative Labs OpenAL SDK Tested with * Creative OpenAL from https://www.openal.org/downloads/OpenAL11CoreSDK.zip * OpenAL Soft from http://kcat.strangesoft.net/openal-binaries/openal-soft-1.17.1-bin.zip --- src/sound/oalsound.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound/oalsound.h b/src/sound/oalsound.h index 4f6bae3968..de9789f221 100644 --- a/src/sound/oalsound.h +++ b/src/sound/oalsound.h @@ -7,6 +7,8 @@ #ifndef NO_OPENAL +#define AL_NO_PROTOTYPES + #include "al.h" #include "alc.h" From 0db679c90d54de0beffcad7a672fc9908724f866 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 2 Feb 2016 10:53:56 +0100 Subject: [PATCH 2/3] - fixed clang compile error. --- src/r_segs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index b738b1c10b..bca838cbec 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -227,6 +227,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2) sector_t tempsec; // killough 4/13/98 fixed_t texheight, texheightscale; bool notrelevant = false; + fixed_t rowoffset; const sector_t *sec; @@ -328,7 +329,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2) dc_texturemid = MIN (frontsector->GetPlaneTexZ(sector_t::ceiling), backsector->GetPlaneTexZ(sector_t::ceiling)); } - fixed_t rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid); + rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid); if (!(curline->linedef->flags & ML_WRAP_MIDTEX) && !(curline->sidedef->Flags & WALLF_WRAP_MIDTEX)) From c002c2fde912e5a4520228d96a56949c2bfe3d5f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 2 Feb 2016 14:45:32 +0100 Subject: [PATCH 3/3] - added a mastervolume setting for DUMB because its default volume is far less than all the other music options. --- src/sound/music_dumb.cpp | 3 ++- wadsrc/static/menudef.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sound/music_dumb.cpp b/src/sound/music_dumb.cpp index 8b196e7cda..1e9b6d6fc7 100644 --- a/src/sound/music_dumb.cpp +++ b/src/sound/music_dumb.cpp @@ -129,6 +129,7 @@ CVAR(Bool, mod_autochip, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); CVAR(Int, mod_autochip_size_force, 100, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); CVAR(Int, mod_autochip_size_scan, 500, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); CVAR(Int, mod_autochip_scan_threshold, 12, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); +CVAR(Float, mod_dumb_mastervolume, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); // PRIVATE DATA DEFINITIONS ------------------------------------------------ @@ -974,7 +975,7 @@ bool input_mod::read(SoundStream *stream, void *buffer, int sizebytes, void *use // Convert to float for (int i = 0; i < written * 2; ++i) { - ((float *)buffer)[i] = ((int *)buffer)[i] / (float)(1 << 24); + ((float *)buffer)[i] = (((int *)buffer)[i] / (float)(1 << 24)) * mod_dumb_mastervolume; } } buffer = (BYTE *)buffer + written * 8; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 073f16ef63..9bce780778 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1651,6 +1651,7 @@ OptionMenu ModReplayerOptions Title "MODULE REPLAYER OPTIONS" Option "Replayer engine", "mod_dumb", "ModReplayers" StaticText " " + Slider "Master Volume", "mod_dumb_mastervolume", 1, 32, 1, 1 Option "Sample rate", "mod_samplerate", "SampleRates", "mod_dumb" Option "Quality", "mod_interp", "ModQuality", "mod_dumb" Option "Volume ramping", "mod_volramp", "ModVolumeRamps", "mod_dumb"