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

Joshua Colp asteriskteam at digium.com
Mon May 18 14:28:26 CDT 2015


Joshua Colp 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) I understand what is going on. If native_slin is not enabled the audiohook path operates at 8kHz. In the spy case you do want the audiohook to operate at the rate of the format being requested though. This change makes that happen.

My question is this: before Matt's changes was the core operating at 8kHz like this regardless? If so I think this is an acceptable fix for getting us back to where we were.

If the answer is no then I think we've still got work to do.


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