diff --git a/src/sound/music_dumb.cpp b/src/sound/music_dumb.cpp index 8b196e7cd..1e9b6d6fc 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 073f16ef6..9bce78077 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"