Esempio n. 1
0
    /* take the scheduler forward one DSP tick, also handling clock timeouts */
void sched_tick(double next_sys_time)
{
    int countdown = 5000;
    while (clock_setlist && clock_setlist->c_settime < next_sys_time)
    {
        t_clock *c = clock_setlist;
        sys_time = c->c_settime;
        clock_unset(clock_setlist);
        outlet_setstacklim();
        (*c->c_fn)(c->c_owner);
        if (!countdown--)
        {
            countdown = 5000;
            sys_pollgui();
        }
        if (sys_quit)
            return;
    }
    sys_time = next_sys_time;
    dsp_tick();
    sched_diddsp++;
}
Esempio n. 2
0
/* take the scheduler forward one DSP tick, also handling clock timeouts */
void sched_tick( void)
{
    double next_sys_time = pd_this->pd_systime + sys_time_per_dsp_tick;
    int countdown = 5000;
    while (pd_this->pd_clock_setlist &&
            pd_this->pd_clock_setlist->c_settime < next_sys_time)
    {
        t_clock *c = pd_this->pd_clock_setlist;
        pd_this->pd_systime = c->c_settime;
        clock_unset(pd_this->pd_clock_setlist);
        outlet_setstacklim();
        (*c->c_fn)(c->c_owner);
        if (!countdown--)
        {
            countdown = 5000;
            sys_pollgui();
        }
        if (sys_quit)
            return;
    }
    pd_this->pd_systime = next_sys_time;
    dsp_tick();
    sched_diddsp++;
}