Mercurial > audlegacy
annotate src/audacious/flow.h @ 3636:65b750891387
Possibly fix a lockup problem.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 25 Sep 2007 23:09:09 +0300 |
parents | 5aec9950c47a |
children | 6f4068a0f291 |
rev | line source |
---|---|
3551 | 1 /* |
2 * Audacious | |
3 * Copyright (c) 2007 William Pitcock | |
4 * | |
5 * flow.h: Definition of flow context structure, flow management API. | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; under version 3 of the License. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program. If not, see <http://www.gnu.org/licenses>. | |
18 * | |
19 * The Audacious team does not consider modular code linking to | |
20 * Audacious or using our public API to be a derived work. | |
21 */ | |
22 | |
23 #include <glib.h> | |
24 #include <mowgli.h> | |
25 | |
26 #include "output.h" | |
27 | |
28 #ifndef __AUDACIOUS_FLOW_H__ | |
29 #define __AUDACIOUS_FLOW_H__ | |
30 | |
31 typedef struct { | |
3558
5aec9950c47a
Add time to flow_execute() and friends.
William Pitcock <nenolod@atheme.org>
parents:
3551
diff
changeset
|
32 gint time; |
3551 | 33 gpointer data; |
34 gsize len; | |
35 AFormat fmt; | |
36 gint srate; | |
37 gint channels; | |
38 gboolean error; | |
39 } FlowContext; | |
40 | |
41 typedef void (*FlowFunction)(FlowContext *ctx); | |
42 | |
43 typedef struct _FlowElement { | |
44 struct _FlowElement *prev, *next; | |
45 FlowFunction func; | |
46 } FlowElement; | |
47 | |
48 typedef struct { | |
49 mowgli_object_t parent; | |
50 FlowElement *head, *tail; | |
51 } Flow; | |
52 | |
3558
5aec9950c47a
Add time to flow_execute() and friends.
William Pitcock <nenolod@atheme.org>
parents:
3551
diff
changeset
|
53 void flow_execute(Flow *flow, gint time, gpointer data, gsize len, AFormat fmt, |
3551 | 54 gint srate, gint channels); |
55 | |
56 Flow *flow_new(void); | |
57 void flow_link_element(Flow *flow, FlowFunction func); | |
58 void flow_unlink_element(Flow *flow, FlowFunction func); | |
59 | |
60 #define flow_destroy(flow) mowgli_object_unref(flow) | |
61 | |
62 #endif |