basic cli interface
[profile/ivi/pulseaudio.git] / src / sink.h
1 #ifndef foosinkhfoo
2 #define foosinkhfoo
3
4 struct sink;
5
6 #include <inttypes.h>
7
8 #include "core.h"
9 #include "sample.h"
10 #include "idxset.h"
11 #include "source.h"
12
13 struct sink {
14     uint32_t index;
15
16     char *name;
17     struct core *core;
18     struct sample_spec sample_spec;
19     struct idxset *inputs;
20
21     struct source *monitor_source;
22
23     uint8_t volume;
24
25     void (*notify)(struct sink*sink);
26     uint32_t (*get_latency)(struct sink *s);
27     void *userdata;
28 };
29
30 struct sink* sink_new(struct core *core, const char *name, const struct sample_spec *spec);
31 void sink_free(struct sink* s);
32
33 int sink_render(struct sink*s, size_t length, struct memchunk *result);
34 int sink_render_into(struct sink*s, struct memchunk *target);
35 void sink_render_into_full(struct sink *s, struct memchunk *target);
36
37 uint32_t sink_get_latency(struct sink *s);
38
39 void sink_notify(struct sink*s);
40
41 char *sink_list_to_string(struct core *core);
42
43 struct sink* sink_get_default(struct core *c);
44
45
46
47 #endif