diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/midi/base.c | 5 | ||||
-rw-r--r-- | Alc/midi/fluidsynth.c | 4 | ||||
-rw-r--r-- | Alc/midi/sf2load.c | 12 |
3 files changed, 16 insertions, 5 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index 7eb2d2c5..19adc810 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -299,6 +299,11 @@ void ALfontsound_Construct(ALfontsound *self) self->VibratoLfoToPitch = 0; self->ModEnvToPitch = 0; + self->FilterCutoff = 13500; + self->FilterQ = 0; + self->ModLfoToFilterCutoff = 0; + self->ModEnvToFilterCutoff = 0; + self->ModEnv.DelayTime = -12000; self->ModEnv.AttackTime = -12000; self->ModEnv.HoldTime = -12000; diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c index 35092966..b19cfd03 100644 --- a/Alc/midi/fluidsynth.c +++ b/Alc/midi/fluidsynth.c @@ -166,6 +166,10 @@ static int FPreset_noteOn(fluid_preset_t *preset, fluid_synth_t *synth, int chan fluid_voice_gen_set(voice, 5, sound->ModLfoToPitch); fluid_voice_gen_set(voice, 6, sound->VibratoLfoToPitch); fluid_voice_gen_set(voice, 7, sound->ModEnvToPitch); + fluid_voice_gen_set(voice, 8, sound->FilterCutoff); + fluid_voice_gen_set(voice, 9, sound->FilterQ); + fluid_voice_gen_set(voice, 10, sound->ModLfoToFilterCutoff); + fluid_voice_gen_set(voice, 11, sound->ModEnvToFilterCutoff); fluid_voice_gen_set(voice, 25, sound->ModEnv.DelayTime); fluid_voice_gen_set(voice, 26, sound->ModEnv.AttackTime); fluid_voice_gen_set(voice, 27, sound->ModEnv.HoldTime); diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index b33ea8af..de238296 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -802,10 +802,10 @@ static void fillZone(ALuint id, const GenModList *zone) AL_MOD_LFO_TO_PITCH_SOFT, /* 5 - modLfoToPitch */ AL_VIBRATO_LFO_TO_PITCH_SOFT, /* 6 - vibLfoToPitch */ AL_MOD_ENV_TO_PITCH_SOFT, /* 7 - modEnvToPitch */ - 0, /* 8 - initialFilterFc */ - 0, /* 9 - initialFilterQ */ - 0, /* 10 - modLfoToFilterFc */ - 0, /* 11 - modEnvToFilterFc */ + AL_FILTER_CUTOFF_SOFT, /* 8 - initialFilterFc */ + AL_FILTER_RESONANCE_SOFT, /* 9 - initialFilterQ */ + AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT, /* 10 - modLfoToFilterFc */ + AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT, /* 11 - modEnvToFilterFc */ 0, /* 12 - endAddrCoarseOffset */ 0, /* 13 - modLfoToVolume */ 0, /* 14 - */ @@ -895,7 +895,9 @@ static void fillZone(ALuint id, const GenModList *zone) ALint value = (ALshort)gen->mAmount; if(param == AL_BASE_KEY_SOFT && value == -1) break; - if(param == AL_LOOP_MODE_SOFT && value == 2) + if(param == AL_FILTER_RESONANCE_SOFT && value < 0) + value = 0; + else if(param == AL_LOOP_MODE_SOFT && value == 2) value = 0; alFontsoundiSOFT(id, param, value); } |