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

Kevin Harwell asteriskteam at digium.com
Mon May 18 14:58:17 CDT 2015


Kevin Harwell has posted comments on this change.

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


Patch Set 4:

(1 comment)

https://gerrit.asterisk.org/#/c/462/4/main/audiohook.c
File main/audiohook.c:

Line 354: 	if (!ast_test_flag(audiohook, AST_AUDIOHOOK_COMPATIBLE)) {
        : 		/*
        : 		 * An audiohook's internal rate is influenced by compatibility mode. If
        : 		 * compatibility is turned "off" then an audiohook's rate is free to be
        : 		 * adjusted. However, if it is set to "on" then the audhiohook's rate is
        : 		 * determined by the audiohook_list's internal rate during a write (see
        : 		 * audiohook_set_compatible).
        : 		 */
        : 		audiohook_set_internal_rate(audiohook, ast_format_rate(format), 1);
        : 	}
> After looking at the code again and running through scenarios (which helped
>From what I can tell yes it was operating at 8kHz. Well unless the audiohook_list's sample rate was changed. At that point though sample rates changed on all audiohooks for a given audiohook_list.

With my current patch, the same occurs except rates are kept from switching except under certain conditions (slin compatibility on/off). But as you pointed out even if a spying audiohook's rate changes during a read the audiohook_list's rate remains the same, thus the translation rate is locked to that.


-- 
To view, visit https://gerrit.asterisk.org/462
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list