diff options
Diffstat (limited to 'include/asterisk/frame.h')
-rw-r--r-- | include/asterisk/frame.h | 10 |
1 files changed, 9 insertions, 1 deletions
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); \ |