routing: add loopback support to nodes
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / loopback.h
1 /*
2  * module-murphy-ivi -- PulseAudio module for providing audio routing support
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU Lesser General Public License,
7  * version 2.1, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston,
17  * MA 02110-1301 USA.
18  *
19  */
20 #ifndef fooloopbackfoo
21 #define fooloopbackfoo
22
23 #include <pulsecore/core.h>
24 #include <pulsecore/sink-input.h>
25
26 #include "list.h"
27
28 typedef struct pa_loopnode pa_loopnode;
29
30 typedef struct pa_loopback {
31     PA_LLIST_HEAD(pa_loopnode, loopnodes);
32 } pa_loopback;
33
34
35 struct pa_loopnode {
36     PA_LLIST_FIELDS(pa_loopnode);
37     uint32_t   module_index;
38     uint32_t   sink_input_index;
39 };
40
41 pa_loopback *pa_loopback_init(void);
42
43 void pa_loopback_done(pa_loopback *, pa_core *);
44
45 pa_loopnode *pa_loopback_create(pa_loopback *, pa_core *, uint32_t, uint32_t);
46 void pa_loopback_destroy(pa_loopback *, pa_core *, pa_loopnode *);
47
48 int pa_loopback_print(pa_loopnode *, char *, int);
49
50
51 #endif /* fooloopbackfoo */
52
53 /*
54  * Local Variables:
55  * c-basic-offset: 4
56  * indent-tabs-mode: nil
57  * End:
58  *
59  */