diff options
author | Chris Robinson <[email protected]> | 2018-01-21 18:34:03 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-21 18:34:03 -0800 |
commit | db13af1935f969bb579fca9d79c6600d91c0fe32 (patch) | |
tree | d69b0a669a9cf096bd71e90970a0ad8f5d064458 /Alc/mixer.c | |
parent | efd11f32a20c8fa06161a42facc5b97180c0c1a5 (diff) |
Handle double-precision buffers in the mixer
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index fe4bcd78..b54e840e 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -202,6 +202,9 @@ static inline ALfloat Sample_ALshort(ALshort val) static inline ALfloat Sample_ALfloat(ALfloat val) { return val; } +static inline ALfloat Sample_ALdouble(ALdouble val) +{ return (ALfloat)val; } + typedef ALubyte ALmulaw; static inline ALfloat Sample_ALmulaw(ALmulaw val) { return muLawDecompressionTable[val] * (1.0f/32768.0f); } @@ -222,6 +225,7 @@ static inline void Load_##T(ALfloat *restrict dst, const T *restrict src, \ DECL_TEMPLATE(ALubyte) DECL_TEMPLATE(ALshort) DECL_TEMPLATE(ALfloat) +DECL_TEMPLATE(ALdouble) DECL_TEMPLATE(ALmulaw) DECL_TEMPLATE(ALalaw) @@ -236,6 +240,7 @@ static void LoadSamples(ALfloat *restrict dst, const ALvoid *restrict src, ALint HANDLE_FMT(FmtUByte, ALubyte); HANDLE_FMT(FmtShort, ALshort); HANDLE_FMT(FmtFloat, ALfloat); + HANDLE_FMT(FmtDouble, ALdouble); HANDLE_FMT(FmtMulaw, ALmulaw); HANDLE_FMT(FmtAlaw, ALalaw); } |