diff options
author | Chris Robinson <[email protected]> | 2013-12-29 03:18:31 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-29 03:18:31 -0800 |
commit | 1d41122372c821e85a6f150d6435b9c034365e42 (patch) | |
tree | 38ea001d55848fc19743b9710368a8b34342eff8 /OpenAL32 | |
parent | deecbbc55d44a0043c92464949c83c9722d6be00 (diff) |
Add filter properties
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 4 | ||||
-rw-r--r-- | OpenAL32/Include/alMidi.h | 5 | ||||
-rw-r--r-- | OpenAL32/alFontsound.c | 38 |
3 files changed, 47 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index dc9cff60..86eef440 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -51,6 +51,10 @@ #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_FILTER_CUTOFF_SOFT 0x0008 +#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_ENV_DELAYTIME_SOFT 0x0019 #define AL_MOD_ENV_ATTACKTIME_SOFT 0x001A #define AL_MOD_ENV_HOLDTIME_SOFT 0x001B diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h index acf6bf1a..a6e5c0a3 100644 --- a/OpenAL32/Include/alMidi.h +++ b/OpenAL32/Include/alMidi.h @@ -27,6 +27,11 @@ typedef struct ALfontsound { ALint VibratoLfoToPitch; ALint ModEnvToPitch; + ALint FilterCutoff; + ALint FilterQ; + ALint ModLfoToFilterCutoff; + ALint ModEnvToFilterCutoff; + struct { ALint DelayTime; ALint AttackTime; diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c index 6bbcaa72..d5aebb74 100644 --- a/OpenAL32/alFontsound.c +++ b/OpenAL32/alFontsound.c @@ -142,6 +142,24 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value) sound->ModEnvToPitch = value; break; + case AL_FILTER_CUTOFF_SOFT: + sound->FilterCutoff = value; + break; + + case AL_FILTER_RESONANCE_SOFT: + if(!(value >= 0)) + SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done); + sound->FilterQ = value; + break; + + case AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT: + sound->ModLfoToFilterCutoff = value; + break; + + case AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT: + sound->ModEnvToFilterCutoff = value; + break; + case AL_MOD_ENV_DELAYTIME_SOFT: sound->ModEnv.DelayTime = value; break; @@ -315,6 +333,10 @@ 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_FILTER_CUTOFF_SOFT: + case AL_FILTER_RESONANCE_SOFT: + case AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT: + case AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT: case AL_MOD_ENV_DELAYTIME_SOFT: case AL_MOD_ENV_ATTACKTIME_SOFT: case AL_MOD_ENV_HOLDTIME_SOFT: @@ -389,6 +411,22 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val values[0] = sound->ModEnvToPitch; break; + case AL_FILTER_CUTOFF_SOFT: + values[0] = sound->FilterCutoff; + break; + + case AL_FILTER_RESONANCE_SOFT: + values[0] = sound->FilterQ; + break; + + case AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT: + values[0] = sound->ModLfoToFilterCutoff; + break; + + case AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT: + values[0] = sound->ModEnvToFilterCutoff; + break; + case AL_MOD_ENV_DELAYTIME_SOFT: values[0] = sound->ModEnv.DelayTime; break; |