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

master
MelwareDE 13 years ago
parent 5a5bedc999
commit e26c9ed12a
  1. 9
      chan_capi.c

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

Loading…
Cancel
Save