mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add mod_celt
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10841 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -44,7 +44,9 @@
|
||||
#endif
|
||||
|
||||
#define MAX_TICK UINT32_MAX - 1024
|
||||
#define MS_PER_TICK 10
|
||||
|
||||
static int MS_PER_TICK = 10;
|
||||
|
||||
static switch_memory_pool_t *module_pool = NULL;
|
||||
|
||||
static struct {
|
||||
@@ -252,6 +254,11 @@ static switch_status_t timer_init(switch_timer_t *timer)
|
||||
private_info->start = private_info->reference = TIMER_MATRIX[timer->interval].tick;
|
||||
private_info->roll = TIMER_MATRIX[timer->interval].roll;
|
||||
private_info->ready = 1;
|
||||
|
||||
if (timer->interval < MS_PER_TICK) {
|
||||
MS_PER_TICK = timer->interval;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -319,7 +326,7 @@ static switch_status_t timer_next(switch_timer_t *timer)
|
||||
#endif
|
||||
|
||||
timer_step(timer);
|
||||
|
||||
|
||||
while (globals.RUNNING == 1 && private_info->ready && TIMER_MATRIX[timer->interval].tick < private_info->reference) {
|
||||
check_roll();
|
||||
if (globals.use_cond_yield == 1) {
|
||||
@@ -506,6 +513,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if ((current_ms % MS_PER_TICK) == 0) {
|
||||
for (x = MS_PER_TICK; x <= MAX_ELEMENTS; x += MS_PER_TICK) {
|
||||
if ((current_ms % x) == 0) {
|
||||
@@ -525,6 +533,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (current_ms == MAX_ELEMENTS) {
|
||||
current_ms = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user