From 017ab1b3fd6d5c95dc2793af0cb2bb394e6fbe12 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 29 Nov 2010 17:14:22 -0800 Subject: Add IMA4 as a source data type --- OpenAL32/Include/alBuffer.h | 1 + OpenAL32/alBuffer.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h index 6f1584a4..870014b4 100644 --- a/OpenAL32/Include/alBuffer.h +++ b/OpenAL32/Include/alBuffer.h @@ -18,6 +18,7 @@ enum SrcFmtType { SrcFmtFloat, /* AL_FLOAT */ SrcFmtDouble, /* AL_DOUBLE */ SrcFmtMulaw, /* AL_MULAW */ + SrcFmtIMA4, /* AL_IMA4 */ }; enum SrcFmtChannels { SrcFmtMono, /* AL_MONO */ diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 6a749256..5b30461e 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -1288,6 +1288,8 @@ static void Convert_##T(T *dst, const ALvoid *src, enum SrcFmtType srcType, \ case SrcFmtMulaw: \ Convert_##T##_ALmulaw(dst, src, len); \ break; \ + case SrcFmtIMA4: \ + break; /* not handled here */ \ } \ } @@ -1396,6 +1398,7 @@ ALuint BytesFromSrcFmt(enum SrcFmtType type) case SrcFmtFloat: return sizeof(ALfloat); case SrcFmtDouble: return sizeof(ALdouble); case SrcFmtMulaw: return sizeof(ALubyte); + case SrcFmtIMA4: break; /* not handled here */ } return 0; } @@ -1434,6 +1437,10 @@ void DecomposeInputFormat(ALenum format, enum SrcFmtChannels *chans, *chans = SrcFmtMono; *type = SrcFmtDouble; break; + case AL_FORMAT_MONO_IMA4: + *chans = SrcFmtMono; + *type = SrcFmtIMA4; + break; case AL_FORMAT_STEREO8: *chans = SrcFmtStereo; *type = SrcFmtUByte; @@ -1450,6 +1457,10 @@ void DecomposeInputFormat(ALenum format, enum SrcFmtChannels *chans, *chans = SrcFmtStereo; *type = SrcFmtDouble; break; + case AL_FORMAT_STEREO_IMA4: + *chans = SrcFmtStereo; + *type = SrcFmtIMA4; + break; case AL_FORMAT_QUAD8_LOKI: case AL_FORMAT_QUAD8: *chans = SrcFmtQuad; -- cgit v1.2.3