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:
Tilghman Lesher
2008-04-03 07:49:05 +00:00
parent cbf80c1a3c
commit 0e6140c564
3 changed files with 18 additions and 3 deletions

View File

@@ -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;