]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
A-law idle byte was defined incorrectly.
authorSteve Underwood <steveu@coppice.org>
Sun, 29 May 2016 13:00:49 +0000 (21:00 +0800)
committerSteve Underwood <steveu@coppice.org>
Sun, 29 May 2016 13:00:49 +0000 (21:00 +0800)
libs/spandsp/src/spandsp/g711.h

index f722c6067c1082b3ee333bfa0f47c956df39fcd1..62e537acff5cd5e2cff77e1124b248c4271c225b 100644 (file)
@@ -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.