variable pitch bend range: 100 = none, 120 = original, 200 = default (#524)

* variable pitch bend range: 100 = none, 120 = original, 200 default (in Woof!)

* improve config string description
This commit is contained in:
Fabian Greffrath 2022-04-25 16:09:38 +02:00 committed by GitHub
parent 1a925af4e1
commit 2d43b770b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View File

@ -50,6 +50,8 @@ boolean precache_sounds;
boolean lowpass_filter;
// [FG] music backend
midi_player_t midi_player;
// [FG] variable pitch bend range
int pitch_bend_range;
// Music modules
extern music_module_t music_win_module;
@ -462,6 +464,7 @@ void I_SetChannels(void)
int i;
int *steptablemid = steptable + 128;
const double base = pitch_bend_range / 100.0;
// Okay, reset internal mixing channels to zero.
for(i = 0; i < MAX_CHANNELS; ++i)
@ -472,7 +475,7 @@ void I_SetChannels(void)
// This table provides step widths for pitch parameters.
for(i=-128 ; i<128 ; i++)
{
steptablemid[i] = (int)(pow(2.0, (double)i / 64.0) * 65536.0); // [FG] pimp (was 1.2)
steptablemid[i] = (int)(pow(base, (double)i / 64.0) * 65536.0); // [FG] variable pitch bend range
}
}

View File

@ -48,6 +48,8 @@ extern int snd_samplerate;
extern boolean precache_sounds;
// [FG] optional low-pass filter
extern boolean lowpass_filter;
// [FG] variable pitch bend range
extern int pitch_bend_range;
// Init at program start...
void I_InitSound(void);

View File

@ -195,6 +195,13 @@ default_t defaults[] = {
"1 to enable variable pitch in sound effects (from id's original code)"
},
{
"pitch_bend_range",
(config_t *) &pitch_bend_range, NULL,
{200}, {100,300}, number, ss_none, wad_yes,
"variable pitch bend range (100 none, 120 original, 200 Woof default)"
},
{ // phares
"translucency",
(config_t *) &general_translucency, NULL,