mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 22:44:30 -04:00
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:
parent
1a925af4e1
commit
2d43b770b2
@ -50,6 +50,8 @@ boolean precache_sounds;
|
|||||||
boolean lowpass_filter;
|
boolean lowpass_filter;
|
||||||
// [FG] music backend
|
// [FG] music backend
|
||||||
midi_player_t midi_player;
|
midi_player_t midi_player;
|
||||||
|
// [FG] variable pitch bend range
|
||||||
|
int pitch_bend_range;
|
||||||
|
|
||||||
// Music modules
|
// Music modules
|
||||||
extern music_module_t music_win_module;
|
extern music_module_t music_win_module;
|
||||||
@ -462,6 +464,7 @@ void I_SetChannels(void)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
int *steptablemid = steptable + 128;
|
int *steptablemid = steptable + 128;
|
||||||
|
const double base = pitch_bend_range / 100.0;
|
||||||
|
|
||||||
// Okay, reset internal mixing channels to zero.
|
// Okay, reset internal mixing channels to zero.
|
||||||
for(i = 0; i < MAX_CHANNELS; ++i)
|
for(i = 0; i < MAX_CHANNELS; ++i)
|
||||||
@ -472,7 +475,7 @@ void I_SetChannels(void)
|
|||||||
// This table provides step widths for pitch parameters.
|
// This table provides step widths for pitch parameters.
|
||||||
for(i=-128 ; i<128 ; i++)
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ extern int snd_samplerate;
|
|||||||
extern boolean precache_sounds;
|
extern boolean precache_sounds;
|
||||||
// [FG] optional low-pass filter
|
// [FG] optional low-pass filter
|
||||||
extern boolean lowpass_filter;
|
extern boolean lowpass_filter;
|
||||||
|
// [FG] variable pitch bend range
|
||||||
|
extern int pitch_bend_range;
|
||||||
|
|
||||||
// Init at program start...
|
// Init at program start...
|
||||||
void I_InitSound(void);
|
void I_InitSound(void);
|
||||||
|
@ -195,6 +195,13 @@ default_t defaults[] = {
|
|||||||
"1 to enable variable pitch in sound effects (from id's original code)"
|
"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
|
{ // phares
|
||||||
"translucency",
|
"translucency",
|
||||||
(config_t *) &general_translucency, NULL,
|
(config_t *) &general_translucency, NULL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user