summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-29 03:43:00 -0800
committerChris Robinson <[email protected]>2013-12-29 03:43:00 -0800
commitd030e078790ca24f977a888f53c11c129082abe8 (patch)
tree5830e47bcd2928e8adfb12ce8588e8ba9d98e8a7 /OpenAL32
parent1d41122372c821e85a6f150d6435b9c034365e42 (diff)
Add tuning properties
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h3
-rw-r--r--OpenAL32/Include/alMidi.h8
-rw-r--r--OpenAL32/alFontsound.c49
3 files changed, 47 insertions, 13 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 86eef440..d09bfb08 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -73,7 +73,10 @@
#define AL_VOLUME_ENV_KEY_TO_DECAYTIME_SOFT 0x0028
#define AL_KEY_RANGE_SOFT 0x002B
#define AL_VELOCITY_RANGE_SOFT 0x002C
+#define AL_TUNING_COARSE_SOFT 0x0033
+#define AL_TUNING_FINE_SOFT 0x0034
#define AL_LOOP_MODE_SOFT 0x0036
+#define AL_TUNING_SCALE_SOFT 0x0038
#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 a6e5c0a3..6faf327f 100644
--- a/OpenAL32/Include/alMidi.h
+++ b/OpenAL32/Include/alMidi.h
@@ -53,12 +53,18 @@ typedef struct ALfontsound {
ALint KeyToDecayTime;
} VolEnv;
+ ALint CoarseTuning;
+ ALint FineTuning;
+
+ ALenum LoopMode;
+
+ ALint TuningScale;
+
ALuint Start;
ALuint End;
ALuint LoopStart;
ALuint LoopEnd;
ALuint SampleRate;
- ALenum LoopMode;
ALubyte PitchKey;
ALbyte PitchCorrection;
ALenum SampleType;
diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c
index d5aebb74..3eb6f675 100644
--- a/OpenAL32/alFontsound.c
+++ b/OpenAL32/alFontsound.c
@@ -210,6 +210,24 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value)
sound->VolEnv.KeyToDecayTime = value;
break;
+ case AL_TUNING_COARSE_SOFT:
+ sound->CoarseTuning = value;
+ break;
+ case AL_TUNING_FINE_SOFT:
+ sound->FineTuning = value;
+ break;
+
+ case AL_LOOP_MODE_SOFT:
+ if(!(value == AL_NONE || value == AL_LOOP_CONTINUOUS_SOFT ||
+ value == AL_LOOP_UNTIL_RELEASE_SOFT))
+ SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
+ sound->LoopMode = value;
+ break;
+
+ case AL_TUNING_SCALE_SOFT:
+ sound->TuningScale = value;
+ break;
+
case AL_SAMPLE_START_SOFT:
sound->Start = value;
break;
@@ -232,13 +250,6 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value)
sound->SampleRate = value;
break;
- case AL_LOOP_MODE_SOFT:
- if(!(value == AL_NONE || value == AL_LOOP_CONTINUOUS_SOFT ||
- value == AL_LOOP_UNTIL_RELEASE_SOFT))
- SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
- sound->LoopMode = value;
- break;
-
case AL_BASE_KEY_SOFT:
if(!((value >= 0 && value <= 127) || value == 255))
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
@@ -353,12 +364,15 @@ 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_TUNING_COARSE_SOFT:
+ case AL_TUNING_FINE_SOFT:
+ case AL_LOOP_MODE_SOFT:
+ case AL_TUNING_SCALE_SOFT:
case AL_SAMPLE_START_SOFT:
case AL_SAMPLE_END_SOFT:
case AL_SAMPLE_LOOP_START_SOFT:
case AL_SAMPLE_LOOP_END_SOFT:
case AL_SAMPLE_RATE_SOFT:
- case AL_LOOP_MODE_SOFT:
case AL_BASE_KEY_SOFT:
case AL_KEY_CORRECTION_SOFT:
case AL_SAMPLE_TYPE_SOFT:
@@ -487,6 +501,21 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val
values[1] = sound->MaxVelocity;
break;
+ case AL_TUNING_COARSE_SOFT:
+ values[0] = sound->CoarseTuning;
+ break;
+ case AL_TUNING_FINE_SOFT:
+ values[0] = sound->FineTuning;
+ break;
+
+ case AL_LOOP_MODE_SOFT:
+ values[0] = sound->LoopMode;
+ break;
+
+ case AL_TUNING_SCALE_SOFT:
+ values[0] = sound->TuningScale;
+ break;
+
case AL_SAMPLE_START_SOFT:
values[0] = sound->Start;
break;
@@ -507,10 +536,6 @@ AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *val
values[0] = sound->SampleRate;
break;
- case AL_LOOP_MODE_SOFT:
- values[0] = sound->LoopMode;
- break;
-
case AL_BASE_KEY_SOFT:
values[0] = sound->PitchKey;
break;