aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-30 23:47:42 -0800
committerChris Robinson <[email protected]>2013-11-30 23:47:42 -0800
commitc834713526a4397c2bd76401694967e92bf6aa64 (patch)
treea6b2ef034560806d407c40364ad7fe391382be01 /OpenAL32/alState.c
parent2633fbfc4b79f3fca88f200a264aefbd892ae207 (diff)
Add methods to set and get the MIDI gain
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 5f88ff5e..8ddfd024 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -157,6 +157,7 @@ done:
AL_API ALdouble AL_APIENTRY alGetDouble(ALenum pname)
{
+ ALCdevice *device;
ALCcontext *context;
ALdouble value = 0.0;
@@ -185,6 +186,10 @@ AL_API ALdouble AL_APIENTRY alGetDouble(ALenum pname)
value = (ALdouble)context->DeferUpdates;
break;
+ case AL_MIDI_GAIN_SOFT:
+ device = context->Device;
+ value = (ALdouble)MidiSynth_getGain(device->Synth);
+
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
}
@@ -197,6 +202,7 @@ done:
AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname)
{
+ ALCdevice *device;
ALCcontext *context;
ALfloat value = 0.0f;
@@ -225,6 +231,10 @@ AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname)
value = (ALfloat)context->DeferUpdates;
break;
+ case AL_MIDI_GAIN_SOFT:
+ device = context->Device;
+ value = MidiSynth_getGain(device->Synth);
+
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
}
@@ -369,6 +379,7 @@ AL_API ALvoid AL_APIENTRY alGetDoublev(ALenum pname, ALdouble *values)
case AL_DISTANCE_MODEL:
case AL_SPEED_OF_SOUND:
case AL_DEFERRED_UPDATES_SOFT:
+ case AL_MIDI_GAIN_SOFT:
values[0] = alGetDouble(pname);
return;
}
@@ -402,6 +413,7 @@ AL_API ALvoid AL_APIENTRY alGetFloatv(ALenum pname, ALfloat *values)
case AL_DISTANCE_MODEL:
case AL_SPEED_OF_SOUND:
case AL_DEFERRED_UPDATES_SOFT:
+ case AL_MIDI_GAIN_SOFT:
values[0] = alGetFloat(pname);
return;
}