Don't use codecs which are not defined in older asterisk versions.
This commit is contained in:
parent
5a5bedc999
commit
e26c9ed12a
|
@ -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) {
|
static int pbx_capi_get_samples (struct capi_pvt *i, int length) {
|
||||||
switch (i->codec) {
|
switch (i->codec) {
|
||||||
case AST_FORMAT_SLINEAR:
|
case AST_FORMAT_SLINEAR:
|
||||||
|
#if defined(AST_FORMAT_SLINEAR16)
|
||||||
case AST_FORMAT_SLINEAR16:
|
case AST_FORMAT_SLINEAR16:
|
||||||
|
#endif
|
||||||
return (length/2);
|
return (length/2);
|
||||||
|
|
||||||
case AST_FORMAT_G722:
|
case AST_FORMAT_G722:
|
||||||
return (length*2);
|
return (length*2);
|
||||||
|
#if defined(AST_FORMAT_SIREN7)
|
||||||
case AST_FORMAT_SIREN7:
|
case AST_FORMAT_SIREN7:
|
||||||
return (length * (320 / 80));
|
return (length * (320 / 80));
|
||||||
|
#endif
|
||||||
|
#if defined(AST_FORMAT_SIREN14)
|
||||||
case AST_FORMAT_SIREN14:
|
case AST_FORMAT_SIREN14:
|
||||||
return ((typeof(length)) length * ((float) 640 / 120));
|
return ((typeof(length)) length * ((float) 640 / 120));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return (length);
|
return (length);
|
||||||
|
|
Loading…
Reference in New Issue