Don't use codecs which are not defined in older asterisk versions.

This commit is contained in:
MelwareDE 2010-09-25 10:26:24 +00:00
parent 5a5bedc999
commit e26c9ed12a
1 changed files with 6 additions and 3 deletions

View File

@ -4414,17 +4414,20 @@ static void capidev_handle_facility_indication(_cmsg *CMSG, unsigned int PLCI, u
static int pbx_capi_get_samples (struct capi_pvt *i, int length) {
switch (i->codec) {
case AST_FORMAT_SLINEAR:
#if defined(AST_FORMAT_SLINEAR16)
case AST_FORMAT_SLINEAR16:
#endif
return (length/2);
case AST_FORMAT_G722:
return (length*2);
#if defined(AST_FORMAT_SIREN7)
case AST_FORMAT_SIREN7:
return (length * (320 / 80));
#endif
#if defined(AST_FORMAT_SIREN14)
case AST_FORMAT_SIREN14:
return ((typeof(length)) length * ((float) 640 / 120));
#endif
}
return (length);