Open GoogleCodeExporter opened 9 years ago
This solved the problem:
diff -p5 chan_dongle-1.1.r14/channel.c chan_dongle-1.1.r14.patched/channel.c
*** chan_dongle-1.1.r14/channel.c 2011-10-03 08:12:31.000000000 +0200
--- chan_dongle-1.1.r14.patched/channel.c 2015-01-24 13:14:51.706589292
+0100
*************** static int channel_write (struct ast_cha
*** 821,830 ****
--- 821,833 ----
}
if (pvt->a_timer)
{
+ if(is_big_endian())
+ ast_frame_byteswap_le (f);
+
count = mixb_free (&pvt->a_write_mixb, &cpvt->mixstream);
if (count < (size_t) f->datalen)
{
mixb_read_upd (&pvt->a_write_mixb, f->datalen - count);
*************** EXPORT_DEF const struct ast_channel_tech
*** 1382,1386 ****
--- 1385,1399 ----
.devicestate = channel_devicestate,
.indicate = channel_indicate,
.func_channel_read = channel_func_read,
.func_channel_write = channel_func_write
};
+
+ int is_big_endian(void)
+ {
+ union {
+ uint32_t i;
+ char c[4];
+ } e = { 0x01000000 };
+ return e.c[0];
+ }
+
Original comment by marcin.o...@gmail.com
on 24 Jan 2015 at 12:17
thanks for patch
Original comment by bg_...@mail.ru
on 14 Mar 2015 at 4:16
Original issue reported on code.google.com by
marcin.o...@gmail.com
on 18 Jan 2015 at 11:48