[Asterisk-code-review] audiohook.c: Difference in read/write rates caused continuou... (asterisk[11])

Kevin Harwell asteriskteam at digium.com
Wed May 13 15:14:03 CDT 2015


Kevin Harwell has uploaded a new patch set (#2).

Change subject: audiohook.c: Difference in read/write rates caused continuous buffer resets
......................................................................

audiohook.c: Difference in read/write rates caused continuous buffer resets

Currently, everytime a sample rate change occurs (on read or write) the
associated factory buffers are reset. If the requested sample rate on a
read differed from that of a write then the buffers are continually reset
on every read and write. This has the side effect of emptying the buffer,
thus there being no data to read and then write to a file in the case of
call recording.

This patch fixes it so that on a write, and before translation, the internal
sample rates are checked and updated accordingly if the rate happened to have
changed on a read. This also enforces that the internal rate stays in sync,
favoring a higher rate, despite any difference in read/write rates.

ASTERISK-24944 #close

Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f
---
M main/audiohook.c
1 file changed, 75 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/462/2
-- 
To view, visit https://gerrit.asterisk.org/462
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list