summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-28 23:07:57 -0800
committerChris Robinson <[email protected]>2010-11-28 23:07:57 -0800
commiteb489ac886416fb9b234458a357039c328ba11a5 (patch)
tree4cc3811586d447ccd750ac0286557b16003d021e /OpenAL32/alBuffer.c
parent986628b8b202c497f876f94135d5d6b855f7541f (diff)
Store double formats as float
The mixer will cut it down to float anyway, so it's unnecessary and needlessly creates more mixer functions
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index de79d8e4..c3c866d9 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -285,11 +285,9 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid
case AL_FORMAT_MONO8:
case AL_FORMAT_MONO16:
case AL_FORMAT_MONO_FLOAT32:
- case AL_FORMAT_MONO_DOUBLE_EXT:
case AL_FORMAT_STEREO8:
case AL_FORMAT_STEREO16:
case AL_FORMAT_STEREO_FLOAT32:
- case AL_FORMAT_STEREO_DOUBLE_EXT:
case AL_FORMAT_QUAD8_LOKI:
case AL_FORMAT_QUAD16_LOKI:
case AL_FORMAT_QUAD8:
@@ -312,6 +310,17 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid
alSetError(Context, err);
break;
+ case AL_FORMAT_MONO_DOUBLE_EXT:
+ err = LoadData(ALBuf, data, size, freq, format, AL_FORMAT_MONO_FLOAT32);
+ if(err != AL_NO_ERROR)
+ alSetError(Context, err);
+ break;
+ case AL_FORMAT_STEREO_DOUBLE_EXT:
+ err = LoadData(ALBuf, data, size, freq, format, AL_FORMAT_STEREO_FLOAT32);
+ if(err != AL_NO_ERROR)
+ alSetError(Context, err);
+ break;
+
case AL_FORMAT_MONO_MULAW:
case AL_FORMAT_STEREO_MULAW:
case AL_FORMAT_QUAD_MULAW:
@@ -1249,9 +1258,7 @@ static void ConvertData(ALvoid *dst, enum FmtType dstType, const ALvoid *src, en
case FmtFloat:
Convert_ALfloat(dst, src, srcType, len);
break;
- case FmtDouble:
- Convert_ALdouble(dst, src, srcType, len);
- break;
+ (void)Convert_ALdouble;
}
}
@@ -1406,10 +1413,6 @@ void DecomposeFormat(ALenum format, enum FmtType *type, enum FmtChannels *order)
*type = FmtFloat;
*order = FmtMono;
break;
- case AL_FORMAT_MONO_DOUBLE_EXT:
- *type = FmtDouble;
- *order = FmtMono;
- break;
case AL_FORMAT_STEREO8:
*type = FmtUByte;
*order = FmtStereo;
@@ -1422,10 +1425,6 @@ void DecomposeFormat(ALenum format, enum FmtType *type, enum FmtChannels *order)
*type = FmtFloat;
*order = FmtStereo;
break;
- case AL_FORMAT_STEREO_DOUBLE_EXT:
- *type = FmtDouble;
- *order = FmtStereo;
- break;
case AL_FORMAT_QUAD8_LOKI:
case AL_FORMAT_QUAD8:
*type = FmtUByte;