mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 04:16:43 +00:00
Merged revisions 105933 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r105933 | russell | 2008-03-04 19:54:16 -0600 (Tue, 04 Mar 2008) | 13 lines Merged revisions 105932 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r105932 | russell | 2008-03-04 19:52:18 -0600 (Tue, 04 Mar 2008) | 5 lines Fix a bug that I just noticed in the RTP code. The calculation for setting the len field in an ast_frame of audio was wrong when G.722 is in use. The len field represents the number of ms of audio that the frame contains. It would have set the value to be twice what it should be. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@106310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -611,6 +611,17 @@ int ast_frame_adjust_volume(struct ast_frame *f, int adjustment);
|
||||
*/
|
||||
int ast_frame_slinear_sum(struct ast_frame *f1, struct ast_frame *f2);
|
||||
|
||||
/*!
|
||||
* \brief Get the sample rate for a given format.
|
||||
*/
|
||||
static force_inline int ast_format_rate(int format)
|
||||
{
|
||||
if (format == AST_FORMAT_G722 || format == AST_FORMAT_SLINEAR16)
|
||||
return 16000;
|
||||
|
||||
return 8000;
|
||||
}
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user