diff options
-rw-r--r-- | Alc/midi/base.c | 9 | ||||
-rw-r--r-- | Alc/midi/fluidsynth.c | 8 | ||||
-rw-r--r-- | Alc/midi/sf2load.c | 16 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 8 | ||||
-rw-r--r-- | OpenAL32/Include/alMidi.h | 10 | ||||
-rw-r--r-- | OpenAL32/alFontsound.c | 72 |
6 files changed, 101 insertions, 22 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index 00114f59..7eb2d2c5 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -299,6 +299,15 @@ void ALfontsound_Construct(ALfontsound *self) self->VibratoLfoToPitch = 0; self->ModEnvToPitch = 0; + self->ModEnv.DelayTime = -12000; + self->ModEnv.AttackTime = -12000; + self->ModEnv.HoldTime = -12000; + self->ModEnv.DecayTime = -12000; + self->ModEnv.SustainVol = 0; + self->ModEnv.ReleaseTime = -12000; + self->ModEnv.KeyToHoldTime = 0; + self->ModEnv.KeyToDecayTime = 0; + self->VolEnv.DelayTime = -12000; self->VolEnv.AttackTime = -12000; self->VolEnv.HoldTime = -12000; diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c index 7855132a..35092966 100644 --- a/Alc/midi/fluidsynth.c +++ b/Alc/midi/fluidsynth.c @@ -166,6 +166,14 @@ 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, 25, sound->ModEnv.DelayTime); + fluid_voice_gen_set(voice, 26, sound->ModEnv.AttackTime); + fluid_voice_gen_set(voice, 27, sound->ModEnv.HoldTime); + fluid_voice_gen_set(voice, 28, sound->ModEnv.DecayTime); + fluid_voice_gen_set(voice, 29, sound->ModEnv.SustainVol); + fluid_voice_gen_set(voice, 30, sound->ModEnv.ReleaseTime); + fluid_voice_gen_set(voice, 31, sound->ModEnv.KeyToHoldTime); + fluid_voice_gen_set(voice, 32, sound->ModEnv.KeyToDecayTime); 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); diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index be2cb1df..b33ea8af 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -819,14 +819,14 @@ static void fillZone(ALuint id, const GenModList *zone) 0, /* 22 - freqModLFO */ 0, /* 23 - delayVibLFO */ 0, /* 24 - freqVibLFO */ - 0, /* 25 - delayModEnv */ - 0, /* 26 - attackModEnv */ - 0, /* 27 - holdModEnv */ - 0, /* 28 - decayModEnv */ - 0, /* 29 - sustainModEnv */ - 0, /* 30 - releaseModEnv */ - 0, /* 31 - keynumToModEnvHold */ - 0, /* 32 - keynumToModEnvDecay */ + AL_MOD_ENV_DELAYTIME_SOFT, /* 25 - delayModEnv */ + AL_MOD_ENV_ATTACKTIME_SOFT, /* 26 - attackModEnv */ + AL_MOD_ENV_HOLDTIME_SOFT, /* 27 - holdModEnv */ + AL_MOD_ENV_DECAYTIME_SOFT, /* 28 - decayModEnv */ + AL_MOD_ENV_SUSTAINVOLUME_SOFT, /* 29 - sustainModEnv */ + AL_MOD_ENV_RELEASETIME_SOFT, /* 30 - releaseModEnv */ + AL_MOD_ENV_KEY_TO_HOLDTIME_SOFT, /* 31 - keynumToModEnvHold */ + AL_MOD_ENV_KEY_TO_DECAYTIME_SOFT, /* 32 - keynumToModEnvDecay */ AL_VOLUME_ENV_DELAYTIME_SOFT, /* 33 - delayVolEnv */ AL_VOLUME_ENV_ATTACKTIME_SOFT, /* 34 - attackVolEnv */ AL_VOLUME_ENV_HOLDTIME_SOFT, /* 35 - holdVolEnv */ diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 4c980b96..dc9cff60 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -51,6 +51,14 @@ #define AL_MOD_LFO_TO_PITCH_SOFT 0x0005 #define AL_VIBRATO_LFO_TO_PITCH_SOFT 0x0006 #define AL_MOD_ENV_TO_PITCH_SOFT 0x0007 +#define AL_MOD_ENV_DELAYTIME_SOFT 0x0019 +#define AL_MOD_ENV_ATTACKTIME_SOFT 0x001A +#define AL_MOD_ENV_HOLDTIME_SOFT 0x001B +#define AL_MOD_ENV_DECAYTIME_SOFT 0x001C +#define AL_MOD_ENV_SUSTAINVOLUME_SOFT 0x001D +#define AL_MOD_ENV_RELEASETIME_SOFT 0x002E +#define AL_MOD_ENV_KEY_TO_HOLDTIME_SOFT 0x001F +#define AL_MOD_ENV_KEY_TO_DECAYTIME_SOFT 0x0020 #define AL_VOLUME_ENV_DELAYTIME_SOFT 0x0021 #define AL_VOLUME_ENV_ATTACKTIME_SOFT 0x0022 #define AL_VOLUME_ENV_HOLDTIME_SOFT 0x0023 diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h index 8daeaf53..acf6bf1a 100644 --- a/OpenAL32/Include/alMidi.h +++ b/OpenAL32/Include/alMidi.h @@ -36,6 +36,16 @@ typedef struct ALfontsound { ALint ReleaseTime; ALint KeyToHoldTime; ALint KeyToDecayTime; + } ModEnv; + struct { + ALint DelayTime; + ALint AttackTime; + ALint HoldTime; + ALint DecayTime; + ALint SustainVol; + ALint ReleaseTime; + ALint KeyToHoldTime; + ALint KeyToDecayTime; } VolEnv; ALuint Start; diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c index e6abf677..6bbcaa72 100644 --- a/OpenAL32/alFontsound.c +++ b/OpenAL32/alFontsound.c @@ -142,34 +142,52 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value) sound->ModEnvToPitch = value; break; + case AL_MOD_ENV_DELAYTIME_SOFT: + sound->ModEnv.DelayTime = value; + break; + case AL_MOD_ENV_ATTACKTIME_SOFT: + sound->ModEnv.AttackTime = value; + break; + case AL_MOD_ENV_HOLDTIME_SOFT: + sound->ModEnv.HoldTime = value; + break; + case AL_MOD_ENV_DECAYTIME_SOFT: + sound->ModEnv.DecayTime = value; + break; + case AL_MOD_ENV_SUSTAINVOLUME_SOFT: + sound->ModEnv.SustainVol = value; + break; + case AL_MOD_ENV_RELEASETIME_SOFT: + sound->ModEnv.ReleaseTime = value; + break; + case AL_MOD_ENV_KEY_TO_HOLDTIME_SOFT: + sound->ModEnv.KeyToHoldTime = value; + break; + case AL_MOD_ENV_KEY_TO_DECAYTIME_SOFT: + sound->ModEnv.KeyToDecayTime = value; + break; + case AL_VOLUME_ENV_DELAYTIME_SOFT: sound->VolEnv.DelayTime = value; break; - case AL_VOLUME_ENV_ATTACKTIME_SOFT: sound->VolEnv.AttackTime = value; break; - case AL_VOLUME_ENV_HOLDTIME_SOFT: sound->VolEnv.HoldTime = value; break; - case AL_VOLUME_ENV_DECAYTIME_SOFT: sound->VolEnv.DecayTime = value; break; - case AL_VOLUME_ENV_SUSTAINVOLUME_SOFT: sound->VolEnv.SustainVol = value; break; - case AL_VOLUME_ENV_RELEASETIME_SOFT: sound->VolEnv.ReleaseTime = value; break; - case AL_VOLUME_ENV_KEY_TO_HOLDTIME_SOFT: sound->VolEnv.KeyToHoldTime = value; break; - case AL_VOLUME_ENV_KEY_TO_DECAYTIME_SOFT: sound->VolEnv.KeyToDecayTime = value; break; @@ -297,6 +315,14 @@ AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint * case AL_MOD_LFO_TO_PITCH_SOFT: case AL_VIBRATO_LFO_TO_PITCH_SOFT: case AL_MOD_ENV_TO_PITCH_SOFT: + case AL_MOD_ENV_DELAYTIME_SOFT: + case AL_MOD_ENV_ATTACKTIME_SOFT: + case AL_MOD_ENV_HOLDTIME_SOFT: + case AL_MOD_ENV_DECAYTIME_SOFT: + case AL_MOD_ENV_SUSTAINVOLUME_SOFT: + case AL_MOD_ENV_RELEASETIME_SOFT: + case AL_MOD_ENV_KEY_TO_HOLDTIME_SOFT: + case AL_MOD_ENV_KEY_TO_DECAYTIME_SOFT: case AL_VOLUME_ENV_DELAYTIME_SOFT: case AL_VOLUME_ENV_ATTACKTIME_SOFT: case AL_VOLUME_ENV_HOLDTIME_SOFT: @@ -363,34 +389,52 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val values[0] = sound->ModEnvToPitch; break; + case AL_MOD_ENV_DELAYTIME_SOFT: + values[0] = sound->ModEnv.DelayTime; + break; + case AL_MOD_ENV_ATTACKTIME_SOFT: + values[0] = sound->ModEnv.AttackTime; + break; + case AL_MOD_ENV_HOLDTIME_SOFT: + values[0] = sound->ModEnv.HoldTime; + break; + case AL_MOD_ENV_DECAYTIME_SOFT: + values[0] = sound->ModEnv.DecayTime; + break; + case AL_MOD_ENV_SUSTAINVOLUME_SOFT: + values[0] = sound->ModEnv.SustainVol; + break; + case AL_MOD_ENV_RELEASETIME_SOFT: + values[0] = sound->ModEnv.ReleaseTime; + break; + case AL_MOD_ENV_KEY_TO_HOLDTIME_SOFT: + values[0] = sound->ModEnv.KeyToHoldTime; + break; + case AL_MOD_ENV_KEY_TO_DECAYTIME_SOFT: + values[0] = sound->ModEnv.KeyToDecayTime; + break; + case AL_VOLUME_ENV_DELAYTIME_SOFT: values[0] = sound->VolEnv.DelayTime; break; - case AL_VOLUME_ENV_ATTACKTIME_SOFT: values[0] = sound->VolEnv.AttackTime; break; - case AL_VOLUME_ENV_HOLDTIME_SOFT: values[0] = sound->VolEnv.HoldTime; break; - case AL_VOLUME_ENV_DECAYTIME_SOFT: values[0] = sound->VolEnv.DecayTime; break; - case AL_VOLUME_ENV_SUSTAINVOLUME_SOFT: values[0] = sound->VolEnv.SustainVol; break; - case AL_VOLUME_ENV_RELEASETIME_SOFT: values[0] = sound->VolEnv.ReleaseTime; break; - case AL_VOLUME_ENV_KEY_TO_HOLDTIME_SOFT: values[0] = sound->VolEnv.KeyToHoldTime; break; - case AL_VOLUME_ENV_KEY_TO_DECAYTIME_SOFT: values[0] = sound->VolEnv.KeyToDecayTime; break; |