aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/fluidsynth.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-29 02:14:10 -0800
committerChris Robinson <[email protected]>2013-12-29 02:14:10 -0800
commitfc928bb75a8b677e101785e50b8c4cf0d39a62aa (patch)
treeb68eb470eb2ca46cde300041d35926d59abda285 /Alc/midi/fluidsynth.c
parent4659669a740a2501b93aa54ae925eeb91ac5e80d (diff)
Add volume envelope properties
Diffstat (limited to 'Alc/midi/fluidsynth.c')
-rw-r--r--Alc/midi/fluidsynth.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c
index 5b57de21..d5174887 100644
--- a/Alc/midi/fluidsynth.c
+++ b/Alc/midi/fluidsynth.c
@@ -163,6 +163,14 @@ static int FPreset_noteOn(fluid_preset_t *preset, fluid_synth_t *synth, int chan
if(voice == NULL)
return FLUID_FAILED;
+ fluid_voice_gen_set(voice, 33, sound->VolEnv.DelayTime);
+ fluid_voice_gen_set(voice, 34, sound->VolEnv.AttackTime);
+ fluid_voice_gen_set(voice, 35, sound->VolEnv.HoldTime);
+ fluid_voice_gen_set(voice, 36, sound->VolEnv.DecayTime);
+ fluid_voice_gen_set(voice, 37, sound->VolEnv.SustainVol);
+ fluid_voice_gen_set(voice, 38, sound->VolEnv.ReleaseTime);
+ fluid_voice_gen_set(voice, 39, sound->VolEnv.KeyToHoldTime);
+ fluid_voice_gen_set(voice, 40, sound->VolEnv.KeyToDecayTime);
fluid_voice_gen_set(voice, 54, sound->LoopMode);
for(m = 0;m < sample->NumMods;m++)
fluid_voice_add_mod(voice, &sample->Mods[m], FLUID_VOICE_OVERWRITE);