mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
- add get_max_rate timing API call
- change ast_settimeout() to honor max rate in edge cases of file playback (this will make some warning messages go away at the end of playing back a file) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -46,6 +46,7 @@ static void pthread_timer_ack(int handle, unsigned int quantity);
|
||||
static int pthread_timer_enable_continuous(int handle);
|
||||
static int pthread_timer_disable_continuous(int handle);
|
||||
static enum ast_timing_event pthread_timer_get_event(int handle);
|
||||
static unsigned int pthread_timer_get_max_rate(int handle);
|
||||
|
||||
static struct ast_timing_functions pthread_timing_functions = {
|
||||
.timer_open = pthread_timer_open,
|
||||
@@ -55,6 +56,7 @@ static struct ast_timing_functions pthread_timing_functions = {
|
||||
.timer_enable_continuous = pthread_timer_enable_continuous,
|
||||
.timer_disable_continuous = pthread_timer_disable_continuous,
|
||||
.timer_get_event = pthread_timer_get_event,
|
||||
.timer_get_max_rate = pthread_timer_get_max_rate,
|
||||
};
|
||||
|
||||
/* 1 tick / 10 ms */
|
||||
@@ -249,6 +251,11 @@ static enum ast_timing_event pthread_timer_get_event(int handle)
|
||||
return res;
|
||||
}
|
||||
|
||||
static unsigned int pthread_timer_get_max_rate(int handle)
|
||||
{
|
||||
return MAX_RATE;
|
||||
}
|
||||
|
||||
static struct pthread_timer *find_timer(int handle, int unlink)
|
||||
{
|
||||
struct pthread_timer *timer;
|
||||
|
||||
Reference in New Issue
Block a user