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

Kevin Harwell asteriskteam at digium.com
Wed May 20 12:17:29 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 5:

(2 comments)

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

Line 438: 	audiohook_list->list_internal_samp_rate = DEFAULT_INTERNAL_RATE;
> Why can't we operate at the current rate on the list until calculated other
The list's internal rate is set to the highest rate among formats and hooks. There is a case where the audiohook that was removed was the one with the highest sample rate, so then the list needs to be recalculated at a lower rate.

If the rate was left at the current rate it would never get set to the lower rate.


Line 889: 	audiohook_list_check_rate(audiohook_list, frame);
> Hrm - instead of updating the sample rate at the start (which requires us t
I don't quite understand all of what you mean. What would the new sample rate at the start be? What would be updated at the end? Or do you mean find a way to move the audiohook_list_check_rate function to the end?

I could update the rate(s) while it loops through each hook handling section. Potentially though for some audiohooks their rate would not get updated to the higher value until next time through. Which might be okay?


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