aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSoundfont.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-24 02:55:11 -0800
committerChris Robinson <[email protected]>2013-12-24 02:55:11 -0800
commitf7556b827a11a507780a35e437ed62a0b3ee0d62 (patch)
tree783dc693b66b4922ec93c8061c0ce28d80359ce3 /OpenAL32/alSoundfont.c
parentb0878fe60962212614d251815e533b0e0a704989 (diff)
Allow querying the soundfont sample length and format type
Diffstat (limited to 'OpenAL32/alSoundfont.c')
-rw-r--r--OpenAL32/alSoundfont.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenAL32/alSoundfont.c b/OpenAL32/alSoundfont.c
index 7b19ccb6..4bc4da48 100644
--- a/OpenAL32/alSoundfont.c
+++ b/OpenAL32/alSoundfont.c
@@ -231,6 +231,14 @@ AL_API void AL_APIENTRY alGetSoundfontivSOFT(ALuint id, ALenum param, ALint *val
values[i] = sfont->Presets[i]->id;
break;
+ case AL_SAMPLE_LENGTH_SOFT:
+ values[0] = sfont->NumSamples;
+ break;
+
+ case AL_FORMAT_TYPE_SOFT:
+ values[0] = AL_SHORT_SOFT;
+ break;
+
default:
SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done);
}