1 /* libSoX G711.h - include for G711 u-law and a-law conversion routines 2 * 3 * Copyright (C) 2001 Chris Bagwell 4 * 5 * Permission to use, copy, modify, and distribute this software and its 6 * documentation for any purpose and without fee is hereby granted, provided 7 * that the above copyright notice appear in all copies and that both that 8 * copyright notice and this permission notice appear in supporting 9 * documentation. This software is provided "as is" without express or 10 * implied warranty. 11 */ 12 13 extern const uint8_t lsx_13linear2alaw[0x2000]; 14 extern const int16_t lsx_alaw2linear16[256]; 15 #define sox_13linear2alaw(sw) (lsx_13linear2alaw[((sw) + 0x1000)]) 16 #define sox_alaw2linear16(uc) (lsx_alaw2linear16[uc]) 17 18 extern const uint8_t lsx_14linear2ulaw[0x4000]; 19 extern const int16_t lsx_ulaw2linear16[256]; 20 #define sox_14linear2ulaw(sw) (lsx_14linear2ulaw[((sw) + 0x2000)]) 21 #define sox_ulaw2linear16(uc) (lsx_ulaw2linear16[uc]) 22