1 #ifndef foopolyplibhfoo
2 #define foopolyplibhfoo
7 This file is part of polypaudio.
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 #include <sys/types.h>
28 #include "polyplib-def.h"
29 #include "mainloop-api.h"
33 struct pa_context *pa_context_new(struct pa_mainloop_api *mainloop, const char *name);
35 int pa_context_connect(
38 void (*complete) (struct pa_context*c, int success, void *userdata),
43 void (*complete) (struct pa_context*c, void *userdata),
46 void pa_context_free(struct pa_context *c);
48 void pa_context_set_die_callback(struct pa_context *c, void (*cb)(struct pa_context *c, void *userdata), void *userdata);
50 int pa_context_is_dead(struct pa_context *c);
51 int pa_context_is_ready(struct pa_context *c);
52 int pa_context_errno(struct pa_context *c);
54 int pa_context_is_pending(struct pa_context *c);
56 void pa_context_exit(struct pa_context *c);
57 void pa_context_stat(struct pa_context *c, void (*cb)(struct pa_context *c, uint32_t count, uint32_t total, void *userdata), void *userdata);
61 struct pa_stream* pa_stream_new(
63 enum pa_stream_direction dir,
66 const struct pa_sample_spec *ss,
67 const struct pa_buffer_attr *attr,
68 void (*complete) (struct pa_stream*s, int success, void *userdata),
71 void pa_stream_free(struct pa_stream *p);
75 void (*complete) (struct pa_stream*s, void *userdata),
79 void pa_stream_set_die_callback(struct pa_stream *s, void (*cb)(struct pa_stream *s, void *userdata), void *userdata);
81 void pa_stream_set_write_callback(struct pa_stream *p, void (*cb)(struct pa_stream *p, size_t length, void *userdata), void *userdata);
82 void pa_stream_write(struct pa_stream *p, const void *data, size_t length);
83 size_t pa_stream_writable_size(struct pa_stream *p);
85 void pa_stream_set_read_callback(struct pa_stream *p, void (*cb)(struct pa_stream *p, const void*data, size_t length, void *userdata), void *userdata);
87 int pa_stream_is_dead(struct pa_stream *p);
88 int pa_stream_is_ready(struct pa_stream*p);
90 void pa_stream_get_latency(struct pa_stream *p, void (*cb)(struct pa_stream *p, uint32_t latency, void *userdata), void *userdata);
92 struct pa_context* pa_stream_get_context(struct pa_stream *p);