From 5f8e65e09941c9c5d48e2277a8b1be1e35f04a9a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 28 Dec 2007 22:41:14 -0800 Subject: Implement AL_EXT_FLOAT32 --- Alc/ALc.c | 2 +- Alc/ALu.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Alc') diff --git a/Alc/ALc.c b/Alc/ALc.c index 8c75b32c..0db68efe 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -357,7 +357,7 @@ static ALvoid InitContext(ALCcontext *pContext) pContext->lNumStereoSources = 1; pContext->lNumMonoSources = pContext->Device->MaxNoOfSources - pContext->lNumStereoSources; - strcpy(pContext->ExtensionList, "AL_EXT_EXPONENT_DISTANCE AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_OFFSET"); + strcpy(pContext->ExtensionList, "AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_OFFSET"); } diff --git a/Alc/ALu.c b/Alc/ALu.c index b5af500b..f77990a7 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -68,6 +68,10 @@ __inline ALuint aluBytesFromFormat(ALenum format) case AL_FORMAT_51CHN16: return 2; + case AL_FORMAT_MONO_FLOAT32: + case AL_FORMAT_STEREO_FLOAT32: + return 4; + default: return 0; } @@ -79,10 +83,12 @@ __inline ALuint aluChannelsFromFormat(ALenum format) { case AL_FORMAT_MONO8: case AL_FORMAT_MONO16: + case AL_FORMAT_MONO_FLOAT32: return 1; case AL_FORMAT_STEREO8: case AL_FORMAT_STEREO16: + case AL_FORMAT_STEREO_FLOAT32: return 2; case AL_FORMAT_QUAD8: -- cgit v1.2.3