summaryrefslogtreecommitdiffstats
path: root/src/pacat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-07-06 00:08:44 +0000
committerLennart Poettering <lennart@poettering.net>2004-07-06 00:08:44 +0000
commitf8cbde54dab2783e2c6ba699dfaee9ef51b1e098 (patch)
tree7bdcc21f3b25d521207d19c8ca26eb26229b6bb7 /src/pacat.c
parent722c2c8c8785d215ec3ec8757168b82c9600f4a3 (diff)
auth support in esound and native
AUTH and SET_NAME operatins in native simple library git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@51 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pacat.c')
-rw-r--r--src/pacat.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/pacat.c b/src/pacat.c
index 32220aeb..c69148e6 100644
--- a/src/pacat.c
+++ b/src/pacat.c
@@ -59,18 +59,17 @@ static void stream_write_callback(struct pa_stream *s, size_t length, void *user
do_write(length);
}
-static void stream_complete_callback(struct pa_context*c, struct pa_stream *s, void *userdata) {
- assert(c);
+static void stream_complete_callback(struct pa_stream*s, int success, void *userdata) {
+ assert(s);
- if (!s) {
+ if (!success) {
fprintf(stderr, "Stream creation failed.\n");
mainloop_api->quit(mainloop_api, 1);
return;
}
- stream = s;
- pa_stream_set_die_callback(stream, stream_die_callback, NULL);
- pa_stream_set_write_callback(stream, stream_write_callback, NULL);
+ pa_stream_set_die_callback(s, stream_die_callback, NULL);
+ pa_stream_set_write_callback(s, stream_write_callback, NULL);
}
static void context_complete_callback(struct pa_context *c, int success, void *userdata) {
@@ -87,7 +86,7 @@ static void context_complete_callback(struct pa_context *c, int success, void *u
goto fail;
}
- if (pa_stream_new(c, PA_STREAM_PLAYBACK, NULL, "pacat", &ss, NULL, stream_complete_callback, NULL) < 0) {
+ if (!(stream = pa_stream_new(c, PA_STREAM_PLAYBACK, NULL, "pacat", &ss, NULL, stream_complete_callback, NULL))) {
fprintf(stderr, "pa_stream_new() failed.\n");
goto fail;
}