aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-29 04:24:32 -0800
committerChris Robinson <[email protected]>2013-12-29 04:24:32 -0800
commit699d84491f2f01a95b8210ba7234dcebc8b4f817 (patch)
treed0221554417bb0609988417773e70f5817e145e6 /OpenAL32
parentd030e078790ca24f977a888f53c11c129082abe8 (diff)
Add pan and attenuation properties
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h2
-rw-r--r--OpenAL32/Include/alMidi.h4
-rw-r--r--OpenAL32/alFontsound.c20
3 files changed, 26 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index d09bfb08..1fe6b7e7 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -55,6 +55,7 @@
#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_PAN_SOFT 0x0011
#define AL_MOD_ENV_DELAYTIME_SOFT 0x0019
#define AL_MOD_ENV_ATTACKTIME_SOFT 0x001A
#define AL_MOD_ENV_HOLDTIME_SOFT 0x001B
@@ -73,6 +74,7 @@
#define AL_VOLUME_ENV_KEY_TO_DECAYTIME_SOFT 0x0028
#define AL_KEY_RANGE_SOFT 0x002B
#define AL_VELOCITY_RANGE_SOFT 0x002C
+#define AL_ATTENUATION_SOFT 0x0030
#define AL_TUNING_COARSE_SOFT 0x0033
#define AL_TUNING_FINE_SOFT 0x0034
#define AL_LOOP_MODE_SOFT 0x0036
diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h
index 6faf327f..47b159ba 100644
--- a/OpenAL32/Include/alMidi.h
+++ b/OpenAL32/Include/alMidi.h
@@ -32,6 +32,8 @@ typedef struct ALfontsound {
ALint ModLfoToFilterCutoff;
ALint ModEnvToFilterCutoff;
+ ALint Pan;
+
struct {
ALint DelayTime;
ALint AttackTime;
@@ -53,6 +55,8 @@ typedef struct ALfontsound {
ALint KeyToDecayTime;
} VolEnv;
+ ALint Attenuation;
+
ALint CoarseTuning;
ALint FineTuning;
diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c
index 3eb6f675..c5b04970 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_PAN_SOFT:
+ sound->Pan = value;
+ break;
+
case AL_MOD_ENV_DELAYTIME_SOFT:
sound->ModEnv.DelayTime = value;
break;
@@ -210,6 +214,12 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value)
sound->VolEnv.KeyToDecayTime = value;
break;
+ case AL_ATTENUATION_SOFT:
+ if(!(value >= 0))
+ SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
+ sound->Attenuation = value;
+ break;
+
case AL_TUNING_COARSE_SOFT:
sound->CoarseTuning = value;
break;
@@ -348,6 +358,7 @@ 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_PAN_SOFT:
case AL_MOD_ENV_DELAYTIME_SOFT:
case AL_MOD_ENV_ATTACKTIME_SOFT:
case AL_MOD_ENV_HOLDTIME_SOFT:
@@ -364,6 +375,7 @@ AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint *
case AL_VOLUME_ENV_RELEASETIME_SOFT:
case AL_VOLUME_ENV_KEY_TO_HOLDTIME_SOFT:
case AL_VOLUME_ENV_KEY_TO_DECAYTIME_SOFT:
+ case AL_ATTENUATION_SOFT:
case AL_TUNING_COARSE_SOFT:
case AL_TUNING_FINE_SOFT:
case AL_LOOP_MODE_SOFT:
@@ -441,6 +453,10 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val
values[0] = sound->ModEnvToFilterCutoff;
break;
+ case AL_PAN_SOFT:
+ values[0] = sound->Pan;
+ break;
+
case AL_MOD_ENV_DELAYTIME_SOFT:
values[0] = sound->ModEnv.DelayTime;
break;
@@ -501,6 +517,10 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val
values[1] = sound->MaxVelocity;
break;
+ case AL_ATTENUATION_SOFT:
+ values[0] = sound->Attenuation;
+ break;
+
case AL_TUNING_COARSE_SOFT:
values[0] = sound->CoarseTuning;
break;