From a0cffca3bb4938aa8d21509d994dfcdf6a6dd0c2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 12 Mar 2021 08:48:59 +0100 Subject: [PATCH] - restore accidentally deleted 'testmusicvol' CCMD. --- src/common/audio/music/i_music.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/common/audio/music/i_music.cpp b/src/common/audio/music/i_music.cpp index 08b8fcfd7..b73c630ca 100644 --- a/src/common/audio/music/i_music.cpp +++ b/src/common/audio/music/i_music.cpp @@ -270,6 +270,22 @@ void I_SetMusicVolume (double factor) I_SetRelativeVolume((float)factor); } +//========================================================================== +// +// test a relative music volume +// +//========================================================================== + +CCMD(testmusicvol) +{ + if (argv.argc() > 1) + { + I_SetRelativeVolume((float)strtod(argv[1], nullptr)); + } + else + Printf("Current relative volume is %1.2f\n", relative_volume); +} + //========================================================================== // // STAT music