From: Steve Underwood Date: Sun, 29 May 2016 13:00:49 +0000 (+0800) Subject: A-law idle byte was defined incorrectly. X-Git-Tag: v1.6.9~2^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4cf41771e7f8d3648b422aed6284ccdc93734e2;p=thirdparty%2Ffreeswitch.git A-law idle byte was defined incorrectly. --- diff --git a/libs/spandsp/src/spandsp/g711.h b/libs/spandsp/src/spandsp/g711.h index f722c6067c..62e537acff 100644 --- a/libs/spandsp/src/spandsp/g711.h +++ b/libs/spandsp/src/spandsp/g711.h @@ -50,9 +50,12 @@ specification by other means. #if !defined(_SPANDSP_G711_H_) #define _SPANDSP_G711_H_ +/*! The A-law alternate mark inversion mask */ +#define G711_ALAW_AMI_MASK 0x55 + /* The usual values to use on idle channels, to emulate silence */ /*! Idle value for A-law channels */ -#define G711_ALAW_IDLE_OCTET 0x5D +#define G711_ALAW_IDLE_OCTET (0x80 ^ G711_ALAW_AMI_MASK) /*! Idle value for u-law channels */ #define G711_ULAW_IDLE_OCTET 0xFF @@ -192,9 +195,6 @@ static __inline__ int16_t ulaw_to_linear(uint8_t ulaw) * John Wiley & Sons, pps 98-111 and 472-476. */ -/*! The A-law alternate mark inversion mask */ -#define G711_ALAW_AMI_MASK 0x55 - /*! \brief Encode a linear sample to A-law \param linear The sample to encode. \return The A-law value.