25 lines
598 B
C
25 lines
598 B
C
int signal_generator_read(struct node *n, struct sample *smps[],
|
|
unsigned cnt, unsigned *release)
|
|
{
|
|
struct signal_generator *s = (struct signal_generator *) n->_vd;
|
|
struct timespace ts;
|
|
int steps;
|
|
|
|
/* Block until 1/p->rate seconds elapsed */
|
|
steps = task_wait(&s->task);
|
|
|
|
if (steps > 1 && s->monitor_missed) {
|
|
warn("Missed steps: %u", steps-1);
|
|
|
|
s->missed_steps += steps-1;
|
|
}
|
|
|
|
ts = time_now();
|
|
|
|
/**
|
|
* Generate sample(s) with signal and timestamp ts .
|
|
* Return this sample via the *smps[] parameter of
|
|
* signal_generator_read()
|
|
*/
|
|
}
|