Mercurial > hg > audiostuff
comparison spandsp-0.0.3/spandsp-0.0.3/src/spandsp/schedule.h @ 5:f762bf195c4b
import spandsp-0.0.3
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 16:00:21 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:26cd8f1ef0b1 | 5:f762bf195c4b |
---|---|
1 /* | |
2 * SpanDSP - a series of DSP components for telephony | |
3 * | |
4 * schedule.h | |
5 * | |
6 * Written by Steve Underwood <steveu@coppice.org> | |
7 * | |
8 * Copyright (C) 2004 Steve Underwood | |
9 * | |
10 * All rights reserved. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License version 2, as | |
14 * published by the Free Software Foundation. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 * | |
25 * $Id: schedule.h,v 1.8 2006/10/24 13:45:28 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 /*! \page schedule_page Scheduling | |
31 \section schedule_page_sec_1 What does it do? | |
32 ???. | |
33 | |
34 \section schedule_page_sec_2 How does it work? | |
35 ???. | |
36 */ | |
37 | |
38 #if !defined(_SCHEDULE_H_) | |
39 #define _SCHEDULE_H_ | |
40 | |
41 typedef struct span_sched_state_s span_sched_state_t; | |
42 | |
43 typedef void (*span_sched_callback_func_t)(span_sched_state_t *s, void *user_data); | |
44 | |
45 typedef struct | |
46 { | |
47 uint64_t when; | |
48 span_sched_callback_func_t callback; | |
49 void *user_data; | |
50 } span_sched_t; | |
51 | |
52 struct span_sched_state_s | |
53 { | |
54 uint64_t ticker; | |
55 int allocated; | |
56 int max_to_date; | |
57 span_sched_t *sched; | |
58 }; | |
59 | |
60 #ifdef __cplusplus | |
61 extern "C" { | |
62 #endif | |
63 | |
64 uint64_t span_schedule_next(span_sched_state_t *s); | |
65 uint64_t span_schedule_time(span_sched_state_t *s); | |
66 | |
67 int span_schedule_event(span_sched_state_t *s, int ms, void (*function)(span_sched_state_t *s, void *data), void *user_data); | |
68 void span_schedule_update(span_sched_state_t *s, int samples); | |
69 void span_schedule_del(span_sched_state_t *s, int id); | |
70 | |
71 span_sched_state_t *span_schedule_init(span_sched_state_t *s); | |
72 int span_schedule_release(span_sched_state_t *s); | |
73 | |
74 #ifdef __cplusplus | |
75 } | |
76 #endif | |
77 | |
78 #endif | |
79 /*- End of file ------------------------------------------------------------*/ |