[asterisk-commits] russell: branch 1.4 r51204 -
/branches/1.4/channels/chan_zap.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 17 15:09:52 MST 2007
Author: russell
Date: Wed Jan 17 16:09:52 2007
New Revision: 51204
URL: http://svn.digium.com/view/asterisk?view=rev&rev=51204
Log:
Instead of dividing the offset by 2 directly, make it more clear that the
offset is being scaled by the size of the elements in the buffer.
(Inspired by a discussing on the asterisk-dev list about this code)
Modified:
branches/1.4/channels/chan_zap.c
Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=51204&r1=51203&r2=51204
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Wed Jan 17 16:09:52 2007
@@ -4774,7 +4774,7 @@
p->subs[index].f.samples = READ_SIZE;
p->subs[index].f.mallocd = 0;
p->subs[index].f.offset = AST_FRIENDLY_OFFSET;
- p->subs[index].f.data = p->subs[index].buffer + AST_FRIENDLY_OFFSET/2;
+ p->subs[index].f.data = p->subs[index].buffer + AST_FRIENDLY_OFFSET / sizeof(p->subs[index].buffer[0]);
#if 0
ast_log(LOG_DEBUG, "Read %d of voice on %s\n", p->subs[index].f.datalen, ast->name);
#endif
More information about the asterisk-commits
mailing list