1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

make use of new defines: 24 and 32bit integer types

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13553 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2004-10-04 19:50:40 +00:00
parent 1fc371c73a
commit 756bffd08b

View File

@ -18,10 +18,22 @@ int af_format_decode(int ifmt)
ofmt = AF_FORMAT_LE|AF_FORMAT_US; break;
case(AFMT_U16_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_US; break;
case(AFMT_S24_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_SI; break;
case(AFMT_S24_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_SI; break;
case(AFMT_U24_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_US; break;
case(AFMT_U24_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_US; break;
case(AFMT_S32_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_SI; break;
case(AFMT_S32_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_SI; break;
case(AFMT_U32_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_US; break;
case(AFMT_U32_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_US; break;
case(AFMT_IMA_ADPCM):
ofmt = AF_FORMAT_IMA_ADPCM; break;
case(AFMT_MU_LAW):
@ -58,6 +70,7 @@ int af_format_encode(void* fmtp)
switch(fmt->bps){
case 1: return AFMT_S8;
case 2: return (fmt->format&AF_FORMAT_LE) ? AFMT_S16_LE : AFMT_S16_BE;
case 3: return (fmt->format&AF_FORMAT_LE) ? AFMT_S24_LE : AFMT_S24_BE;
case 4: return (fmt->format&AF_FORMAT_LE) ? AFMT_S32_LE : AFMT_S32_BE;
}
} else {
@ -65,7 +78,8 @@ int af_format_encode(void* fmtp)
switch(fmt->bps){
case 1: return AFMT_U8;
case 2: return (fmt->format&AF_FORMAT_LE) ? AFMT_U16_LE : AFMT_U16_BE;
// case 4: return (fmt->format&AF_FORMAT_LE) ? AFMT_U32_LE : AFMT_U32_BE;
case 3: return (fmt->format&AF_FORMAT_LE) ? AFMT_U24_LE : AFMT_U24_BE;
case 4: return (fmt->format&AF_FORMAT_LE) ? AFMT_U32_LE : AFMT_U32_BE;
}
}
} else {