diff options
author | Chris Robinson <[email protected]> | 2013-12-29 05:09:50 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-29 05:09:50 -0800 |
commit | 4e73b95fc05b85da550910318df6c04eb21edc4d (patch) | |
tree | 6f1a6a242e6ed33b1ea517e5799783c5c4a80939 | |
parent | 4c35f7c63243c7ffa251047074d44e6073edb435 (diff) |
Add the last remaining "real-time" properties
-rw-r--r-- | Alc/midi/base.c | 13 | ||||
-rw-r--r-- | Alc/midi/fluidsynth.c | 6 | ||||
-rw-r--r-- | Alc/midi/sf2load.c | 12 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 6 | ||||
-rw-r--r-- | OpenAL32/Include/alMidi.h | 12 | ||||
-rw-r--r-- | OpenAL32/alFontsound.c | 50 |
6 files changed, 91 insertions, 8 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index 82e35a9d..b726f47b 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -303,12 +303,19 @@ void ALfontsound_Construct(ALfontsound *self) self->FilterQ = 0; self->ModLfoToFilterCutoff = 0; self->ModEnvToFilterCutoff = 0; - - self->Pan = 0; + self->ModLfoToVolume = 0; self->ChorusSend = 0; self->ReverbSend = 0; + self->Pan = 0; + + self->ModLfo.Delay = 0; + self->ModLfo.Frequency = 0; + + self->VibratoLfo.Delay = 0; + self->VibratoLfo.Frequency = 0; + self->ModEnv.DelayTime = -12000; self->ModEnv.AttackTime = -12000; self->ModEnv.HoldTime = -12000; @@ -336,6 +343,8 @@ void ALfontsound_Construct(ALfontsound *self) self->TuningScale = 100; + self->ExclusiveClass = 0; + self->Start = 0; self->End = 0; self->LoopStart = 0; diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c index 944b7b8f..697a95c8 100644 --- a/Alc/midi/fluidsynth.c +++ b/Alc/midi/fluidsynth.c @@ -170,9 +170,14 @@ static int FPreset_noteOn(fluid_preset_t *preset, fluid_synth_t *synth, int chan 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, 13, sound->ModLfoToVolume); fluid_voice_gen_set(voice, 15, sound->ChorusSend); fluid_voice_gen_set(voice, 16, sound->ReverbSend); fluid_voice_gen_set(voice, 17, sound->Pan); + fluid_voice_gen_set(voice, 21, sound->ModLfo.Delay); + fluid_voice_gen_set(voice, 22, sound->ModLfo.Frequency); + fluid_voice_gen_set(voice, 23, sound->VibratoLfo.Delay); + fluid_voice_gen_set(voice, 24, sound->VibratoLfo.Frequency); 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); @@ -194,6 +199,7 @@ static int FPreset_noteOn(fluid_preset_t *preset, fluid_synth_t *synth, int chan fluid_voice_gen_set(voice, 52, sound->FineTuning); fluid_voice_gen_set(voice, 54, sound->LoopMode); fluid_voice_gen_set(voice, 56, sound->TuningScale); + fluid_voice_gen_set(voice, 57, sound->ExclusiveClass); for(m = 0;m < sample->NumMods;m++) fluid_voice_add_mod(voice, &sample->Mods[m], FLUID_VOICE_OVERWRITE); diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index af342a9e..5fb71893 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -807,7 +807,7 @@ static void fillZone(ALuint id, const GenModList *zone) AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT, /* 10 - modLfoToFilterFc */ AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT, /* 11 - modEnvToFilterFc */ 0, /* 12 - endAddrCoarseOffset */ - 0, /* 13 - modLfoToVolume */ + AL_MOD_LFO_TO_VOLUME_SOFT, /* 13 - modLfoToVolume */ 0, /* 14 - */ AL_CHORUS_SEND_SOFT, /* 15 - chorusEffectsSend */ AL_REVERB_SEND_SOFT, /* 16 - reverbEffectsSend */ @@ -815,10 +815,10 @@ static void fillZone(ALuint id, const GenModList *zone) 0, /* 18 - */ 0, /* 19 - */ 0, /* 20 - */ - 0, /* 21 - delayModLFO */ - 0, /* 22 - freqModLFO */ - 0, /* 23 - delayVibLFO */ - 0, /* 24 - freqVibLFO */ + AL_MOD_LFO_DELAY_SOFT, /* 21 - delayModLFO */ + AL_MOD_LFO_FREQUENCY_SOFT, /* 22 - freqModLFO */ + AL_VIBRATO_LFO_DELAY_SOFT, /* 23 - delayVibLFO */ + AL_VIBRATO_LFO_FREQUENCY_SOFT, /* 24 - freqVibLFO */ AL_MOD_ENV_DELAYTIME_SOFT, /* 25 - delayModEnv */ AL_MOD_ENV_ATTACKTIME_SOFT, /* 26 - attackModEnv */ AL_MOD_ENV_HOLDTIME_SOFT, /* 27 - holdModEnv */ @@ -851,7 +851,7 @@ static void fillZone(ALuint id, const GenModList *zone) AL_LOOP_MODE_SOFT, /* 54 - sampleModes */ 0, /* 55 - */ AL_TUNING_SCALE_SOFT, /* 56 - scaleTuning */ - 0, /* 57 - exclusiveClass */ + AL_EXCLUSIVE_CLASS_SOFT, /* 57 - exclusiveClass */ AL_BASE_KEY_SOFT, /* 58 - overridingRootKey */ 0, /* 59 - */ }; diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index ff00fdac..7688c84e 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -55,9 +55,14 @@ #define AL_FILTER_RESONANCE_SOFT 0x0009 #define AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT 0x000A #define AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT 0x000B +#define AL_MOD_LFO_TO_VOLUME_SOFT 0x000D #define AL_CHORUS_SEND_SOFT 0x000F #define AL_REVERB_SEND_SOFT 0x0010 #define AL_PAN_SOFT 0x0011 +#define AL_MOD_LFO_DELAY_SOFT 0x0015 +#define AL_MOD_LFO_FREQUENCY_SOFT 0x0016 +#define AL_VIBRATO_LFO_DELAY_SOFT 0x0017 +#define AL_VIBRATO_LFO_FREQUENCY_SOFT 0x0018 #define AL_MOD_ENV_DELAYTIME_SOFT 0x0019 #define AL_MOD_ENV_ATTACKTIME_SOFT 0x001A #define AL_MOD_ENV_HOLDTIME_SOFT 0x001B @@ -81,6 +86,7 @@ #define AL_TUNING_FINE_SOFT 0x0034 #define AL_LOOP_MODE_SOFT 0x0036 #define AL_TUNING_SCALE_SOFT 0x0038 +#define AL_EXCLUSIVE_CLASS_SOFT 0x0039 #define AL_LOOP_CONTINUOUS_SOFT 0x0001 #define AL_LOOP_UNTIL_RELEASE_SOFT 0x0003 #define AL_FORMAT_TYPE_SOFT 0x1991 diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h index b9adc4f2..c31992b3 100644 --- a/OpenAL32/Include/alMidi.h +++ b/OpenAL32/Include/alMidi.h @@ -31,6 +31,7 @@ typedef struct ALfontsound { ALint FilterQ; ALint ModLfoToFilterCutoff; ALint ModEnvToFilterCutoff; + ALint ModLfoToVolume; ALint ChorusSend; ALint ReverbSend; @@ -38,6 +39,15 @@ typedef struct ALfontsound { ALint Pan; struct { + ALint Delay; + ALint Frequency; + } ModLfo; + struct { + ALint Delay; + ALint Frequency; + } VibratoLfo; + + struct { ALint DelayTime; ALint AttackTime; ALint HoldTime; @@ -67,6 +77,8 @@ typedef struct ALfontsound { ALint TuningScale; + ALint ExclusiveClass; + ALuint Start; ALuint End; ALuint LoopStart; diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c index 78722426..908e88f7 100644 --- a/OpenAL32/alFontsound.c +++ b/OpenAL32/alFontsound.c @@ -160,6 +160,10 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value) sound->ModEnvToFilterCutoff = value; break; + case AL_MOD_LFO_TO_VOLUME_SOFT: + sound->ModLfoToVolume = value; + break; + case AL_CHORUS_SEND_SOFT: if(!(value >= 0 && value <= 1000)) SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); @@ -176,6 +180,20 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value) sound->Pan = value; break; + case AL_MOD_LFO_DELAY_SOFT: + sound->ModLfo.Delay = value; + break; + case AL_MOD_LFO_FREQUENCY_SOFT: + sound->ModLfo.Frequency = value; + break; + + case AL_VIBRATO_LFO_DELAY_SOFT: + sound->VibratoLfo.Delay = value; + break; + case AL_VIBRATO_LFO_FREQUENCY_SOFT: + sound->VibratoLfo.Frequency = value; + break; + case AL_MOD_ENV_DELAYTIME_SOFT: sound->ModEnv.DelayTime = value; break; @@ -250,6 +268,10 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value) sound->TuningScale = value; break; + case AL_EXCLUSIVE_CLASS_SOFT: + sound->ExclusiveClass = value; + break; + case AL_SAMPLE_START_SOFT: sound->Start = value; break; @@ -370,9 +392,14 @@ AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint * case AL_FILTER_RESONANCE_SOFT: case AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT: case AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT: + case AL_MOD_LFO_TO_VOLUME_SOFT: case AL_CHORUS_SEND_SOFT: case AL_REVERB_SEND_SOFT: case AL_PAN_SOFT: + case AL_MOD_LFO_DELAY_SOFT: + case AL_MOD_LFO_FREQUENCY_SOFT: + case AL_VIBRATO_LFO_DELAY_SOFT: + case AL_VIBRATO_LFO_FREQUENCY_SOFT: case AL_MOD_ENV_DELAYTIME_SOFT: case AL_MOD_ENV_ATTACKTIME_SOFT: case AL_MOD_ENV_HOLDTIME_SOFT: @@ -394,6 +421,7 @@ AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint * case AL_TUNING_FINE_SOFT: case AL_LOOP_MODE_SOFT: case AL_TUNING_SCALE_SOFT: + case AL_EXCLUSIVE_CLASS_SOFT: case AL_SAMPLE_START_SOFT: case AL_SAMPLE_END_SOFT: case AL_SAMPLE_LOOP_START_SOFT: @@ -467,6 +495,10 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val values[0] = sound->ModEnvToFilterCutoff; break; + case AL_MOD_LFO_TO_VOLUME_SOFT: + values[0] = sound->ModLfoToVolume; + break; + case AL_CHORUS_SEND_SOFT: values[0] = sound->ChorusSend; break; @@ -479,6 +511,20 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val values[0] = sound->Pan; break; + case AL_MOD_LFO_DELAY_SOFT: + values[0] = sound->ModLfo.Delay; + break; + case AL_MOD_LFO_FREQUENCY_SOFT: + values[0] = sound->ModLfo.Frequency; + break; + + case AL_VIBRATO_LFO_DELAY_SOFT: + values[0] = sound->VibratoLfo.Delay; + break; + case AL_VIBRATO_LFO_FREQUENCY_SOFT: + values[0] = sound->VibratoLfo.Frequency; + break; + case AL_MOD_ENV_DELAYTIME_SOFT: values[0] = sound->ModEnv.DelayTime; break; @@ -558,6 +604,10 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val values[0] = sound->TuningScale; break; + case AL_EXCLUSIVE_CLASS_SOFT: + values[0] = sound->ExclusiveClass; + break; + case AL_SAMPLE_START_SOFT: values[0] = sound->Start; break; |