aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/sf2load.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-29 03:18:31 -0800
committerChris Robinson <[email protected]>2013-12-29 03:18:31 -0800
commit1d41122372c821e85a6f150d6435b9c034365e42 (patch)
tree38ea001d55848fc19743b9710368a8b34342eff8 /Alc/midi/sf2load.c
parentdeecbbc55d44a0043c92464949c83c9722d6be00 (diff)
Add filter properties
Diffstat (limited to 'Alc/midi/sf2load.c')
-rw-r--r--Alc/midi/sf2load.c12
1 files changed, 7 insertions, 5 deletions
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);
}