aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/mixer.c46
-rw-r--r--OpenAL32/Include/alBuffer.h2
-rw-r--r--OpenAL32/alBuffer.c25
3 files changed, 12 insertions, 61 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index cc9e4496..020375da 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -37,14 +37,6 @@
#include "bs2b.h"
-static __inline ALdouble point64(const ALdouble *vals, ALint step, ALint frac)
-{ return vals[0]; (void)step; (void)frac; }
-static __inline ALdouble lerp64(const ALdouble *vals, ALint step, ALint frac)
-{ return lerp(vals[0], vals[step], frac * (1.0/FRACTIONONE)); }
-static __inline ALdouble cubic64(const ALdouble *vals, ALint step, ALint frac)
-{ return cubic(vals[-step], vals[0], vals[step], vals[step+step],
- frac * (1.0/FRACTIONONE)); }
-
static __inline ALdouble point32(const ALfloat *vals, ALint step, ALint frac)
{ return vals[0]; (void)step; (void)frac; }
static __inline ALdouble lerp32(const ALfloat *vals, ALint step, ALint frac)
@@ -203,10 +195,6 @@ static void Mix_##T##_Mono_##sampler(ALsource *Source, ALCdevice *Device, \
*DataPosFrac = frac; \
}
-DECL_TEMPLATE(ALdouble, point64)
-DECL_TEMPLATE(ALdouble, lerp64)
-DECL_TEMPLATE(ALdouble, cubic64)
-
DECL_TEMPLATE(ALfloat, point32)
DECL_TEMPLATE(ALfloat, lerp32)
DECL_TEMPLATE(ALfloat, cubic32)
@@ -360,10 +348,6 @@ static void Mix_##T##_Stereo_##sampler(ALsource *Source, ALCdevice *Device, \
*DataPosFrac = frac; \
}
-DECL_TEMPLATE(ALdouble, point64)
-DECL_TEMPLATE(ALdouble, lerp64)
-DECL_TEMPLATE(ALdouble, cubic64)
-
DECL_TEMPLATE(ALfloat, point32)
DECL_TEMPLATE(ALfloat, lerp32)
DECL_TEMPLATE(ALfloat, cubic32)
@@ -508,10 +492,6 @@ static void Mix_##T##_##chans##_##sampler(ALsource *Source, ALCdevice *Device,\
static const Channel QuadChans[] = { FRONT_LEFT, FRONT_RIGHT,
BACK_LEFT, BACK_RIGHT };
-DECL_TEMPLATE(ALdouble, QuadChans, point64)
-DECL_TEMPLATE(ALdouble, QuadChans, lerp64)
-DECL_TEMPLATE(ALdouble, QuadChans, cubic64)
-
DECL_TEMPLATE(ALfloat, QuadChans, point32)
DECL_TEMPLATE(ALfloat, QuadChans, lerp32)
DECL_TEMPLATE(ALfloat, QuadChans, cubic32)
@@ -526,10 +506,6 @@ DECL_TEMPLATE(ALubyte, QuadChans, cubic8)
static const Channel RearChans[] = { BACK_LEFT, BACK_RIGHT };
-DECL_TEMPLATE(ALdouble, RearChans, point64)
-DECL_TEMPLATE(ALdouble, RearChans, lerp64)
-DECL_TEMPLATE(ALdouble, RearChans, cubic64)
-
DECL_TEMPLATE(ALfloat, RearChans, point32)
DECL_TEMPLATE(ALfloat, RearChans, lerp32)
DECL_TEMPLATE(ALfloat, RearChans, cubic32)
@@ -546,10 +522,6 @@ DECL_TEMPLATE(ALubyte, RearChans, cubic8)
static const Channel X51Chans[] = { FRONT_LEFT, FRONT_RIGHT,
FRONT_CENTER, LFE,
BACK_LEFT, BACK_RIGHT };
-DECL_TEMPLATE(ALdouble, X51Chans, point64)
-DECL_TEMPLATE(ALdouble, X51Chans, lerp64)
-DECL_TEMPLATE(ALdouble, X51Chans, cubic64)
-
DECL_TEMPLATE(ALfloat, X51Chans, point32)
DECL_TEMPLATE(ALfloat, X51Chans, lerp32)
DECL_TEMPLATE(ALfloat, X51Chans, cubic32)
@@ -567,10 +539,6 @@ static const Channel X61Chans[] = { FRONT_LEFT, FRONT_RIGHT,
FRONT_CENTER, LFE,
BACK_CENTER,
SIDE_LEFT, SIDE_RIGHT };
-DECL_TEMPLATE(ALdouble, X61Chans, point64)
-DECL_TEMPLATE(ALdouble, X61Chans, lerp64)
-DECL_TEMPLATE(ALdouble, X61Chans, cubic64)
-
DECL_TEMPLATE(ALfloat, X61Chans, point32)
DECL_TEMPLATE(ALfloat, X61Chans, lerp32)
DECL_TEMPLATE(ALfloat, X61Chans, cubic32)
@@ -588,10 +556,6 @@ static const Channel X71Chans[] = { FRONT_LEFT, FRONT_RIGHT,
FRONT_CENTER, LFE,
BACK_LEFT, BACK_RIGHT,
SIDE_LEFT, SIDE_RIGHT };
-DECL_TEMPLATE(ALdouble, X71Chans, point64)
-DECL_TEMPLATE(ALdouble, X71Chans, lerp64)
-DECL_TEMPLATE(ALdouble, X71Chans, cubic64)
-
DECL_TEMPLATE(ALfloat, X71Chans, point32)
DECL_TEMPLATE(ALfloat, X71Chans, lerp32)
DECL_TEMPLATE(ALfloat, X71Chans, cubic32)
@@ -653,10 +617,6 @@ static void Mix_##T##_##sampler(ALsource *Source, ALCdevice *Device, \
} \
}
-DECL_TEMPLATE(ALdouble, point64)
-DECL_TEMPLATE(ALdouble, lerp64)
-DECL_TEMPLATE(ALdouble, cubic64)
-
DECL_TEMPLATE(ALfloat, point32)
DECL_TEMPLATE(ALfloat, lerp32)
DECL_TEMPLATE(ALfloat, cubic32)
@@ -697,12 +657,6 @@ static void Mix_##sampler(ALsource *Source, ALCdevice *Device, \
Data, DataPosInt, DataPosFrac, \
OutPos, SamplesToDo, BufferSize); \
break; \
- \
- case FmtDouble: \
- Mix_ALdouble_##sampler##64(Source, Device, FmtChannels, \
- Data, DataPosInt, DataPosFrac, \
- OutPos, SamplesToDo, BufferSize); \
- break; \
} \
}
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h
index 1347eebd..8230f2b0 100644
--- a/OpenAL32/Include/alBuffer.h
+++ b/OpenAL32/Include/alBuffer.h
@@ -70,7 +70,6 @@ enum FmtType {
FmtUByte,
FmtShort,
FmtFloat,
- FmtDouble,
};
enum FmtChannels {
FmtMono,
@@ -91,7 +90,6 @@ static __inline ALuint BytesFromFmt(enum FmtType type)
case FmtUByte: return sizeof(ALubyte);
case FmtShort: return sizeof(ALshort);
case FmtFloat: return sizeof(ALfloat);
- case FmtDouble: return sizeof(ALdouble);
}
return 0;
}
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;