mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'vol-cvar-defaults' into 'master'
Normalize all volume scales to 0-100 See merge request KartKrew/Kart!1030
This commit is contained in:
commit
253489b75c
3 changed files with 12 additions and 12 deletions
|
|
@ -748,10 +748,10 @@ extern int
|
|||
/// Render flats on walls
|
||||
#define WALLFLATS
|
||||
|
||||
/// Divide volume of music and sounds by this much (loudest sounds on earth)
|
||||
#define VOLUME_DIVIDER 4
|
||||
#define USER_VOLUME_SCALE 2
|
||||
#define MAX_VOLUME ( 100 * VOLUME_DIVIDER / USER_VOLUME_SCALE )
|
||||
// Volume scale is 0-100 in new mixer. 100 is treated as -0dB or 100% gain. No more weirdness to work around SDL_mixer
|
||||
// problems
|
||||
|
||||
#define MAX_VOLUME 100
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
#define MASTERSERVER
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ consvar_t stereoreverse = CVAR_INIT ("stereoreverse", "Off", CV_SAVE, CV_OnOff,
|
|||
static consvar_t precachesound = CVAR_INIT ("precachesound", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
// actual general (maximum) sound & music volume, saved into the config
|
||||
consvar_t cv_soundvolume = CVAR_INIT ("soundvolume", "50", CV_SAVE, soundvolume_cons_t, NULL);
|
||||
consvar_t cv_digmusicvolume = CVAR_INIT ("musicvolume", "50", CV_SAVE, soundvolume_cons_t, NULL);
|
||||
consvar_t cv_soundvolume = CVAR_INIT ("soundvolume", "80", CV_SAVE, soundvolume_cons_t, NULL);
|
||||
consvar_t cv_digmusicvolume = CVAR_INIT ("musicvolume", "80", CV_SAVE, soundvolume_cons_t, NULL);
|
||||
|
||||
// number of channels available
|
||||
consvar_t cv_numChannels = CVAR_INIT ("snd_channels", "64", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum);
|
||||
|
|
@ -791,9 +791,9 @@ void S_UpdateSounds(void)
|
|||
mobj_t *listenmobj[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
// Update sound/music volumes, if changed manually at console
|
||||
if (actualsfxvolume != cv_soundvolume.value * USER_VOLUME_SCALE)
|
||||
if (actualsfxvolume != cv_soundvolume.value)
|
||||
S_SetSfxVolume (cv_soundvolume.value);
|
||||
if (actualdigmusicvolume != cv_digmusicvolume.value * USER_VOLUME_SCALE)
|
||||
if (actualdigmusicvolume != cv_digmusicvolume.value)
|
||||
S_SetDigMusicVolume (cv_digmusicvolume.value);
|
||||
|
||||
// We're done now, if we're not in a level.
|
||||
|
|
@ -990,7 +990,7 @@ void S_UpdateClosedCaptions(void)
|
|||
void S_SetSfxVolume(INT32 volume)
|
||||
{
|
||||
//CV_SetValue(&cv_soundvolume, volume);
|
||||
actualsfxvolume = volume * USER_VOLUME_SCALE;
|
||||
actualsfxvolume = volume;
|
||||
|
||||
#ifdef HW3SOUND
|
||||
hws_mode == HWS_DEFAULT_MODE ? I_SetSfxVolume(volume&0x1F) : HW3S_SetSfxVolume(volume&0x1F);
|
||||
|
|
@ -2347,7 +2347,7 @@ void S_SetMusicVolume(INT32 digvolume)
|
|||
digvolume = cv_digmusicvolume.value;
|
||||
|
||||
//CV_SetValue(&cv_digmusicvolume, digvolume);
|
||||
actualdigmusicvolume = digvolume * USER_VOLUME_SCALE;
|
||||
actualdigmusicvolume = digvolume;
|
||||
I_SetMusicVolume(digvolume);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ extern openmpt_module *openmpt_mhandle;
|
|||
#define PICKUP_SOUND 0x8000
|
||||
|
||||
//
|
||||
#define SOUND_VOLUME_RANGE 256
|
||||
#define MAX_SOUND_VOLUME 255
|
||||
#define SOUND_VOLUME_RANGE 100
|
||||
#define MAX_SOUND_VOLUME 100
|
||||
|
||||
#define DEFAULT_MUSICDEF_VOLUME 100
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue