]> code.delx.au - pulseaudio/blob - src/sink.h
initial commit
[pulseaudio] / 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 char *name;
15 uint32_t index;
16
17 struct core *core;
18 struct sample_spec sample_spec;
19 struct idxset *input_streams;
20
21 struct source *monitor_source;
22
23 uint8_t volume;
24
25 void (*notify_callback)(struct sink*sink, void *userdata);
26 void *userdata;
27 };
28
29 struct sink* sink_new(struct core *core, const char *name, const struct sample_spec *spec);
30 void sink_free(struct sink* s);
31
32 int sink_render(struct sink*s, size_t length, struct memchunk *result);
33 int sink_render_into(struct sink*s, struct memblock *target, struct memchunk *result);
34
35 void sink_notify(struct sink*s);
36 void sink_set_notify_callback(struct sink *s, void (*notify_callback)(struct sink*sink, void *userdata), void *userdata);
37
38 #endif