aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-29 17:14:22 -0800
committerChris Robinson <[email protected]>2010-11-29 17:14:22 -0800
commit017ab1b3fd6d5c95dc2793af0cb2bb394e6fbe12 (patch)
tree2db36eadb0074c08ba4aff4a2899adb452dd079a
parent07ef566de1afcad25c457807d465244e79fce63f (diff)
Add IMA4 as a source data type
-rw-r--r--OpenAL32/Include/alBuffer.h1
-rw-r--r--OpenAL32/alBuffer.c11
2 files changed, 12 insertions, 0 deletions
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;