Add IMA4 as a source data type
This commit is contained in:
parent
07ef566de1
commit
017ab1b3fd
@ -18,6 +18,7 @@ enum SrcFmtType {
|
|||||||
SrcFmtFloat, /* AL_FLOAT */
|
SrcFmtFloat, /* AL_FLOAT */
|
||||||
SrcFmtDouble, /* AL_DOUBLE */
|
SrcFmtDouble, /* AL_DOUBLE */
|
||||||
SrcFmtMulaw, /* AL_MULAW */
|
SrcFmtMulaw, /* AL_MULAW */
|
||||||
|
SrcFmtIMA4, /* AL_IMA4 */
|
||||||
};
|
};
|
||||||
enum SrcFmtChannels {
|
enum SrcFmtChannels {
|
||||||
SrcFmtMono, /* AL_MONO */
|
SrcFmtMono, /* AL_MONO */
|
||||||
|
@ -1288,6 +1288,8 @@ static void Convert_##T(T *dst, const ALvoid *src, enum SrcFmtType srcType, \
|
|||||||
case SrcFmtMulaw: \
|
case SrcFmtMulaw: \
|
||||||
Convert_##T##_ALmulaw(dst, src, len); \
|
Convert_##T##_ALmulaw(dst, src, len); \
|
||||||
break; \
|
break; \
|
||||||
|
case SrcFmtIMA4: \
|
||||||
|
break; /* not handled here */ \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1396,6 +1398,7 @@ ALuint BytesFromSrcFmt(enum SrcFmtType type)
|
|||||||
case SrcFmtFloat: return sizeof(ALfloat);
|
case SrcFmtFloat: return sizeof(ALfloat);
|
||||||
case SrcFmtDouble: return sizeof(ALdouble);
|
case SrcFmtDouble: return sizeof(ALdouble);
|
||||||
case SrcFmtMulaw: return sizeof(ALubyte);
|
case SrcFmtMulaw: return sizeof(ALubyte);
|
||||||
|
case SrcFmtIMA4: break; /* not handled here */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1434,6 +1437,10 @@ void DecomposeInputFormat(ALenum format, enum SrcFmtChannels *chans,
|
|||||||
*chans = SrcFmtMono;
|
*chans = SrcFmtMono;
|
||||||
*type = SrcFmtDouble;
|
*type = SrcFmtDouble;
|
||||||
break;
|
break;
|
||||||
|
case AL_FORMAT_MONO_IMA4:
|
||||||
|
*chans = SrcFmtMono;
|
||||||
|
*type = SrcFmtIMA4;
|
||||||
|
break;
|
||||||
case AL_FORMAT_STEREO8:
|
case AL_FORMAT_STEREO8:
|
||||||
*chans = SrcFmtStereo;
|
*chans = SrcFmtStereo;
|
||||||
*type = SrcFmtUByte;
|
*type = SrcFmtUByte;
|
||||||
@ -1450,6 +1457,10 @@ void DecomposeInputFormat(ALenum format, enum SrcFmtChannels *chans,
|
|||||||
*chans = SrcFmtStereo;
|
*chans = SrcFmtStereo;
|
||||||
*type = SrcFmtDouble;
|
*type = SrcFmtDouble;
|
||||||
break;
|
break;
|
||||||
|
case AL_FORMAT_STEREO_IMA4:
|
||||||
|
*chans = SrcFmtStereo;
|
||||||
|
*type = SrcFmtIMA4;
|
||||||
|
break;
|
||||||
case AL_FORMAT_QUAD8_LOKI:
|
case AL_FORMAT_QUAD8_LOKI:
|
||||||
case AL_FORMAT_QUAD8:
|
case AL_FORMAT_QUAD8:
|
||||||
*chans = SrcFmtQuad;
|
*chans = SrcFmtQuad;
|
||||||
|
Loading…
Reference in New Issue
Block a user