aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-12 12:27:46 -0800
committerChris Robinson <[email protected]>2014-01-12 12:27:46 -0800
commita5bfc1e30b333d0767138d9a42033cabd2dd71c5 (patch)
tree976ab08c54cc532faff4539676e78d81c1623214 /OpenAL32/alState.c
parent9a57aca8d4ff8784e0bccf4f38a856f301c38050 (diff)
Add a method to get the current MIDI state
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 6a528519..280dd896 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -191,6 +191,12 @@ AL_API ALdouble AL_APIENTRY alGetDouble(ALenum pname)
case AL_MIDI_GAIN_SOFT:
device = context->Device;
value = (ALdouble)MidiSynth_getGain(device->Synth);
+ break;
+
+ case AL_MIDI_STATE_SOFT:
+ device = context->Device;
+ value = (ALdouble)MidiSynth_getState(device->Synth);
+ break;
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
@@ -236,6 +242,12 @@ AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname)
case AL_MIDI_GAIN_SOFT:
device = context->Device;
value = MidiSynth_getGain(device->Synth);
+ break;
+
+ case AL_MIDI_STATE_SOFT:
+ device = context->Device;
+ value = (ALfloat)MidiSynth_getState(device->Synth);
+ break;
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
@@ -285,6 +297,11 @@ AL_API ALint AL_APIENTRY alGetInteger(ALenum pname)
value = synth->NumSoundfonts;
break;
+ case AL_MIDI_STATE_SOFT:
+ device = context->Device;
+ value = MidiSynth_getState(device->Synth);
+ break;
+
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
}
@@ -340,6 +357,11 @@ AL_API ALint64SOFT AL_APIENTRY alGetInteger64SOFT(ALenum pname)
value = (ALint64SOFT)synth->NumSoundfonts;
break;
+ case AL_MIDI_STATE_SOFT:
+ device = context->Device;
+ value = (ALint64SOFT)MidiSynth_getState(device->Synth);
+ break;
+
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
}
@@ -397,6 +419,7 @@ AL_API ALvoid AL_APIENTRY alGetDoublev(ALenum pname, ALdouble *values)
case AL_SPEED_OF_SOUND:
case AL_DEFERRED_UPDATES_SOFT:
case AL_MIDI_GAIN_SOFT:
+ case AL_MIDI_STATE_SOFT:
values[0] = alGetDouble(pname);
return;
}
@@ -431,6 +454,7 @@ AL_API ALvoid AL_APIENTRY alGetFloatv(ALenum pname, ALfloat *values)
case AL_SPEED_OF_SOUND:
case AL_DEFERRED_UPDATES_SOFT:
case AL_MIDI_GAIN_SOFT:
+ case AL_MIDI_STATE_SOFT:
values[0] = alGetFloat(pname);
return;
}
@@ -468,6 +492,7 @@ AL_API ALvoid AL_APIENTRY alGetIntegerv(ALenum pname, ALint *values)
case AL_SPEED_OF_SOUND:
case AL_DEFERRED_UPDATES_SOFT:
case AL_SOUNDFONTS_SIZE_SOFT:
+ case AL_MIDI_STATE_SOFT:
values[0] = alGetInteger(pname);
return;
}
@@ -516,6 +541,7 @@ AL_API void AL_APIENTRY alGetInteger64vSOFT(ALenum pname, ALint64SOFT *values)
case AL_DEFERRED_UPDATES_SOFT:
case AL_MIDI_CLOCK_SOFT:
case AL_SOUNDFONTS_SIZE_SOFT:
+ case AL_MIDI_STATE_SOFT:
values[0] = alGetInteger64SOFT(pname);
return;
}