Add IMA4 as a source data type

This commit is contained in:
Chris Robinson 2010-11-29 17:14:22 -08:00
parent 07ef566de1
commit 017ab1b3fd
2 changed files with 12 additions and 0 deletions

View File

@ -18,6 +18,7 @@ enum SrcFmtType {
SrcFmtFloat, /* AL_FLOAT */
SrcFmtDouble, /* AL_DOUBLE */
SrcFmtMulaw, /* AL_MULAW */
SrcFmtIMA4, /* AL_IMA4 */
};
enum SrcFmtChannels {
SrcFmtMono, /* AL_MONO */

View File

@ -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;