fixes sample rate conversion issue with Monitor application
authorDavid Vossel <dvossel@digium.com>
Tue, 16 Feb 2010 17:07:41 +0000 (17:07 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 16 Feb 2010 17:07:41 +0000 (17:07 +0000)
commit091f850a5831399bc2c427cb2b2b3d4399e5ab17
tree3c06498b940ce7e30bf6a1b0d494f74f53c0c6ca
parent919b0b5f54c23ceda839c41228e11a4fa6f1b326
fixes sample rate conversion issue with Monitor application

When using ast_seekstream with the read/write streams of a monitor,
the number of samples we are seeking must be of the same rate as the
stream or the jump calculation will be incorrect.  This patch adds logic
to correctly convert the number of samples to jump to the sample rate
the read/write stream is using.

For example, if the call is G722 (16khz) and the read/write stream is
recording a 8khz wav, seeking 320 samples of 16khz audio is not the
same as seeking 320 samples of 8khz audio when performing the ast_seekstream
on the stream.

ABE-2044

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel.c