summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/Include/alMain.h2
-rw-r--r--OpenAL32/alBuffer.c17
2 files changed, 19 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index f0f45029..cff0a251 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -50,6 +50,7 @@ ALC_API void ALC_APIENTRY alcRenderSamples(ALCdevice *device, ALCvoid *buffer, A
typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*);
typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*);
typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*);
+typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum);
#ifdef AL_ALEXT_PROTOTYPES
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer,
ALuint samplerate, ALenum internalformat, ALsizei frames,
@@ -60,6 +61,7 @@ AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer,
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
ALsizei offset, ALsizei frames,
ALenum channels, ALenum type, ALvoid *data);
+AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
#endif
#endif
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 400db6a8..30402ee1 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -638,6 +638,23 @@ AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer,
ProcessContext(Context);
}
+AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format)
+{
+ enum FmtChannels DstChannels;
+ enum FmtType DstType;
+ ALCcontext *Context;
+ ALboolean ret;
+
+ Context = GetContextSuspended();
+ if(!Context) return AL_FALSE;
+
+ ret = DecomposeFormat(format, &DstChannels, &DstType);
+
+ ProcessContext(Context);
+
+ return ret;
+}
+
AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum eParam, ALfloat flValue)
{