diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-28 16:20:44 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-28 16:20:44 +0000 |
commit | e3393cfb0a5e3c50fa1f497a061d8ac38d7534c8 (patch) | |
tree | 5edb99afb7e5ac855b6542c4642f2053d755adcb /include/asterisk/frame.h | |
parent | 673d260fce5bc3241fb5fc12d334dab692b9a972 (diff) |
add API function to perform volume adjustment on a frame of SLINEAR data
documentation cleanup
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6874 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/frame.h')
-rwxr-xr-x | include/asterisk/frame.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 48a2bbebb..c17e2eecb 100755 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -49,7 +49,7 @@ struct ast_frame { int samples; /*! Was the data malloc'd? i.e. should we free it when we discard the frame? */ int mallocd; - /*! How far into "data" the data really starts */ + /*! How many bytes exist _before_ "data" that can be used if needed */ int offset; /*! Optional source of frame for debugging */ const char *src; @@ -64,8 +64,8 @@ struct ast_frame { }; #define AST_FRIENDLY_OFFSET 64 /*! It's polite for a a new frame to - have this number of bytes for additional - headers. */ + have this number of bytes for additional + headers. */ #define AST_MIN_OFFSET 32 /*! Make sure we keep at least this much handy */ /*! Need the header be free'd? */ @@ -419,6 +419,14 @@ static inline int ast_codec_interp_len(int format) return (format == AST_FORMAT_ILBC) ? 30 : 20; } +/*! + \brief Adjusts the volume of the audio samples contained in a frame. + \param f The frame containing the samples (must be AST_FRAME_VOICE and AST_FORMAT_SLINEAR) + \param adjustment The number of dB to adjust up or down. + \return 0 for success, non-zero for an error + */ +int ast_frame_adjust_volume(struct ast_frame *f, int adjustment); + #if defined(__cplusplus) || defined(c_plusplus) } #endif |