From 957fff010c04043f7ed26dced42a8fcfb3491ef8 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sun, 9 Apr 2006 22:31:38 +0000 Subject: rename FR_SET_BUF to AST_FRAME_SET_BUFFER git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18639 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/frame.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/asterisk') diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 21b596928..099e20080 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -111,7 +111,15 @@ struct ast_frame { struct ast_frame *next; }; -#define FR_SET_BUF(fr, _base, _ofs, _datalen) \ +/*! + * Set the various field of a frame to point to a buffer. + * Typically you set the base address of the buffer, the offset as + * AST_FRIENDLY_OFFSET, and the datalen as the amount of bytes queued. + * The remaining things (to be done manually) is set the number of + * samples, which cannot be derived from the datalen unless you know + * the number of bits per sample. + */ +#define AST_FRAME_SET_BUFFER(fr, _base, _ofs, _datalen) \ { \ (fr)->data = (char *)_base + (_ofs); \ (fr)->offset = (_ofs); \ -- cgit v1.2.3