diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-04 23:29:37 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-04 23:29:37 +0000 |
commit | f903e4b53c695b11747dbc844f3664e54bab86c2 (patch) | |
tree | 688f224414d2ee49cc6f1a2e5ed9f25e5d4d2386 /channel.c | |
parent | b3aeb7784da69aa2b989aa63793cee3c52fecd0e (diff) |
Merged revisions 7799-7800 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7799 | kpfleming | 2006-01-04 17:02:38 -0600 (Wed, 04 Jan 2006) | 2 lines
make monitoring more tolerant of peers that deliver frames in bursts
........
r7800 | kpfleming | 2006-01-04 17:27:57 -0600 (Wed, 04 Jan 2006) | 2 lines
ensure that ulaw/alaw sound files are filled with silence when extended (not zeroes)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7801 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1889,11 +1889,11 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) if (chan->monitor && chan->monitor->read_stream ) { #ifndef MONITOR_CONSTANT_DELAY - int jump = chan->outsmpl - chan->insmpl - 2 * f->samples; + int jump = chan->outsmpl - chan->insmpl - 4 * f->samples; if (jump >= 0) { if (ast_seekstream(chan->monitor->read_stream, jump + f->samples, SEEK_FORCECUR) == -1) ast_log(LOG_WARNING, "Failed to perform seek in monitoring read stream, synchronization between the files may be broken\n"); - chan->insmpl += jump + 2 * f->samples; + chan->insmpl += jump + 4 * f->samples; } else chan->insmpl+= f->samples; #else @@ -2250,11 +2250,11 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) if( chan->monitor && chan->monitor->write_stream && f && ( f->frametype == AST_FRAME_VOICE ) ) { #ifndef MONITOR_CONSTANT_DELAY - int jump = chan->insmpl - chan->outsmpl - 2 * f->samples; + int jump = chan->insmpl - chan->outsmpl - 4 * f->samples; if (jump >= 0) { if (ast_seekstream(chan->monitor->write_stream, jump + f->samples, SEEK_FORCECUR) == -1) ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n"); - chan->outsmpl += jump + 2 * f->samples; + chan->outsmpl += jump + 4 * f->samples; } else chan->outsmpl += f->samples; #else |