mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Use a 32k file buffer on recordings, which increases the efficiency of file recording.
(closes issue #11962) Reported by: garlew Patches: recording.patch uploaded by garlew (license 376) bug-11962.diff uploaded by snuffy (license 35) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -328,6 +328,11 @@ static void wav_close(struct ast_filestream *s)
|
||||
{
|
||||
char zero = 0;
|
||||
struct wav_desc *fs = (struct wav_desc *)s->_private;
|
||||
|
||||
if (s->filename) {
|
||||
update_header(s->f);
|
||||
}
|
||||
|
||||
/* Pad to even length */
|
||||
if (fs->bytes & 0x1)
|
||||
fwrite(&zero, 1, 1, s->f);
|
||||
@@ -416,7 +421,6 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f)
|
||||
}
|
||||
|
||||
s->bytes += f->datalen;
|
||||
update_header(fs->f);
|
||||
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user