1 --- opal-3.10.9/opal.m4.orig 2012-11-26 11:49:22.000000000 +0100
2 +++ opal-3.10.9/opal.m4 2013-01-24 14:11:21.415599845 +0100
7 - AC_CHECK_LIB(ilbc, iLBC_encode, [has_ilbc=yes], [has_ilbc=no])
8 + AC_CHECK_LIB(ilbc, iLBC_encode, [has_ilbc=yes], [AC_CHECK_LIB(ilbc, WebRtcIlbcfix_EncodeImpl, [has_ilbc=yes], [has_ilbc=no])])
11 if test "x${has_ilbc}" = "xyes"; then
12 - AC_CHECK_HEADERS([ilbc/iLBC_decode.h ilbc/iLBC_define.h ilbc/iLBC_encode.h], [has_ilbc=yes], [has_ilbc=no])
13 + AC_CHECK_HEADERS([ilbc.h], [has_ilbc=yes], [AC_CHECK_HEADERS([ilbc/iLBC_decode.h ilbc/iLBC_define.h ilbc/iLBC_encode.h], [has_ilbc=yes], [has_ilbc=no])])
16 if test "x${has_ilbc}" = "xyes"; then
17 --- opal-3.10.9/plugins/audio/iLBC/ilbccodec.c.orig 2012-11-26 11:48:21.000000000 +0100
18 +++ opal-3.10.9/plugins/audio/iLBC/ilbccodec.c 2013-01-24 16:11:10.948783326 +0100
21 #include <codec/opalplugin.h>
23 +#if defined(HAVE_ILBC_ILBC_DECODE_H) && defined(HAVE_ILBC_ILBC_ENCODE_H) && defined(HAVE_ILBC_ILBC_DEFINE_H)
24 +#include <ilbc/iLBC_encode.h>
25 +#include <ilbc/iLBC_decode.h>
26 +#include <ilbc/iLBC_define.h>
27 +#define ILBC_SAMPLE_TYPE float
28 +#elif defined(HAVE_ILBC_H)
30 +#define ILBC_SAMPLE_TYPE WebRtc_Word16
31 +#define NO_OF_BYTES_20MS 38
32 +#define NO_OF_BYTES_30MS 50
33 +#define MIN_SAMPLE -32768
34 +#define MAX_SAMPLE 32767
36 +#define ILBC_SAMPLE_TYPE float
37 #include "iLBC/iLBC_encode.h"
38 #include "iLBC/iLBC_decode.h"
39 #include "iLBC/iLBC_define.h"
42 #define BITRATE_30MS NO_OF_BYTES_30MS*8*8000/BLOCKL_30MS
43 #define BITRATE_20MS NO_OF_BYTES_20MS*8*8000/BLOCKL_20MS
48 - float block[BLOCKL_MAX];
49 + ILBC_SAMPLE_TYPE block[BLOCKL_MAX];
52 struct iLBC_Enc_Inst_t_ * encoder = (struct iLBC_Enc_Inst_t_ *)context;
55 /* convert signal to float */
56 for (i = 0; i < encoder->blockl; i++)
57 - block[i] = (float)sampleBuffer[i];
58 + block[i] = (ILBC_SAMPLE_TYPE)sampleBuffer[i];
60 /* do the actual encoding */
61 iLBC_encode(to, block, encoder);
66 - float block[BLOCKL_MAX];
67 + ILBC_SAMPLE_TYPE block[BLOCKL_MAX];
69 struct iLBC_Dec_Inst_t_ * decoder = (struct iLBC_Dec_Inst_t_ *)context;
70 short * sampleBuffer = (short *)to;