Add alIsBufferFormatSupportedSOFT

This commit is contained in:
Chris Robinson 2011-03-16 13:57:00 -07:00
parent a87f651b4d
commit be37f10fed
2 changed files with 19 additions and 0 deletions

View File

@ -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

View File

@ -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)
{