summaryrefslogtreecommitdiffstats
path: root/plugins/audio/audio-pulse.c
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2016-04-05 16:41:14 +0200
committerManuel Bachmann <manuel.bachmann@iot.bzh>2016-04-05 16:41:14 +0200
commitd438e411f8f743573c79fd2c0a0a528b4a2cadf3 (patch)
treec03b41479d9f65d32095b3e28bc965eef7e844b3 /plugins/audio/audio-pulse.c
parent3a203e92661138fd1c24842bcc2f533765af95ac (diff)
Audio plugin: adapt to new API, re-enable build
Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'plugins/audio/audio-pulse.c')
-rw-r--r--plugins/audio/audio-pulse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/audio/audio-pulse.c b/plugins/audio/audio-pulse.c
index ceffcf7d..35de7f9a 100644
--- a/plugins/audio/audio-pulse.c
+++ b/plugins/audio/audio-pulse.c
@@ -56,7 +56,7 @@ PUBLIC unsigned char _pulse_init (const char *name, audioCtxHandleT *ctx) {
if (ret == -1) {
if (verbose) fprintf (stderr, "Stopping PulseAudio backend...\n");
- return -1;
+ return 0;
}
if (ret >= 0) {
/* found a matching sink from callback */
@@ -68,7 +68,7 @@ PUBLIC unsigned char _pulse_init (const char *name, audioCtxHandleT *ctx) {
}
/* fail if we found no matching sink */
if (!ctx->audio_dev)
- return -1;
+ return 0;
/* make the client context aware of current card state */
ctx->mute = (unsigned char)dev_ctx_p[ret]->mute;
@@ -87,7 +87,7 @@ PUBLIC unsigned char _pulse_init (const char *name, audioCtxHandleT *ctx) {
"afb-audio-output", pa_spec, NULL, NULL, &error))) {
fprintf (stderr, "Error opening PulseAudio sink %s : %s\n",
dev_ctx_p[ret]->sink_name, pa_strerror(error));
- return -1;
+ return 0;
}
dev_ctx_p[ret]->pa = pa;
free (pa_spec);
@@ -96,7 +96,7 @@ PUBLIC unsigned char _pulse_init (const char *name, audioCtxHandleT *ctx) {
if (verbose) fprintf (stderr, "Successfully initialized PulseAudio backend.\n");
- return 0;
+ return 1;
}
PUBLIC void _pulse_free (audioCtxHandleT *ctx) {